Admin commands.
#2

pawn Код:
cmd(goto, playerid, params[])
{
    new ID, Float:X, Float:Y, Float:Z; // So we save the positions in floats.
    if(sscanf(params,"u", ID)) return SendClientMessage(playerid, -1, "/goto [playerid]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin"); //Change IsPlayerAdmin to your admin system.
    GetPlayerPos(ID, X, Y, Z);
    SetPlayerPos(playerid, X+1, Y, Z);
    return 1;
}
pawn Код:
cmd(kick, playerid, params[])
{
    new ID;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin");
    if(sscanf(params,"u", ID)) return SendClientMessage(playerid, -1, "/kick [ID]");
    Kick(ID);
    return 1;
}
From this you should be able to learn how to make /ban and /gethere.

Also IsPlayerAdmin checks if a player is a rcon admin, so change it to your admin system.
Reply


Messages In This Thread
Admin commands. - by Blunt - 25.02.2012, 13:32
Re: Admin commands. - by JhnzRep - 25.02.2012, 14:13
Re: Admin commands. - by Smally - 25.02.2012, 15:33
Re: Admin commands. - by emokidx - 25.02.2012, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)