03.02.2013, 17:09
When a player is kicked, it closes the connection of the player being kicked before it shows the reason.
Anyone know how to make it show why the player was kicked to them before they're kicked?
Anyone know how to make it show why the player was kicked to them before they're kicked?
pawn Код:
CMD:kick(playerid, params[])
{
if(pInfo[playerid][Admin]>0)
{
new str[128],reason[64],id;
if(sscanf(params,"ds[64]",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid playerid!");
format(str,sizeof(str),"Staff member %s kicked %s for %s.",GetName(playerid),GetName2(id),reason);
SendClientMessageToAll(COLOR_RED,str);
printf("%s",str);
Kick(id);
}
return 1;
}