Reason
#4

pawn Код:
CMD:kick(playerid, params[])
{
     new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id, reason, string[128];
     if(GetPVarInt(playerid, "Admin") != 1) return 0;
     if(sscanf(params, "ui", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /kick [playerid] [reason]");
     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
     GetPlayerName(id, targetname, MAX_PLAYER_NAME);
     if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected!");
     Kick(id);
     format(string, 128, "Administrator %s(%d) kicked player: %i Reason: %i", name, playerid, targetname, reason);
     SendClientMessageToAll(-1, string);
     format(string, 128, "You kicked player: %s(%d) reason: %i", targetname, id, reason);
     SendClientMessage(playerid, -1, string);
     return 1;
}
NOT TESTED
Reply


Messages In This Thread
Reason - by Tomer!.$ - 28.04.2012, 06:54
Re: Reason - by Twisted_Insane - 28.04.2012, 06:58
Re: Reason - by Tomer!.$ - 28.04.2012, 07:04
Re: Reason - by James Coral - 28.04.2012, 07:06
Re: Reason - by Tomer!.$ - 28.04.2012, 07:11
Re: Reason - by James Coral - 28.04.2012, 07:12
Re: Reason - by Tomer!.$ - 28.04.2012, 07:17
Re: Reason - by James Coral - 28.04.2012, 07:18

Forum Jump:


Users browsing this thread: 2 Guest(s)