can someone tech me make simple admin commands
#6

OMFD:
pawn Код:
CMD:kick(playerid, parans[])
{
    new pName[MAX_PLAYER_NAME]; // Here we are defining the kicking's name
    GetPlayerName(playerid, pName, sizeof(pName));
    if(!IsPlayerAdmin(playerid)) return 0; // Checking if the player is rcon.
    new targetid, reason[64], string[128]; // targetid is also a pName
    if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_RED, "Usage: /kick [playerid/partofname] [reason]"); // here it tells the player to use /kick playerid reason or /kick partofname reason
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Player not connected or is yourself!"); // This is if the player is not connected, or you can't kick yourself.
    format(string, sizeof(string), "%s has been kicked by Rcon Admin (Reason: %s)",pName, reason);
    SendClientMessageToAll(COLOR_YELLOW, string); // The yellow define will be up!
    Kick(targetid);
  return 1;
}
Reply


Messages In This Thread
can someone tech me make simple admin commands - by Dr.Ghost - 13.03.2011, 09:35
Re: can someone tech me make simple admin commands - by xRyder - 13.03.2011, 09:43
Re: can someone tech me make simple admin commands - by Dr.Ghost - 13.03.2011, 09:50
Re: can someone tech me make simple admin commands - by xRyder - 13.03.2011, 09:53
Re: can someone tech me make simple admin commands - by Dr.Ghost - 13.03.2011, 10:30
Re: can someone tech me make simple admin commands - by bestr32 - 16.03.2011, 17:36
Re: can someone tech me make simple admin commands - by bestr32 - 16.03.2011, 17:44

Forum Jump:


Users browsing this thread: 2 Guest(s)