25.05.2017, 08:47
Those examples are wrong, if you do it how RxErT does it you'll find yourself with errors.
This one below will check both and if the player is at one or the other will send the message.
This one will check both and if BOTH are met it will show the message.
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
EDIT: Vince's example is much better.
This one below will check both and if the player is at one or the other will send the message.
Код:
if (IsPlayerInRangeOfPoint(playerid, 7.0, pos1) || IsPlayerInRangeOfPoint(playerid, 7.0, pos2)) { SendClientMessage(playerid,0xFFFFFFFF,"You are near the stadium entrance!"); }
Код:
if (IsPlayerInRangeOfPoint(playerid, 7.0, pos1) && IsPlayerInRangeOfPoint(playerid, 7.0, pos2)) { SendClientMessage(playerid,0xFFFFFFFF,"You are near the stadium entrance!"); }
EDIT: Vince's example is much better.