Admin commands.
#1

Can someone help me with some admin commands, I'm using ZCMD for faster, less laggy processing.

I need the /kick, /goto, /gethere and /ban commands.

If someone could do this for me, i'd be hugely greatful.

THANK YOU.
Reply
#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
#3

It's
pawn Код:
CMD:goto(playerid,params[])

//not
CMD(goto,playerid,params[])
Reply
#4

pawn Код:
CMD:commandname(playerid, params[])
COMMAND:commandname(playerid, params[])
CMD(commandname,playerid, params[])
COMMAND(commandname,playerid, params[])
these four can be used as far as i know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)