Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Kid_Buu on Jun 10, 2018, 10:10 PM

Title: I need the InPoly of the sunshine
Post by: Kid_Buu on Jun 10, 2018, 10:10 PM
Hi, i need the InPoly of the sunshine, someone could give it to me?

I do not know how to use it :-\
Title: Re: I need the InPoly of the sunshine
Post by: D4rkR420R on Jun 10, 2018, 11:19 PM
There's a diagram of polygons below in this site, following by an example. https://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/InPoly
Title: Re: I need the InPoly of the sunshine
Post by: Magneto on Jun 11, 2018, 02:17 PM
Quote from: Kid_Buu on Jun 10, 2018, 10:10 PMHi, i need the InPoly of the sunshine, someone could give it to me?

I do not know how to use it :-\

Use this:
            checkpoly = InPoly( Pos.x, Pos.y, -1018.44, -878.276, -1003.84, -864.357, -1031.79, -834.803, -1044.99, -848.48);
   
    if( !checkpoly ) I_MSG( "You need to be at sunshine....", player );
Title: Re: I need the InPoly of the sunshine
Post by: NicusorN5 on Jun 11, 2018, 06:57 PM
It's easier to use :
DistanceFromPoint(x1,y1,x2,y2)