26.07.2012, 10:13
Do you want them to move up once a player is near them?
Here's a code so when you approach the gate it goes up so you can pass.
Here's a code so when you approach the gate it goes up so you can pass.
pawn Код:
new object; // Save here your object
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, object)
{
MoveObject(object, /*coordinates*/); // Coordinates for gate UP
}
else
{
MoveObject(object, /*coordinates*/); // Coordinates for gate DOWN
}
}