SA-MP Forums Archive
Map & Script issue - 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: Map & Script issue (/showthread.php?tid=310430)



Map & Script issue - Ghost252 - 12.01.2012

Well I'm deploying fences over an area in my server as I don't want players to get out of that area, but it's still possible to climb over fences if you use a vehicle, so I wanted to ask how I could make players unable to climb that fence-object, maybe making the player to fall right away or something, the model ID is 987 - it's an elecfencebar, I appreciate any helpful reply about it and I use MTA for mapping btw.


Re: Map & Script issue - JamesC - 12.01.2012

SetPlayerWorldBounds


Re: Map & Script issue - Ghost252 - 12.01.2012

Thanks James but that area isn't exact in coordinates, what I mean is it's a big area - a whole city, and the fences aren't ordered in direct lines but they go from side to side to side and block different kind of areas, if I was setting these coords then it'd make players unable to go to different spots I want them to go to, the fences aren't going straight, I need something more exact/specific if ya' got my point - not a circle but something complex.


Re: Map & Script issue - JamesC - 14.01.2012

You could use IsPointInPolygon by RyDeR` and check for when the player isn't in the polygon. If you find that the player is not in the polygon, teleport him to the nearest point that is in the polygon. However, it'll be quite a lot of hassle to define the points of the polygon. If I were you, I'd make the polygon as simple as possible.


Re: Map & Script issue - Ghost252 - 14.01.2012

Ok thank you, I'll work on it.