Quote:
Originally Posted by VincentDunn
Make sure the actual gate is under OnGameModeInit().
you are not filling your if statement correctly. You are basically saying
Код:
If GateClosed the move this gate.
You need to add a return value on the if statement.
So like this.
pawn Код:
CMD:gate(playerid, params[]) { if(GateClosed == true){ if(IsPlayerInRangeOfPoint(playerid, 15.0, 1620.69995117, -1882.40002441, 15.30000019)){ GateClosed = false; MoveObject(Gate, 1620.69995117, 69995117, -1882.40002441, 3.0, 0.00000000, 0.00000000, 179.99993896); return 1; } } else { if(GateClosed == false) { if(IsPlayerInRangeOfPoint(playerid, 15.0, 1620.69995117, -1882.40002441, 15.30000019)){ GateClosed = true; MoveObject(Gate, 1620.69995117, -1882.40002441, 15.30000019, 3.0, 0.0, 0.0, 179.99993896); return 1; } } return 1; }
|
Thanks. But when I do /gate to open it, the gate continues to go south and not under the ground. But when I do /gate to close it, it goes back to the correct position. Am I doing anything else wrong? Xd