I made a command, compiled fine, but IG it doesn't work -
Jaber_Brown - 09.03.2012
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
AW: I made a command, compiled fine, but IG it doesn't work -
VollTitte - 09.03.2012
try to delete return 1; and compile when not delete return 0; and try it then
Re : I made a command, compiled fine, but IG it doesn't work -
Jaber_Brown - 09.03.2012
Still ..
doesn't work
AW: I made a command, compiled fine, but IG it doesn't work -
VollTitte - 09.03.2012
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)
Re : I made a command, compiled fine, but IG it doesn't work -
Jaber_Brown - 09.03.2012
Still, it compiles without errors ,IG it says SERVER: Unknown command
Re : I made a command, compiled fine, but IG it doesn't work -
Jaber_Brown - 09.03.2012
P.S I Also have some ZCMD commands,
Re: I made a command, compiled fine, but IG it doesn't work -
coole210 - 09.03.2012
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
Re: I made a command, compiled fine, but IG it doesn't work -
Gangs_Rocks - 09.03.2012
No wait.
ZCMD is case sensitive. Make sure you have no cmds having capitals