09.03.2012, 13:43
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