04.06.2016, 00:33
Код:
CMD:setarmour(playerid,params[]) { if(pInfo[playerid][pLevel] < 2)return ShowMessage(playerid, red, 1); new id,amount; if(sscanf(params, "ui",id,amount)) return SendClientMessage(playerid, yellow, "Usage: /Setarmour <Player ID/Part of nick> <Amount> (1-100)!"); if(!IsPlayerConnected(id)) return ShowMessage(playerid, red, 2); if( 0 > amount > 100)return SendClientMessage(playerid, red, "Invalid amount!"); format(Jstring, sizeof(Jstring), "You have set %s's Armour to '%d'", GetName(id), amount); SendClientMessage(playerid,yellow,Jstring); format(Jstring,sizeof(Jstring),"Admin '%s' has set your Armour to '%d'", GetName(playerid), amount); SendClientMessage(id,yellow,Jstring); SetPlayerArmour(id, amount); CommandToAdmins(playerid,"setarmour"); return 1; }