SA-MP Forums Archive
Toll - 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: Toll (/showthread.php?tid=306167)



Toll - thimo - 25.12.2011

Ok so i made a toll and i want people to only be abled to enter it from ONE side the right road side... so i did this:
Код:
if(IsPlayerInRangeOfPoint(playerid, 7.5, ATollGates[TollGate][OpenX], ATollGates[TollGate][OpenY] + 7, ATollGates[TollGate][OpenZ]))
But this makes it only open from NORTH side.... like this:

By thimo144 at 2011-12-25
While i want it to open at THIS side too:

By thimo144 at 2011-12-25
Anyone idea? :S


Re: Toll - BMUK - 25.12.2011

Could use IsPlayerInArea


Re: Toll - thimo - 25.12.2011

Can u make that dynamic? :S if yes tell me how pl0x


Re: Toll - suhrab_mujeeb - 25.12.2011

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 15.0, ATollGates[TollGate][OpenX], ATollGates[TollGate][OpenY] + 7, ATollGates[TollGate][OpenZ]));
If doesn't work, try increasing the radius ( 15. 0 ).


Re: Toll - thimo - 25.12.2011

Well sushrab thats what i dont want then it is getting enterable from both sides i want only the right side...
This is what i made now but it doesnt work..
Код:
if(IsPlayerInArea(playerid, ATollGates[TollGate][OpenX],  ATollGates[TollGate][OpenX] + 5, ATollGates[TollGate][OpenY], ATollGates[TollGate][OpenY] + 5))
How to fix it? :S


Re: Toll - FireCat - 25.12.2011

You could check the facing angle :$
Or you could get other vars and make the range of point smaller.


Re: Toll - thimo - 25.12.2011

Quote:
Originally Posted by FireCat
Посмотреть сообщение
You could check the facing angle :$
Or you could get other vars and make the range of point smaller.
Any idea to do it with IsPlayerInarea?


Re: Toll - FireCat - 25.12.2011

Quote:
Originally Posted by thimo
Посмотреть сообщение
Any idea to do it with IsPlayerInarea?
I don't think that's a good idea, but you could give it a try!


Re: Toll - thimo - 25.12.2011

Quote:
Originally Posted by FireCat
Посмотреть сообщение
I don't think that's a good idea, but you could give it a try!
How? :P i've got this but... It doesnt seem to work:
Код:
if(IsPlayerInArea(playerid, ATollGates[TollGate][OpenX],  ATollGates[TollGate][OpenX] + 5, ATollGates[TollGate][OpenY], ATollGates[TollGate][OpenY] + 5))



Re: Toll - FireCat - 25.12.2011

Quote:
Originally Posted by thimo
Посмотреть сообщение
How? :P
Hehe I could do it for you, but I need the coords ^^.
Do you have any test server opened? :b