I made a command, compiled fine, but IG it doesn't work
#1

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{//opening bracket
    if (strcmp("/open", cmdtext, true, 5) == 0) // The /open command
    {//opening bracket
        if(IsPlayerInRangeOfPoint(playerid, 7.0, 1812.3604,-1883.7068,13.5781))//Checking if the player in the range of the gate
           {//opening bracket
        MoveObject(rentalgate, 1811.69995117,-1893.80004883,12.39999962, 1);// Opening the gate
                SendClientMessage(playerid, 0xEF994300, "The gate has opened."); //Sending a message that gate opened
        }//closing bracket
        return 1;
    }//closing bracket
        if (strcmp("/close", cmdtext, true, 6) == 0)// The /close command
    {//opening bracket
        if(IsPlayerInRangeOfPoint(playerid, 7.0, 1812.3604,-1883.7068,13.5781))//Checking if the player in the range of the gate
        {//opening bracket
                  MoveObject(rentalgate, 1811.69995117,-1888.30004883,12.39999962, 1);// Moving the gate
              SendClientMessage(playerid, 0xEF994300, "The gate has closed.");//Sending a message to the one used the command
                }//closing bracket
        return 1;
    }//closing bracket
    return 0;
}//closing bracket

GM compiles fine , but IG when i type that cmd it says Unknown command
Reply
#2

try to delete return 1; and compile when not delete return 0; and try it then
Reply
#3

Still .. doesn't work
Reply
#4

try this 1811.69995117,-1888.30004883,12.39999962, 1 <<<< 1.0

So its

MoveObject(rentalgate, 1811.69995117,-1888.30004883,12.39999962, 1.0);

(change it by all MoveObejct)
Reply
#5

Still, it compiles without errors ,IG it says SERVER: Unknown command
Reply
#6

P.S I Also have some ZCMD commands,
Reply
#7

Is that your whole OnPlayerCommandText?

Is that an FS? If so, make sure it loads correctly.

ZCMD isn't compatible with OnPlayerCommandText, convert the command to ZCMD
Reply
#8

No wait.
ZCMD is case sensitive. Make sure you have no cmds having capitals
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)