GangZone creating - 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: GangZone creating (
/showthread.php?tid=433349)
GangZone creating -
JaKe Elite - 27.04.2013
I got problem with creating GangZone.
It worked fine unlike previous topics that i made.
But the problem is.
It is hard to get the min and max coordinates when there is gangzone next to the gangzone that you will make (or surrounded by gangzone and there is empty space).
Making the new gangzone collide in surrounded gangzones or next to the gangzone.
Is there any possibilities to avoid this?
My mouse is hard to control when marking the min and max on map.
Re: GangZone creating -
Lordzy - 27.04.2013
You need to get those positions through edges, that's what I normally do.
pawn Код:
/*
ymax
|----------|
| |
xmin| | xmax
| |
|----------|
ymin
//From wiki sa-mp
To avoid colliding, you can use global variables for gangzones so that the specified functions for a gangzone works for it only. If you're thinking of the visual (Radar), you might be needed to be careful while setting the coords.
Or maybe creating a gangzone according to range may work:
(I probably use this if I'm lazy to get all those coords)
pawn Код:
CMD:gangzone(playerid, params[])
{
new Float:xp, Float:yp, Float:zp;
GetPlayerPos(playerid, xp, yp, zp);
#pragma unused zp
new range = 100;
new Gangzone = GangZoneCreate(xp-range, yp-range, xp+range, yp+range);
GangZoneShowForAll(Gangzone, 0xFF0000FF);
return 1;
}