SA-MP Forums Archive
[Tutorial] Basic - Get GangZone Center - 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)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Basic - Get GangZone Center (/showthread.php?tid=481197)



Basic - Get GangZone Center - SeV_ - 14.12.2013

Hey Members.

Code:
pawn Код:
new                            Float:CenterX,
                                 Float:CenterY;

       CenterX = (zMinX+zMaxX) / 2;
     CenterY = (zMinY+zMaxY) / 2;
   
   
///Exemple:

GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);


zMinX: 1248.011
zMinY: 2072.804
zMaxX: 1439.348
zMaxY:  2204.319


CenterX = (1248.011+1439.348) / 2;
     CenterY = (2072.804+2204.319) / 2;

//Create a MapIcon in Gangzone Center

CreateDynamicMapIcon(CenterX, CenterY,0.0, 19, -1, -1, -1,-1,100.0);// Cord. Z Value = 0.0
Sorry for bad english. and bad explanation


Re: Basic - Get GangZone Center - Deduction - 14.12.2013

Nice, I learnt how to half things to find out the centre of something...
Maybe you should add a little bit more comments explaining what everything does for the less knowledgeable on the forums. Its good, but could be improved.


Re: Basic - Get GangZone Center - SeV_ - 14.12.2013

Thanks... but i not have a Good English for explain


Re: Basic - Get GangZone Center - arakuta - 14.12.2013

Nice work, basic mathematics


Re: Basic - Get GangZone Center - SeV_ - 14.12.2013

Basic - Get GangZone Center

Basic!