Problem with zcmd
#8

pawn Код:
CMD:kick(playerid, params[])
{
       new id, reason[128], string[128], playername[MAX_PLAYER_NAME], playid[MAX_PLAYER_NAME];

       if(sscanf(params, "us[127]", id, reason)){SendClientMessage(playerid, COLOR_RED, "Correct usage: /kick [playerid] [Reason]");}
       else if(!IsPlayerConnected(id)){SendClientMessage(playerid, COLOR_RED, "The selected player is not connected.");}
       else if(PlayerInfo[id][pAdmin] > 0) {SendClientMessage(playerid, COLOR_RED, "The selected player is an admin.");}
       else{
       GetPlayerName(id, playid, sizeof(playid));
       GetPlayerName(playerid, playername, sizeof(playername));
       format(string, sizeof(string),"[SERVER] %s has been kicked by %s. [Reason]: %s", playid, playername, reason[127]);
       SendClientMessageToAll(COLOR_WHITE, string);
       Kick(id);
       }
       return 1;
       }
Note:
In the last samp update, the messages before kick will not get sent to the player, so you'd have to do a costume one
For more info click here
Reply


Messages In This Thread
Problem with zcmd - by Mystique - 20.02.2013, 17:31
Re: Problem with zcmd - by JamesS - 20.02.2013, 17:33
Re: Problem with zcmd - by ryansheilds - 20.02.2013, 17:34
Re: Problem with zcmd - by batonsa - 20.02.2013, 17:34
Re: Problem with zcmd - by Mystique - 20.02.2013, 17:37
Re: Problem with zcmd - by batonsa - 20.02.2013, 17:38
Re: Problem with zcmd - by ryansheilds - 20.02.2013, 17:40
Re: Problem with zcmd - by DaRk_RaiN - 20.02.2013, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)