[HELP] Command
#1

pawn Код:
if(strcmp(cmd, "/gotols", true) == 0)
    {
    if(AdminDuty[playerid] == 1 || PlayerInfo[playerid][pAdmin] < 1337)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2)
            {
                if (GetPlayerState(playerid) == 2)
                {
                    new tmpcar = GetPlayerVehicleID(playerid);
                    SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
                    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                }
                else
                {
                    SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
                }
                SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported !");
                SetPlayerInterior(playerid,0);
                PlayerInfo[playerid][pInt] = 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
            }
        }
    }
    else
     {
        SendClientMessage(playerid, COLOR_GREY, "* You must by duty. Type /aod");
        return 1;
     }
        return 1;
    }
I tried to make less than 1337 admin not be obliged to use /aod
I did well above? If is a admin > 1337 he must type the command /aod to use the /gotols?
Reply
#2

Soo could you explain what is the problem you're experiencing?
Reply
#3

Also there is no need for a variable like this:
Quote:

new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);

As GetPlayerVehicle returns an integer it would also work like this:
Quote:

SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3);

Reply
#4

I'm sorry, wrong category!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)