05.02.2018, 02:25
(
Последний раз редактировалось Gammix; 28.04.2018 в 23:51.
)

Just include this and your gangzones will have numbers and borders to them automatically. You don't need to touch/change anything in your script.
Though, you can modify and do stuff with gangzones, borders and numbers separately.
Credits to beijind for the gangzone number making algorithm, thread link.
His include is a bit untidy and bad, and the main thing is, this library auto converts gangzones to new ones!
Functions:
PHP код:
/*
** HOOKED FUNCTIONS
*/
GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy, number = -1, Float:bordersize = GANGZONE_DEFAULT_BORDER_SIZE, Float:numbersize = GANGZONE_DEFAULT_NUMBER_SIZE);
GangZoneDestroy(gangzone);
GangZoneShowForPlayer(playerid, gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR);
GangZoneShowForAll(gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR);
GangZoneHideForPlayer(playerid, gangzone);
GangZoneHideForAll(gangzone);
GangZoneFlashForPlayer(playerid, gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00);
GangZoneFlashForAll(gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00);
GangZoneStopFlashForPlayer(playerid, gangzone, bool:mainzone = true, bool:border = true, bool:number = true);
GangZoneStopFlashForAll(gangzone, bool:mainzone = true, bool:border = true, bool:number = true)
Macros:
You can pre-define these before inclusion with your own values.
PHP код:
#define GANGZONE_DEFAULT_BORDER_SIZE 2.0 // default thickness of borders
#define GANGZONE_DEFAULT_NUMBER_SIZE 1.0 // default thickness of numbers
#define GANGZONE_DEFAULT_BORDER_COLOR 0xAA // default color of borders (applied when using GangZoneShowFor(Player/All) function
#define GANGZONE_DEFAULT_NUMBER_COLOR 0xAA // default color of numbers (applied when using GangZoneShowFor(Player/All) function
https://github.com/Agneese-Saini/SA-.../gangzones.inc