28.04.2012, 06:54
Well, for somereason when I kick someone it just doesn't write the reason, the reason is just empty.
PHP код:
CMD:kick(playerid, cmdtext[], reason[])
{
new
idx = 0,
idx2 = 0,
tmp[256],
tmp2[256],
string[128];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(reason, idx2);
new id = strval(tmp);
if(GetPVarInt(playerid, "Admin") != 1) return 0;
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE:] /kick [playerid] [reason]");
format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", GetName(id), GetName(playerid), tmp2);
SendClientMessageToAll(COLOR_RED, string);
Kick(id);
return 1;
}