InRangeOfPoint Help [+rep]
#1

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.
Reply
#2

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.
Reply
#3

I feel retarded now, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)