Команда не работает, пишу /sethp 0 50, а он свое "/sethp [id] [hp]Цитата:
PHP код:
CMD:sethp(playerid, params[])
{
new targetid, health;
if (sscanf(params, !"dd", targetid, health))
return SendClientMessage(playerid, COLOR_WHITE,
!"Введите: /sethp [id] [hp]"
);
if(anti[playerid] == 1)
return SendClientMessage(playerid, COLOR_LIGHTRED,
!"[Анти-Наказание] Вы словили блок на наказание сроком 5 минут"
);
if (PlayerInfo[playerid][pAdmin] < 10)
return SendClientMessage(playerid, COLOR_GRAD1,
!"Вы не уполномочены использовать данную команду!"
);
PlayerHealth[targetid] = health;
antiwarn[playerid] += 8;
if(antiwarn[playerid] >= 30 && anti[playerid] == 0)
{
anti[playerid] = 1;
antiwarn[playerid] = 300;
}
format(stringer,sizeof(stringer),
"Анти-П**р: %s использовал /sethp на [ID'e: %d | HEALTH: %d]",
PlayerInfo[playerid][pNames], specid, health
);
ABroadCast(COLOR_WHITE,stringer,1);
SetPlayerHealthAC(targetid, health);
SendClientMessage(playerid, COLOR_WHITE, !"Уровень HP игроку установлен!");
return 1;
}