11.11.2013, 20:25
I have this command
but when I compile the compiler just gets filled with errors
PHP код:
CMD:gates(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, -1209.48816, -1071.85449, 123.64065) && PlayerInfo[playerid][Faction] == 1 || IsPlayerInRangeOfPoint(playerid, 15.0, -1209.48816, -1071.85449, 123.64065) && PlayerInfo[playerid][Faction] == 2) // Is Player within 15 meters of this gate?
{
if(MyGateIsOpen == false) // The gate is closed
{
MoveObject(impoundgate,-1209.48816, -1071.85449, 115.09575,2.0); // Open the gate
MyGateIsOpen = true;
}
else // Else the gate is open and we want it to close now
{
MoveObject(impoundgate,-1209.48816, -1071.85449, 130.83427,2); // Close the gate
MyGateIsOpen = false;
} else if(IsPlayerInRangeOfPoint(playerid, 15.0,1587.23071, -1637.87415, 14.68024) && PlayerInfo[playerid][Faction] == 1 || IsPlayerInRangeOfPoint(playerid,15.0,1587.23071, -1637.87415, 14.68024) && PlayerInfo[playerid][Faction] == 2){
if(pdGate == false) // The gate is closed
{
MoveObject(pdgate,1587.23071, -1637.87415, 9.06480,2.0); // Open the gate
pdGate = true;
}
else // Else the gate is open and we want it to close now
{
MoveObject(pdgate,1587.23071, -1637.87415, 14.68024,2); // Close the gate
pdGate = false;
}
else return SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command.");
return 1;
}