SA-MP Forums Archive
InRangeOfPoint Help [+rep] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: InRangeOfPoint Help [+rep] (/showthread.php?tid=326672)



InRangeOfPoint Help [+rep] - Jack.7331 - 18.03.2012

So I was recently coding a VIP locker, and found out I could use the command anywhere in the interior, not near the point I specified, this is the code.
pawn Code:
CMD:locker(playerid, params[]) {
    if (!IsPlayerInRangeOfPoint(playerid, 3, 770.6819,-77.5974,1000.6563) && GetPlayerInterior(playerid) == 7)
    ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Locker Room.","Health Kit\t(Free)\nArmour\t(5)\nColt.45\t(4)\nDesertEagle\t(6)","Purchase","Exit");
    return 1;
}
There are no errors, either.


Re: InRangeOfPoint Help [+rep] - antonio112 - 18.03.2012

pawn Code:
CMD:locker(playerid, params[]) {
    if (IsPlayerInRangeOfPoint(playerid, 3, 770.6819,-77.5974,1000.6563) && GetPlayerInterior(playerid) == 7)
           ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Locker Room.","Health Kit\t(Free)\nArmour\t(5)\nColt.45\t(4)\nDesertEagle\t(6)","Purchase","Exit");
    return 1;
}
All you had to do was to delete "!". "!" means is not. So, in your case, player IS NOT in range of point.


Re: InRangeOfPoint Help [+rep] - Jack.7331 - 18.03.2012

I feel retarded now, thanks.