Merge pull request #37 from meCloudy/the-/replsnishsafe

Allow /replenishsafe for level 5
This commit is contained in:
Lorenc Pekaj 2019-06-11 13:42:46 +10:00 committed by GitHub
commit d4744276a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 17 deletions

View File

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

View File

@ -346,6 +346,23 @@ CMD:safeisbugged( playerid, params[ ] )
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[ ] )
{
#if defined _vsync_included

View File

@ -255,23 +255,6 @@ CMD:addcomponent( playerid, params[ ] )
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[ ] )
{
if ( !IsPlayerAdmin( playerid ) ) return 0;