03.05.2010, 14:32
It works, you can see it by doing this:
or removing the whole IsPlayerInRangeOfPoint
if(IsPlayerInRangeOfPoint(playerid, Range, X,Y,Z)) so it means that If you are in some position with range, then the thing works what you are trying to do.
For example: if(IsPlayerInRangeOfPoint(playerid, 50, 0,0,3)) Means that if you are in 50(meters) from position 0 0 3, your thing does its thing, else it wont.
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SECONDARY_ATTACK) { if(IsPlayerInRangeOfPoint(playerid, 10000, -1106.2183,-299.7328,74.5391)) { SetPlayerPos(playerid,2221.8914,1983.8129,26.2993); } } }
if(IsPlayerInRangeOfPoint(playerid, Range, X,Y,Z)) so it means that If you are in some position with range, then the thing works what you are trying to do.
For example: if(IsPlayerInRangeOfPoint(playerid, 50, 0,0,3)) Means that if you are in 50(meters) from position 0 0 3, your thing does its thing, else it wont.