01.10.2017, 14:13
Try this command:
PHP код:
CMD:setarmor(playerid,params[])
{
new playa,armor;
if(PlayerInfo[playerid][pAdmin] <= 3 || PlayerInfo[playerid][pEventModd] < 0) return AdmErrorMsg;
if(sscanf(params, "ui", playa, armor)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:
{FFFFFF} /setarmor [playerid/PartOfName] [armor]");
if(IsPlayerConnected(playa)
{
strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
SetPlayerArmour(playa, 100);
format(str, sizeof(str), "You have set %s's armor to %d.", giveplayer, armor);
SendClientMessage(playerid, COLOR_GREY, str);
}
return 1;
}