27.11.2011, 04:41
Here you go its fixed
pawn Код:
COMMAND:kick(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
if(PlayerInfo[playerid][pAdmin] <= 2)
{
new adminname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],otherplayerid, reason[128];
GetPlayerName(otherplayerid,pname,sizeof(pname));
GetPlayerName(playerid,adminname,sizeof(adminname));
if(sscanf(params, "uz", otherplayerid, reason))
SendClientMessage(playerid, 0xFFFFFFFF, "/kick [playerid/name] [reason]");
else if(otherplayerid == INVALID_PLAYER_ID)
SendClientMessage(playerid, 0xFFFFFFFF, "This player is not connected");
else
{
new string[32];
format(string, sizeof(string), "Admin %s kicked %s | Reason: %s",adminname,pname, reason);
SendClientMessageToAll(0xFFFFFFFF,string);
Kick(otherplayerid);
}
}
else
{
SendClientMessage(playerid, 0xAAAAAAAA, "You are not admin or the required level.");
}
return 1;
}