From 640dd4191d0949109f6804abaa17cfe9d8c60ff6 Mon Sep 17 00:00:00 2001 From: Nemesis211 <51242547+Nemesis211@users.noreply.github.com> Date: Sat, 1 Jun 2019 01:21:50 +0500 Subject: [PATCH] Adds givearmour for level 5 --- .../cnr/commands/admin/admin_five.pwn | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn index 3af945c..ca4a353 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn @@ -6,6 +6,24 @@ */ /* ** Commands ** */ +CMD:givearmour( playerid, params[ ] ) +{ + new pID; + if ( p_AdminLevel[ playerid] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT); + else if (sscanf (params, "u", pID ) ) SendUsage(playerid, "/givearmour [PLAYER_ID]"); + else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." ); + else if ( IsPlayerJailed( pID ) ) return SendError( playerid, "This player is jailed, you cannot do this." ); + else if ( IsPlayerAdminOnDuty( pID ) ) return SendError( playerid, "This player is an admin on duty, you cannot do this." ); + else + { + SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" %s(%d) gave you armour.", ReturnPlayerName( playerid ), playerid ); + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have given armour to %s(%d).", ReturnPlayerName( pID ), pID ); + AddAdminLogLineFormatted( "%s(%d) has given armour to %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID ); + SetPlayerArmour( pID, 100.0 ); + } + return 1; +} + CMD:armorall( playerid, params[ ] ) { if ( p_AdminLevel[ playerid ] < 5 ) @@ -806,4 +824,4 @@ thread OnPlayerUnforceAC( playerid, player[ ], pID, bool:offline ) } return 1; -} \ No newline at end of file +}