can someone tech me make simple admin commands
#7

The same for ban just:
pawn Код:
CMD:ban(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: /ban [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 ban yourself.
    format(string, sizeof(string), "%s has been banned by Rcon Admin (Reason: %s)",pName, reason);
    SendClientMessageToAll(COLOR_YELLOW, string); // The yellow define will be up!
    Ban(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: 1 Guest(s)