28.01.2017, 17:23
Hello, i have a command /akill
Until now works perfect, but after i change a color have a bug
Screenshot: http://imgur.com/lqct2Wq
I dont understand, the code seems perfect(ignor size of string, i make to be sure)
Код:
CMD:akill(playerid, params[])
{
LoginCheck(playerid);
LevelCheck(playerid, 6);
new
string[400],
reason[128],
id
;
if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "Use:/akill [playerid] [reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Player not connected.");
if(APlayerData[playerid][PlayerLevel] < APlayerData[id][PlayerLevel]) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on higher admin.");
SetPlayerHealth(id, 0.0);
format(string, sizeof(string), "Jucatorul %s a fost omorat de adminul %s[ID:%d] (Motiv: %s)", pName(id), id, pName(playerid), playerid, reason);
SendClientMessageToAll(-1, string);
return 1;
}
Screenshot: http://imgur.com/lqct2Wq
I dont understand, the code seems perfect(ignor size of string, i make to be sure)


