Not working - IsPlayerInRangePoint
#1

So guys i made a /fishing command.
but how i can make in 2 rangepoints ? beacuse this code is not working
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 3, FishingAreaPos[0], FishingAreaPos[1], FishingAreaPos[2] || FishingAreaPos2[0], FishingAreaPos2[1], FishingAreaPos2[2]))
        return SCM(playerid, COLOR_WHITE, " {777777}You are not near fishing area.");
Reply
#2

Instead of this, make it that players can fish whenever they are near water :P You're using InPlayerInRangeOfPoint in wrong way here dude:

PHP код:
!IsPlayerInRangeOfPoint(playerid3FishingAreaPos[0], FishingAreaPos[1], FishingAreaPos[2] || FishingAreaPos2[0], FishingAreaPos2[1], FishingAreaPos2[2]) 
should be two different IsPlayerInRangeOfPoint statements!

PHP код:
!IsPlayerInRangeOfPoint(playerid3.0FishingAreaPos[0], FishingAreaPos[1], FishingAreaPos[2])
!
IsPlayerInRangeOfPoint(playerid3.0FishingAreaPos2[0], FishingAreaPos2[1], FishingAreaPos2[2]) 
And please for the sake of optimization, don't type integer in place of floats, you just need to put a .0 after your number!!
Reply
#3

But if you plan on having more fishing points in the future I suggest making an array and then looping through it instead of having lots of functions.
Reply
#4

not working also i tried this

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3, FishingAreaPos[0], FishingAreaPos[1], FishingAreaPos[2]) ||
    IsPlayerInRangeOfPoint(playerid, 3, 2121.92, -75.6603, 1.3575))
        return SendClientMessage(playerid, COLRED, "[Error] {AAAAAA}You must be near the fishing area.");
Reply
#5

Fixed.
forget to put !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)