30.05.2014, 16:40
A global timer that loops through connected players (foreach) and checks if each player is in range will be much better than using OPU callback.
If you want to do the same thing when the player is in range of one of those:
If you want to check for different points and do different things:
If you want to do the same thing when the player is in range of one of those:
pawn Код:
// an example:
if (IsPlayerInRangeOfPoint(playerid, range, x, y, z)
|| IsPlayerInRangeOfPoint(playerid, range, x, y, z)
|| IsPlayerInRangeOfPoint(playerid, range, x, y, z)
|| IsPlayerInRangeOfPoint(playerid, range, x, y, z)
|| IsPlayerInRangeOfPoint(playerid, range, x, y, z))
{
// code..
}
pawn Код:
// an example:
if (IsPlayerInRangeOfPoint(playerid, range, x, y, z))
{
// code..
}
else if (IsPlayerInRangeOfPoint(playerid, range, x, y, z))
{
// code..
}
else if (IsPlayerInRangeOfPoint(playerid, range, x, y, z))
{
// code..
}