18.09.2011, 19:59
this is Kick Command (zcmd+sscanf2)
My Problem is whene i kick someone , for an example i kick id 2 for Lag , the reason shown is : La , so we can't see all the word,also for spawnkill , Reason :Sp (we can't see spawnkill) THANX FOR HELPING
PHP код:
COMMAND:kick(playerid,params[])
{
new playerid2,PlayerName[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
new tmp[256], Index, str[49], reason[32];
tmp = strtok(params,Index), playerid2 = strval(tmp);
GetPlayerName(playerid2,on,sizeof(on));
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
if(Account[playerid][Level] < 2) return SendClientMessage(playerid,Yellow,"You need to be level 2 to use this command!");
if (sscanf(params, "us", playerid2,reason)) return SendClientMessage(playerid, Yellow, "Usage: /kick id reason");
if(!IsPlayerConnected(playerid2))return SendClientMessage(playerid,Yellow,"Player is not connected!");
format(str,sizeof(str),"Admin %s has kicked %s [Reason: %s]",PlayerName,on,reason);
SendClientMessageToAll(Blue,str);
Kick(playerid2);
return 1;
}