Help! Help! System gate
#4

Under the OnPlayerUpdate callback you do this.
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))
This checks if the player is in range of a point. You would put the object coordinates here.
pawn Код:
MoveObject(objectid,x,y,z,speed)
This moves the object only if the player is in range of it.
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;
}
Basically, this is what it is saying.
"If a player is in range of this point, then move this object."
Reply


Messages In This Thread
Help! Help! System gate - by Esmaelo - 05.02.2012, 02:09
Re: Help! Help! System gate - by ReneG - 05.02.2012, 02:42
Re : Help! Help! System gate - by Esmaelo - 05.02.2012, 04:50
Re: Help! Help! System gate - by ReneG - 05.02.2012, 09:54
Re : Help! Help! System gate - by Esmaelo - 05.02.2012, 17:25
Re: Help! Help! System gate - by [ABK]Antonio - 05.02.2012, 17:27
AW: Help! Help! System gate - by Tigerkiller - 05.02.2012, 17:31
Re : Help! Help! System gate - by Esmaelo - 06.02.2012, 19:04

Forum Jump:


Users browsing this thread: 2 Guest(s)