Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: rww on Jul 10, 2015, 12:19 PM

Title: InPoly Problem.
Post by: rww on Jul 10, 2015, 12:19 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2Fkd3mli.png&hash=5a980ef01d382cf7bed4d9c5da3777e6fc0c3d9d)

I did with this -> http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=405.msg1293#msg1293
But it turned out, that teleport me in some places on center of area.

So how to use InPoly correctly?

This is script:

if (!InPoly(p.Pos.x,p.Pos.y,-1781.23,-85.4932,-1586.86,-85.4932,-1781.23,-305.329,-1586.86,-305.329)) PosDMM4(p);
where:

NW: -1781.23,-85.4932
NE: -1586.86,-85.4932
SW: -1781.23,-305.329
SE: -1586.86,-305.329
Title: Re: InPoly Problem.
Post by: Thijn on Jul 10, 2015, 05:21 PM
Why not use WorldBounds?
Title: Re: InPoly Problem.
Post by: rww on Jul 10, 2015, 05:37 PM
WorldBounds for all, i need for player or add worldbound for player, like a LU ( http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Functions/Players/SetBoundaries )
Title: Re: InPoly Problem.
Post by: Thijn on Jul 10, 2015, 06:10 PM
In that case try switching SW and SE coords.
Title: Re: InPoly Problem.
Post by: rww on Jul 10, 2015, 06:20 PM
Works ;)