Red marker dialog menu
#9

Quote:
Originally Posted by Gammix
Посмотреть сообщение
It's pretty simple, i already gave you the link to IsPlayerInRangeOfPoint. So simply check if the player is near to the coordinates and create a checkpoint.
For example:
pawn Код:
public OnPlayerPosChange(playerid, Float:newx, Float:newy, Float:newz, Float:oldx, Float:oldy, Float:oldz)
{
    if(IsPlayerInRangeOfPoint(playerid, 50.0, x, y, z))
    {
        SetPlayerCheckpoint(playerid, x, y, z);
    }
    return 1;
}
NOTE: x, y, z are the coordinates of your checkpoint.

Now when the player is in range of the point (x, y, z), a checkpoint appears.
To show dialog:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
    {
        ShowPlayerDialog(playerid, ...);
    }
    return 1;
}
The callback is self explanatory.
Thank you! +rep
Reply


Messages In This Thread
Red marker dialog menu - by DavidSparks - 20.06.2015, 09:36
Re: Red marker dialog menu - by Rodri99 - 20.06.2015, 09:38
Re: Red marker dialog menu - by UltraScripter - 20.06.2015, 09:39
Re: Red marker dialog menu - by Gammix - 20.06.2015, 09:42
Re: Red marker dialog menu - by Rodri99 - 20.06.2015, 09:42
Re: Red marker dialog menu - by DavidSparks - 20.06.2015, 10:07
Re: Red marker dialog menu - by Rodri99 - 20.06.2015, 10:09
Re: Red marker dialog menu - by Gammix - 20.06.2015, 10:18
Re: Red marker dialog menu - by DavidSparks - 20.06.2015, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)