05.02.2012, 09:54
Under the OnPlayerUpdate callback you do this.
================================================== =============
================================================== =============
This checks if the player is in range of a point. You would put the object coordinates here.
This moves the object only if the player is in range of it.
So it should look like this.
Basically, this is what it is saying.
"If a player is in range of this point, then move this object."
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,range,x,y,z))
{
MoveObject(objectid,x,y,z,speed)
}
return 1;
}
================================================== =============
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,range,x,y,z))
pawn Код:
MoveObject(objectid,x,y,z,speed)
So it should look like this.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,range,x,y,z))
{
MoveObject(objectid,x,y,z,speed)
}
return 1;
}
"If a player is in range of this point, then move this object."