Код
if(strcmp(cmd, "/setarmor", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREEN, "/setarmor [Ид] [armor]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strval(tmp);
if (PlayerInfo [playerid][pAdmin]>= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
SetPlayerArmour(playa, health);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Вы не уполномочены использовать эту команду!");
}
}
return 1;
}