Allow /replenishsafe for level 5

Sets the minimum level required for /replenishsafe to 5.
This commit is contained in:
Cloudy 2019-06-10 17:07:07 +03:00
parent a2f11b3786
commit 4862a8abc4
3 changed files with 18 additions and 17 deletions

View File

@ -140,6 +140,7 @@ static stock
{ 5, "/editgate", "Editing a gate" }, { 5, "/editgate", "Editing a gate" },
{ 5, "/acunban", "Unbanning a player from AC" }, { 5, "/acunban", "Unbanning a player from AC" },
{ 5, "/safeisbugged", "Debug command for robbery safes" }, { 5, "/safeisbugged", "Debug command for robbery safes" },
{ 5, "/replenishsafe", "Fixes bugged robbery safes" },
{ 5, "/autovehrespawn", "Setting auto respawn for vehicles" }, { 5, "/autovehrespawn", "Setting auto respawn for vehicles" },
{ 5, "/megaban", "The Mega Ban" }, { 5, "/megaban", "The Mega Ban" },
{ 5, "/achangename", "Change a players name" }, { 5, "/achangename", "Change a players name" },

View File

@ -276,6 +276,23 @@ CMD:safeisbugged( playerid, params[ ] )
return 1; return 1;
} }
CMD:replenishsafe( playerid, params[ ] )
{
new
rID;
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "d", rID ) ) return SendUsage( playerid, "/replenishsafe [SAFE_ID]" );
else if (!Iter_Contains(RobberyCount, rID)) return SendError( playerid, "This is an invalid Safe ID." );
else
{
printf( "[GM:ADMIN] %s has replenished %d! (Success: %d)", ReturnPlayerName( playerid ), rID, setSafeReplenished( rID ) );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You've replenished Safe ID %d: "COL_GREY"%s"COL_WHITE".", rID, g_robberyData[ rID ] [ E_NAME ] );
}
return 1;
}
CMD:autovehrespawn( playerid, params[ ] ) CMD:autovehrespawn( playerid, params[ ] )
{ {
#if defined _vsync_included #if defined _vsync_included

View File

@ -255,23 +255,6 @@ CMD:addcomponent( playerid, params[ ] )
return 1; return 1;
} }
CMD:replenishsafe( playerid, params[ ] )
{
new
rID;
if ( !IsPlayerAdmin( playerid ) ) return 0;
else if ( sscanf( params, "d", rID ) ) return SendUsage( playerid, "/replenishsafe [SAFE_ID]" );
else if (!Iter_Contains(RobberyCount, rID)) return SendError( playerid, "This is an invalid Safe ID." );
else
{
printf( "[GM:ADMIN] %s has replenished %d! (Success: %d)", ReturnPlayerName( playerid ), rID, setSafeReplenished( rID ) );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You've replenished Safe ID %d: "COL_GREY"%s"COL_WHITE".", rID, g_robberyData[ rID ] [ E_NAME ] );
}
return 1;
}
CMD:driveby( playerid, params[ ] ) CMD:driveby( playerid, params[ ] )
{ {
if ( !IsPlayerAdmin( playerid ) ) return 0; if ( !IsPlayerAdmin( playerid ) ) return 0;