Admin Commands
#2

its my cmd

for exmaple



pawn Код:
CMD:get(playerid,params[])
{
    if(pInfo[playerid][pLogged] == 1)
    {
        if(pInfo[playerid][pAdminLevel] >= 2)
        {
            new targetid;
            if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /get [playerid]");
            if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");

            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            SetPlayerPos(targetid, x+1, y+1, z);

            if(IsPlayerInAnyVehicle(targetid))
            {
                SetVehiclePos(GetPlayerVehicleID(targetid),x,y,z);
            }
        }
        else {
            SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
        }
    }
    else if(pInfo[playerid][pLogged] == 0)
    {
        SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
        printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
        Kick(playerid);
    }
    return 1;
}

if(pinfo[playerid][pAdminLevel] >= 2)

you should something like that
Reply


Messages In This Thread
Admin Commands - by efrim123 - 19.08.2013, 10:13
Re: Admin Commands - by JeaSon - 19.08.2013, 10:17
Re: Admin Commands - by efrim123 - 19.08.2013, 10:37
Re: Admin Commands - by Giroud12 - 19.08.2013, 10:42
Re: Admin Commands - by efrim123 - 19.08.2013, 10:46
Re: Admin Commands - by zaider - 19.08.2013, 10:47
Re: Admin Commands - by efrim123 - 19.08.2013, 10:52
Re: Admin Commands - by zaider - 19.08.2013, 10:53
Re: Admin Commands - by zaider - 19.08.2013, 10:56
Re: Admin Commands - by efrim123 - 19.08.2013, 10:59

Forum Jump:


Users browsing this thread: 2 Guest(s)