GangZoneCreate

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:43, 7 December 2016
OstGot (Talk | contribs)

← Previous diff
Revision as of 18:07, 18 March 2017
OstGot (Talk | contribs)
(Draft version of the scheme)
Next diff →
Line 18: Line 18:
{{note|This function merely CREATES the gangzone, you must use [[GangZoneShowForPlayer]] or [[GangZoneShowForAll]] to show it.}} {{note|This function merely CREATES the gangzone, you must use [[GangZoneShowForPlayer]] or [[GangZoneShowForAll]] to show it.}}
 +{{Example}}
<pawn> <pawn>
new gangzone; new gangzone;
gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319); gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
</pawn> </pawn>
 +
 +<code>
 + -------------* - MaxX, MaxY
 + | |
 + | gangzone |
 + | center |
 + | |
 + MinX, MinY - *-------------
 +</code>
{{RelatedFunctions}} {{RelatedFunctions}}

Revision as of 18:07, 18 March 2017



Description:

Create a gangzone (colored radar area).


Parameters:
(Float:minx, Float:miny, Float:maxx, Float:maxy)
minxThe X coordinate for the west side of the gangzone.
minyThe Y coordinate for the south side of the gangzone.
maxxThe X coordinate for the east side of the gangzone.
maxyThe Y coordinate for the north side of the gangzone.


Return Values:

The ID of the created zone, returns -1 if not created


Image:32px-Circle-style-warning.png

Important
Notes

  • There is a limit of 1024 gangzones.
  • Putting the parameters in the wrong order results in glitchy behavior.


Image:32px-Ambox_warning_orange.png

Note

This function merely CREATES the gangzone, you must use GangZoneShowForPlayer or GangZoneShowForAll to show it.


Example Usage:

new gangzone;
gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);

             -------------* - MaxX, MaxY
             |            |
             |  gangzone  |
             |   center   |
             |            |
MinX, MinY - *-------------

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages