Moving Doors/gates.
#1

I have a command below to open a unity barrier.
Only taxi drivers can use this command.
The problem i'm seeing is, Only first 3 players can use this command, For rest it shows "SERVER: Unknown Command"
If there is any problem in the command, Please fix it and reply below the topic, thanks!
pawn Код:
if(strcmp(cmd, "/utgate", true) == 0)
    {
           sendername = NewPlayerName(playerid);
           GetPlayerSex(playerid);
           if(PlayerInfo[playerid][pJob] == 4)
            {
            if(IsPlayerInRangeOfPoint(playerid, 15, 1814.8854,-1890.8146,13.4141))
                {
                    SetTimer("UnityGateClose", 12000, 0);
                    ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,false,false,false,1000);
                    MoveObject(utgate, 1811.646484375,-1894.8720703125, 13.600885391235, 1.5, 0.00000000,0.7449951171875,269.99450683594);
                    if(PlayerInfo[playerid][pUMask] == 0)
                                {
                    format(string, sizeof(string), "*%s presses a button on %s watch and opens the Unity Barrier.", sendername,Gender[playerid]);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                    else if(PlayerInfo[playerid][pUMask] == 1)
                                {
                    format(string, sizeof(string), "*Unknown presses a button on %s watch and opens the Unity Barrier.",Gender[playerid]);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                }
            }
                   return 1;
                   }
Reply
#2

Anyone here who can help me with this?
Reply
#3

Is
pawn Код:
cmd = strtok(cmdtext,idx);
in your OnPlayerCommandText? Outside of a if(strcmp of course.
Reply
#4

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Is
pawn Код:
cmd = strtok(cmdtext,idx);
in your OnPlayerCommandText? Outside of a if(strcmp of course.
What do you mean?

pawn Код:
cmd = strtok(cmdtext,idx);
It's under OnPlayerCommandText.
Reply
#5

Please, I really need help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)