Split Float; Dynamic Zone
#2

You must save the first pair of coordinates in a global array, or a PVar. In this case I'd prefer a PVar since only admins use this command probably, and in that case a global array would be 99% unused most of the time.

In the first step you can save the X and Y coord into a PVar like this:

Code:
SetPVarFloat(playerid, "ZoneCreateMinX", xc);
SetPVarFloat(playerid, "ZoneCreateMinY", yc);
In the second step you can get the coords with GetPVarFloat:

Code:
minx = GetPVarFloat(playerid, "ZoneCreateMinX");
miny = GetPVarFloat(playerid, "ZoneCreateMinY");
And use the coords from GetPlayerPos for MaxX and MaxY.

Z is not needed in most cases, but if you need it you can easily add that too.

Hope I got you right.
Reply


Messages In This Thread
Split Float; Dynamic Zone - by playstores - 02.11.2018, 14:08
Re: Split Float; Dynamic Zone - by NaS - 02.11.2018, 14:21
Re: Split Float; Dynamic Zone - by playstores - 02.11.2018, 14:49
Re: Split Float; Dynamic Zone - by NaS - 02.11.2018, 15:18
Re: Split Float; Dynamic Zone - by playstores - 02.11.2018, 16:01
Re: Split Float; Dynamic Zone - by TheToretto - 02.11.2018, 16:15

Forum Jump:


Users browsing this thread: 1 Guest(s)