Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
रिक्त स्थान छिपाएँ
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
टेक्स्ट शैलियां
दिखावट बदलें
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
8 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
340 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
620 लाइनें
सभी को कॉपी करें
369 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
683 लाइनें
सभी को कॉपी करें
#if defined gangzones_included
#if defined gangzones_included
#endinput
#endinput
#endif
#endif
#define gangzones_included
#define gangzones_included
/**************************************/
/**************************************/
// gangzones.inc - v2.2 - Last Updated: 28 April, 2018 - By Gammix & beijind
// gangzones.inc - v2.2 - Last Updated: 28 April, 2018 - By Gammix & beijind
/***************************************/
/***************************************/
#if !defined GANGZONE_DEFAULT_BORDER_SIZE
#if !defined GANGZONE_DEFAULT_BORDER_SIZE
#define GANGZONE_DEFAULT_BORDER_SIZE 2.0
#define GANGZONE_DEFAULT_BORDER_SIZE 2.0
#endif
#endif
#if !defined GANGZONE_DEFAULT_NUMBER_SIZE
#if !defined GANGZONE_DEFAULT_NUMBER_SIZE
#define GANGZONE_DEFAULT_NUMBER_SIZE 1.0
#define GANGZONE_DEFAULT_NUMBER_SIZE 1.0
#endif
#endif
#if !defined GANGZONE_DEFAULT_BORDER_COLOR
#if !defined GANGZONE_DEFAULT_BORDER_COLOR
#define GANGZONE_DEFAULT_BORDER_COLOR 0xAA
#define GANGZONE_DEFAULT_BORDER_COLOR 0xAA
#endif
#endif
#if !defined GANGZONE_DEFAULT_NUMBER_COLOR
#if !defined GANGZONE_DEFAULT_NUMBER_COLOR
#define GANGZONE_DEFAULT_NUMBER_COLOR 0xAA
#define GANGZONE_DEFAULT_NUMBER_COLOR 0xAA
#endif
#endif
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
static GangZone@MainZone[MAX_GANG_ZONES] = {
-1
, ...};
#define MAX_GANGZONE_BORDER_SLOTS 4
static GangZone@Border[MAX_GANG_ZONES][
4
];
#define MAX_GANGZONE_NUMBER_SLOTS 5
static GangZone@Number1[MAX_GANG_ZONES][
5
];
static GangZone@Number2[MAX_GANG_ZONES][
5];
static GangZone@MainZone[MAX_GANG_ZONES] = {
INVALID_GANG_ZONE
, ...};
static GangZone@Border[MAX_GANG_ZONES][
MAX_GANGZONE_BORDER_SLOTS
];
static GangZone@Number1[MAX_GANG_ZONES][
MAX_GANGZONE_NUMBER_SLOTS
];
static GangZone@Number2[MAX_GANG_ZONES][
MAX_GANGZONE_NUMBER_SLOTS];
public OnGameModeInit()
{
new i, j;
for(i = 0; i < MAX_GANG_ZONES; ++i) {
for(j = 0; j < MAX_GANGZONE_NUMBER_SLOTS; ++j) {
if(j < MAX_GANGZONE_BORDER_SLOTS) {
GangZone@Border[i][j] = INVALID_GANG_ZONE;
}
GangZone@Number1[i][j] = INVALID_GANG_ZONE;
GangZone@Number2[i][j] = INVALID_GANG_ZONE;
}
}
return CallLocalFunction("GangZone_OnGameModeInit", "");
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit GangZone_OnGameModeInit
forward OnGameModeInit();
static GangZone_CreateBorder(dest[], Float:minx, Float:miny, Float:maxx, Float:maxy, Float:bordersize) {
static GangZone_CreateBorder(dest[], Float:minx, Float:miny, Float:maxx, Float:maxy, Float:bordersize) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[0] = GangZoneCreate(minx - bordersize, miny + bordersize, minx + bordersize, maxy - bordersize);
dest[0] = GangZoneCreate(minx - bordersize, miny + bordersize, minx + bordersize, maxy - bordersize);
dest[1] = GangZoneCreate(minx - bordersize, maxy - bordersize, maxx + bordersize, maxy + bordersize);
dest[1] = GangZoneCreate(minx - bordersize, maxy - bordersize, maxx + bordersize, maxy + bordersize);
dest[2] = GangZoneCreate(maxx - bordersize, miny + bordersize, maxx + bordersize, maxy - bordersize);
dest[2] = GangZoneCreate(maxx - bordersize, miny + bordersize, maxx + bordersize, maxy - bordersize);
dest[3] = GangZoneCreate(minx - bordersize, miny - bordersize, maxx + bordersize, miny + bordersize);
dest[3] = GangZoneCreate(minx - bordersize, miny - bordersize, maxx + bordersize, miny + bordersize);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
for (new i = 0; i <
4
; i++) {
for (new i = 0; i <
MAX_GANGZONE_BORDER_SLOTS
; i++) {
if (dest[i] ==
-1
) {
if (dest[i] ==
INVALID_GANG_ZONE
) {
// If one border failed to create (random out of slots), then destroy all!
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
for (i = 0; i <
4
; i++) {
for (i = 0; i <
MAX_GANGZONE_BORDER_SLOTS
; i++) {
GangZoneDestroy(dest[i]);
GangZoneDestroy(dest[i]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[i] =
-1
;
dest[i] =
INVALID_GANG_ZONE
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
}
}
return 4;
return 4;
}
}
static GangZone_CreateNumber(dest[], number, Float:centpos_x, Float:centpos_y, Float:numbersize) {
static GangZone_CreateNumber(dest[], number, Float:centpos_x, Float:centpos_y, Float:numbersize) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (number < '0' || number > '9') {
if (number < '0' || number > '9') {
return 0;
return 0;
}
}
static const Float:LETTER_STROKE = 3.5;
static const Float:LETTER_STROKE = 3.5;
static const Float:LETTER_XSQUASH = 0.7;
static const Float:LETTER_XSQUASH = 0.7;
new ret = 0;
new ret = 0;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
switch (number) {
switch (number) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '0': {
case '0': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_x = (20.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (20.0 * numbersize * LETTER_XSQUASH);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down of 0
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down of 0
dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Up of 0
dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Up of 0
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left of 0
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left of 0
dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Right of 0
dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Right of 0
ret = 4;
ret = 4;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '1': {
case '1': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
dest[0] = GangZoneCreate((centpos_x - stroke), (centpos_y - distance_y - stroke),(centpos_x + stroke), (centpos_y + distance_y + stroke));
dest[0] = GangZoneCreate((centpos_x - stroke), (centpos_y - distance_y - stroke),(centpos_x + stroke), (centpos_y + distance_y + stroke));
ret = 1;
ret = 1;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '2': {
case '2': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[1] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)),(centpos_y + stroke), (centpos_x + distance_x), (centpos_y + distance_y - stroke)); // Right Stick
dest[1] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)),(centpos_y + stroke), (centpos_x + distance_x), (centpos_y + distance_y - stroke)); // Right Stick
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y + stroke), (centpos_x - distance_x + (2 * stroke)),(centpos_y - stroke)); // Left Stick
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y + stroke), (centpos_x - distance_x + (2 * stroke)),(centpos_y - stroke)); // Left Stick
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[4] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
dest[4] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
ret = 5;
ret = 5;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '3': {
case '3': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)),(centpos_y + distance_y + stroke)); // Stick
dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)),(centpos_y + distance_y + stroke)); // Stick
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
ret = 4;
ret = 4;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '4': {
case '4': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y), (centpos_x - distance_x + (2 * stroke)), (centpos_y + stroke)); // Left
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y), (centpos_x - distance_x + (2 * stroke)), (centpos_y + stroke)); // Left
dest[1] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke));// Middle
dest[1] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke));// Middle
dest[2] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y)); // Stick
dest[2] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y)); // Stick
ret = 3;
ret = 3;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '5': {
case '5': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up
dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick
dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + stroke)); // Middle
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + stroke)); // Middle
dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Right Stick
dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Right Stick
dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down
dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down
ret = 5;
ret = 5;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '6': {
case '6': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[1] = GangZoneCreate((centpos_x - distance_x - (2 * stroke)), (centpos_y + distance_y + stroke), (centpos_x - distance_x), (centpos_y - distance_y - stroke)); // Main Left Stick
dest[1] = GangZoneCreate((centpos_x - distance_x - (2 * stroke)), (centpos_y + distance_y + stroke), (centpos_x - distance_x), (centpos_y - distance_y - stroke)); // Main Left Stick
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
dest[4] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)), (centpos_y - distance_y + stroke), (centpos_x + distance_x), (centpos_y - stroke)); // Right small stick
dest[4] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)), (centpos_y - distance_y + stroke), (centpos_x + distance_x), (centpos_y - stroke)); // Right small stick
ret = 5;
ret = 5;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '7': {
case '7': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (15.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (15.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Stick of 7
dest[0] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Stick of 7
dest[1] = GangZoneCreate((centpos_x - distance_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up of 7
dest[1] = GangZoneCreate((centpos_x - distance_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up of 7
ret = 2;
ret = 2;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '8': {
case '8': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke)); // Left stick
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke)); // Left stick
dest[1] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y - stroke)); // Right stick
dest[1] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y - stroke)); // Right stick
dest[2] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke)); // Up
dest[2] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke)); // Up
dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + stroke)); // Center
dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + stroke)); // Center
dest[4] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke)); // Down
dest[4] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke)); // Down
ret = 5;
ret = 5;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
case '9': {
case '9': {
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:stroke = (LETTER_STROKE * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_y = (20.0 * numbersize);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH);
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), centpos_y, (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick
dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), centpos_y, (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick
dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y + stroke)); // Right Stick
dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y + stroke)); // Right Stick
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up
dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), centpos_y, (centpos_x + distance_x), (centpos_y + stroke + stroke)); // Middle
dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), centpos_y, (centpos_x + distance_x), (centpos_y + stroke + stroke)); // Middle
dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down
ret = 5;
ret = 5;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
}
}
for (new i = 0; i < ret; i++) {
for (new i = 0; i < ret; i++) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (dest[i] ==
-1
) {
if (dest[i] ==
INVALID_GANG_ZONE
) {
for (i = 0; i < ret; i++) {
for (i = 0; i < ret; i++) {
GangZoneDestroy(dest[i]);
GangZoneDestroy(dest[i]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
dest[i] =
-1
;
dest[i] =
INVALID_GANG_ZONE
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
}
}
return ret;
return ret;
}
}
stock GangZone_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, number = -1, Float:bordersize = GANGZONE_DEFAULT_BORDER_SIZE, Float:numbersize = GANGZONE_DEFAULT_NUMBER_SIZE) {
stock GangZone_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, number = -1, Float:bordersize = GANGZONE_DEFAULT_BORDER_SIZE, Float:numbersize = GANGZONE_DEFAULT_NUMBER_SIZE) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new index =
-1
;
new index =
INVALID_GANG_ZONE
;
for (new i = 0; i < MAX_GANG_ZONES; i++) {
for (new i = 0; i < MAX_GANG_ZONES; i++) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[i] ==
-1
) {
if (GangZone@MainZone[i] ==
INVALID_GANG_ZONE
) {
index = i;
index = i;
break;
break;
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (index ==
-1
) {
if (index ==
INVALID_GANG_ZONE
) {
return
-1
;
return
INVALID_GANG_ZONE
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZone@MainZone[index] = GangZoneCreate(minx, miny, maxx, maxy);
GangZone@MainZone[index] = GangZoneCreate(minx, miny, maxx, maxy);
if (GangZone@MainZone[index] ==
-1
) {
if (GangZone@MainZone[index] ==
INVALID_GANG_ZONE
) {
return
-1;
return
INVALID_GANG_ZONE;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZone@Border[index][0] =
-1
;
GangZone@Border[index][0] =
INVALID_GANG_ZONE
;
GangZone@Border[index][1] =
-1
;
GangZone@Border[index][1] =
INVALID_GANG_ZONE
;
GangZone@Border[index][2] =
-1
;
GangZone@Border[index][2] =
INVALID_GANG_ZONE
;
GangZone@Border[index][3] =
-1
;
GangZone@Border[index][3] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZone@Number1[index][0] =
-1
;
GangZone@Number1[index][0] =
INVALID_GANG_ZONE
;
GangZone@Number1[index][1] =
-1
;
GangZone@Number1[index][1] =
INVALID_GANG_ZONE
;
GangZone@Number1[index][2] =
-1;
GangZone@Number1[index][2] =
INVALID_GANG_ZONE;
GangZone@Number1[index][3] =
-1;
GangZone@Number1[index][3] =
INVALID_GANG_ZONE;
GangZone@Number1[index][4] =
-1
;
GangZone@Number1[index][4] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZone@Number2[index][0] =
-1;
GangZone@Number2[index][0] =
INVALID_GANG_ZONE;
GangZone@Number2[index][1] =
-1;
GangZone@Number2[index][1] =
INVALID_GANG_ZONE;
GangZone@Number2[index][2] =
-1;
GangZone@Number2[index][2] =
INVALID_GANG_ZONE;
GangZone@Number2[index][3] =
-1;
GangZone@Number2[index][3] =
INVALID_GANG_ZONE;
GangZone@Number2[index][4] =
-1
;
GangZone@Number2[index][4] =
INVALID_GANG_ZONE
;
if (bordersize != 0.0) {
if (bordersize != 0.0) {
if (GangZone_CreateBorder(GangZone@Border[index], minx, miny, maxx, maxy, bordersize) == 0) {
if (GangZone_CreateBorder(GangZone@Border[index], minx, miny, maxx, maxy, bordersize) == 0) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@MainZone[index]);
GangZoneDestroy(GangZone@MainZone[index]);
GangZone@MainZone[index] =
-1
;
GangZone@MainZone[index] =
INVALID_GANG_ZONE
;
return
-1
;
return
INVALID_GANG_ZONE
;
}
}
}
}
if (numbersize != 0.0) {
if (numbersize != 0.0) {
if (number == -1) {
if (number == -1) {
number = (index % 100);
number = (index % 100);
}
}
if (number >= 0 && number <= 9) {
if (number >= 0 && number <= 9) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new Float:centpos_x = ((minx + maxx) / 2);
new Float:centpos_x = ((minx + maxx) / 2);
new Float:centpos_y = ((miny + maxy) / 2);
new Float:centpos_y = ((miny + maxy) / 2);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new chars[2];
new chars[2];
format(chars, sizeof(chars), "%i", number);
format(chars, sizeof(chars), "%i", number);
if (GangZone_CreateNumber(GangZone@Number1[index], chars[0], centpos_x, centpos_y, numbersize) == 0) {
if (GangZone_CreateNumber(GangZone@Number1[index], chars[0], centpos_x, centpos_y, numbersize) == 0) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@MainZone[index]);
GangZoneDestroy(GangZone@MainZone[index]);
GangZone@MainZone[index] =
-1
;
GangZone@MainZone[index] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@Border[index][0]);
for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneDestroy
(GangZone@Border[index][
1]);
if
(GangZone@Border[index][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Border[index][
2
]);
GangZoneDestroy(GangZone@Border[index][
i
]);
GangZoneDestroy(
GangZone@Border[index][
3]);
GangZone@Border[index][
i] = INVALID_GANG_ZONE;
return -1
;
}
}
return INVALID_GANG_ZONE
;
}
}
}
}
else if (number >= 10 && number <= 99) {
else if (number >= 10 && number <= 99) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
const Float:NUMBER_DISTANCE = 25.0;
const Float:NUMBER_DISTANCE = 25.0;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new Float:centpos_x = ((minx + maxx) / 2);
new Float:centpos_x = ((minx + maxx) / 2);
new Float:centpos_y = ((miny + maxy) / 2);
new Float:centpos_y = ((miny + maxy) / 2);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new chars[3];
new chars[3];
format(chars, sizeof(chars), "%i", number);
format(chars, sizeof(chars), "%i", number);
new numZones = GangZone_CreateNumber(GangZone@Number1[index], chars[0], (centpos_x - (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize);
new numZones = GangZone_CreateNumber(GangZone@Number1[index], chars[0], (centpos_x - (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize);
if (numZones == 0) {
if (numZones == 0) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@MainZone[index]);
GangZoneDestroy(GangZone@MainZone[index]);
GangZone@MainZone[index] =
-1
;
GangZone@MainZone[index] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@Border[index][0]);
for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneDestroy
(GangZone@Border[index][
1]);
if
(GangZone@Border[index][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Border[index][
2
]);
GangZoneDestroy(GangZone@Border[index][
i
]);
GangZoneDestroy(
GangZone@Border[index][
3]);
GangZone@Border[index][
i] = INVALID_GANG_ZONE;
return -1
;
}
}
return INVALID_GANG_ZONE
;
}
}
if (GangZone_CreateNumber(GangZone@Number2[index], chars[1], (centpos_x + (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize) == 0) {
if (GangZone_CreateNumber(GangZone@Number2[index], chars[1], (centpos_x + (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize) == 0) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@MainZone[index]);
GangZoneDestroy(GangZone@MainZone[index]);
GangZone@MainZone[index] =
-1
;
GangZone@MainZone[index] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@Border[index][0]);
for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneDestroy
(GangZone@Border[index][
1]);
if
(GangZone@Border[index][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Border[index][
2
]);
GangZoneDestroy(GangZone@Border[index][
i
]);
GangZoneDestroy(
GangZone@Border[index][
3]);
GangZone@Border[index][
i] = INVALID_GANG_ZONE;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
for (new i = 0; i < numZones; i++) {
for (new i = 0; i < numZones; i++) {
GangZoneDestroy(GangZone@Number1[index][i]);
if(GangZone@Number1[index][i] != INVALID_GANG_ZONE) {
}
GangZoneDestroy(GangZone@Number1[index][i]);
return
-1
;
GangZone@Number1[index][i] = INVALID_GANG_ZONE;
}
}
return
INVALID_GANG_ZONE
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
else {
else {
GangZoneDestroy(GangZone@MainZone[index]);
GangZoneDestroy(GangZone@MainZone[index]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZone@MainZone[index] =
-1
;
GangZone@MainZone[index] =
INVALID_GANG_ZONE
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@Border[index][0]);
for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneDestroy
(GangZone@Border[index][
1]);
if
(GangZone@Border[index][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Border[index][
2
]);
GangZoneDestroy(GangZone@Border[index][
i
]);
GangZoneDestroy(
GangZone@Border[index][
3]);
GangZone@Border[index][
i] = INVALID_GANG_ZONE;
return -1
;
}
}
return INVALID_GANG_ZONE
;
}
}
}
}
return index;
return index;
}
}
#if defined _ALS_GangZoneCreate
#if defined _ALS_GangZoneCreate
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneCreate
#undef GangZoneCreate
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneCreate
#define _ALS_GangZoneCreate
#endif
#endif
#define GangZoneCreate GangZone_Create
#define GangZoneCreate GangZone_Create
stock GangZone_Destroy(gangzone) {
stock GangZone_Destroy(gangzone) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@MainZone[gangzone]);
static i;
GangZone@MainZone[gangzone] = -1;
GangZoneDestroy(GangZone@Border[gangzone][0]);
GangZoneDestroy(GangZone@Border[gangzone][1]);
GangZoneDestroy(GangZone@Border[gangzone][2]);
GangZoneDestroy(GangZone@Border[gangzone][3]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@
Number1[gangzone][0]);
GangZoneDestroy(GangZone@
Main
Zone
[gangzone]
);
GangZoneDestroy(Gang
Zone
@Number1
[gangzone]
[1]
);
GangZone
@Main
Zone
[gangzone]
= INVALID_GANG_ZONE;
GangZone
Destroy(Gang
Zone
@Number1
[gangzone]
[2]);
GangZoneDestroy(GangZone@Number1[gangzone][3]);
GangZoneDestroy(GangZone@Number1[gangzone][4]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneDestroy(GangZone@
Number2
[gangzone][
0
]);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneDestroy
(GangZone@Number
2
[gangzone][
1]);
if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Number
2
[gangzone][
2
]);
GangZoneDestroy(GangZone@
Border
[gangzone][
i
]);
GangZoneDestroy
(GangZone@Number2[gangzone][
3]);
GangZone@Border[gangzone][i] = INVALID_GANG_ZONE;
GangZoneDestroy(GangZone@Number2[gangzone][
4
]);
}
}
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
if
(GangZone@Number
1
[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Number
1
[gangzone][
i
]);
GangZone@Number1[gangzone][i] = INVALID_GANG_ZONE;
}
if
(GangZone@Number2[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneDestroy(GangZone@Number2[gangzone][
i
]);
GangZone@Number2[gangzone][i] = INVALID_GANG_ZONE;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 1;
return 1;
}
}
#if defined _ALS_GangZoneDestroy
#if defined _ALS_GangZoneDestroy
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneDestroy
#undef GangZoneDestroy
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneDestroy
#define _ALS_GangZoneDestroy
#endif
#endif
#define GangZoneDestroy GangZone_Destroy
#define GangZoneDestroy GangZone_Destroy
stock GangZone_ShowForPlayer(playerid, gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) {
stock GangZone_ShowForPlayer(playerid, gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForPlayer(playerid, GangZone@MainZone[gangzone], color);
static i;
GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][0], bordercolor);
GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][1], bordercolor);
GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][2], bordercolor);
GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][3], bordercolor);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][0], numbercolor);
GangZoneShowForPlayer(playerid, GangZone@
MainZone
[gangzone]
, color
);
GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][1], numbercolor);
GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][2], numbercolor);
GangZoneShowForPlayer(playerid, GangZone@
Number1[gangzone][3], numbercolor);
GangZoneShowForPlayer(playerid, GangZone@Number1
[gangzone]
[4], numbercolor
);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForPlayer(playerid, GangZone@
Number2
[gangzone][
0
],
numb
ercolor);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneShowForPlayer(playerid,
GangZone@Number
2
[gangzone][
1], numbercolor);
if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) {
GangZoneShowForPlayer(playerid, GangZone@Number
2
[gangzone][
2
], numbercolor);
GangZoneShowForPlayer(playerid, GangZone@
Border
[gangzone][
i
],
bord
ercolor);
GangZoneShowForPlayer(playerid,
GangZone@Number2[gangzone][
3], numbercolor);
}
GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][
4
], numbercolor);
}
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
if(
GangZone@Number
1
[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneShowForPlayer(playerid, GangZone@Number
1
[gangzone][
i
], numbercolor);
}
if(
GangZone@Number2[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][
i
], numbercolor);
}
}
return 1;
return 1;
}
}
#if defined _ALS_GangZoneShowForPlayer
#if defined _ALS_GangZoneShowForPlayer
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneShowForPlayer
#undef GangZoneShowForPlayer
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneShowForPlayer
#define _ALS_GangZoneShowForPlayer
#endif
#endif
#define GangZoneShowForPlayer GangZone_ShowForPlayer
#define GangZoneShowForPlayer GangZone_ShowForPlayer
stock GangZone_ShowForAll(gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) {
stock GangZone_ShowForAll(gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForAll(GangZone@MainZone[gangzone], color)
;
static i
;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForAll(GangZone@Border[gangzone][0], bordercolor);
GangZoneShowForAll(GangZone@
Main
Zone
[gangzone]
, color
);
GangZoneShowForAll(GangZone@Border[gangzone][1], bordercolor);
GangZoneShowForAll(GangZone@
Border[gangzone][2], bordercolor);
GangZoneShowForAll(Gang
Zone
@Border
[gangzone]
[3], bordercolor
);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForAll(GangZone@Number1[gangzone][0], numbercolor);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneShowForAll(GangZone@Number1[gangzone][1], numbercolor);
if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) {
GangZoneShowForAll(GangZone@Number1[gangzone][2], numbercolor);
GangZoneShowForAll(GangZone@
Border
[gangzone][
i
],
bord
ercolor);
GangZoneShowForAll(GangZone@
Number1
[gangzone][
3
],
numb
ercolor);
}
GangZoneShowForAll(GangZone@Number1[gangzone][4], numbercolor);
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneShowForAll
(GangZone@Number
2
[gangzone][
0], numbercolor);
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneShowForAll(GangZone@Number
2
[gangzone][
1
], numbercolor);
if
(GangZone@Number
1
[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneShowForAll
(GangZone@Number2[gangzone][
2], numbercolor);
GangZoneShowForAll(GangZone@Number
1
[gangzone][
i
], numbercolor);
GangZoneShowForAll(GangZone@Number2[gangzone][
3
], numbercolor);
}
GangZoneShowForAll(GangZone@Number2[gangzone][4], numbercolor);
if
(GangZone@Number2[gangzone][
i] != INVALID_GANG_ZONE) {
GangZoneShowForAll(GangZone@Number2[gangzone][
i
], numbercolor);
}
}
return 1;
return 1;
}
}
#if defined _ALS_GangZoneShowForAll
#if defined _ALS_GangZoneShowForAll
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneShowForAll
#undef GangZoneShowForAll
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneShowForAll
#define _ALS_GangZoneShowForAll
#endif
#endif
#define GangZoneShowForAll GangZone_ShowForAll
#define GangZoneShowForAll GangZone_ShowForAll
stock GangZone_HideForPlayer(playerid, gangzone) {
stock GangZone_HideForPlayer(playerid, gangzone) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneHideForPlayer(playerid, GangZone@MainZone[gangzone]);
static i;
GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][0]);
GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][1]);
GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][2]);
GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][3]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneHideForPlayer(playerid, GangZone@
Number1[gangzone][0]);
GangZoneHideForPlayer(playerid, GangZone@
MainZone
[gangzone]
);
GangZoneHideForPlayer(playerid, GangZone@Number1
[gangzone]
[1]
);
GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][2]);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneHideForPlayer(playerid, GangZone@
Number1
[gangzone][
3
]);
GangZoneHideForPlayer(playerid, GangZone@
Border
[gangzone][
i
]);
GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][4]);
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][0]);
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][1]);
GangZoneHideForPlayer(playerid, GangZone@Number
1
[gangzone][
i
]);
GangZoneHideForPlayer(playerid, GangZone@Number
2
[gangzone][
2
]);
GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][
i
]);
GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][
3
]);
}
GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][4]);
return 1;
return 1;
}
}
#if defined _ALS_GangZoneHideForPlayer
#if defined _ALS_GangZoneHideForPlayer
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneHideForPlayer
#undef GangZoneHideForPlayer
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneHideForPlayer
#define _ALS_GangZoneHideForPlayer
#endif
#endif
#define GangZoneHideForPlayer GangZone_HideForPlayer
#define GangZoneHideForPlayer GangZone_HideForPlayer
stock GangZone_HideForAll(gangzone) {
stock GangZone_HideForAll(gangzone) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneHideForAll(GangZone@MainZone[gangzone]);
static i;
GangZoneHideForAll(GangZone@Border[gangzone][0]);
GangZoneHideForAll(GangZone@Border[gangzone][1]);
GangZoneHideForAll(GangZone@Border[gangzone][2]);
GangZoneHideForAll(GangZone@Border[gangzone][3]);
GangZoneHideForAll(GangZone@Number1[gangzone][0]);
GangZoneHideForAll(GangZone@Number1[gangzone][1]);
GangZoneHideForAll(GangZone@Number1[gangzone][2]);
GangZoneHideForAll(GangZone@Number1[gangzone][3]);
GangZoneHideForAll(GangZone@Number1[gangzone][4]);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneHideForAll(GangZone@
Number2[gangzone][0]);
GangZoneHideForAll(GangZone@
MainZone
[gangzone]
);
GangZoneHideForAll(GangZone@Number2
[gangzone]
[1]
);
GangZoneHideForAll(GangZone@Number2[gangzone][2]);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneHideForAll(GangZone@Number2[gangzone][3]);
GangZoneHideForAll(GangZone@
Border
[gangzone][
i
]);
GangZoneHideForAll(GangZone@
Number2
[gangzone][
4
]);
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneHideForAll(GangZone@Number1[gangzone][i]);
GangZoneHideForAll(GangZone@Number2[gangzone][i]);
}
return 1;
return 1;
}
}
#if defined _ALS_GangZoneHideForAll
#if defined _ALS_GangZoneHideForAll
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneHideForAll
#undef GangZoneHideForAll
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneHideForAll
#define _ALS_GangZoneHideForAll
#endif
#endif
#define GangZoneHideForAll GangZone_HideForAll
#define GangZoneHideForAll GangZone_HideForAll
stock GangZone_FlashForPlayer(playerid, gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) {
stock GangZone_FlashForPlayer(playerid, gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForPlayer(playerid, GangZone@MainZone[gangzone], flashcolor);
static i;
GangZoneFlashForPlayer(playerid, GangZone@MainZone[gangzone], flashcolor);
if (borderflashcolor != 0x00) {
if (borderflashcolor != 0x00) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][0], borderflashcolor);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][1], borderflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][
i
], borderflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][
2
], borderflashcolor);
}
GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][3], borderflashcolor);
}
}
if (numberflashcolor != 0x00) {
if (numberflashcolor != 0x00) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][0], numberflashcolor);
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][1], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][
i
], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][2], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][
i
], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][3], numberflashcolor);
}
GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][
4], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][0
], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][1], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][
2], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][3
], numberflashcolor);
GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][4], numberflashcolor);
}
}
return 1;
return 1;
}
}
#if defined _ALS_GangZoneFlashForPlayer
#if defined _ALS_GangZoneFlashForPlayer
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneFlashForPlayer
#undef GangZoneFlashForPlayer
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneFlashForPlayer
#define _ALS_GangZoneFlashForPlayer
#endif
#endif
#define GangZoneFlashForPlayer GangZone_FlashForPlayer
#define GangZoneFlashForPlayer GangZone_FlashForPlayer
stock GangZone_FlashForAll(gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) {
stock GangZone_FlashForAll(gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForAll(GangZone@MainZone[gangzone], flashcolor);
static i;
GangZoneFlashForAll(GangZone@MainZone[gangzone], flashcolor);
if (borderflashcolor != 0x00) {
if (borderflashcolor != 0x00) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForAll(GangZone@Border[gangzone][0], borderflashcolor);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneFlashForAll(GangZone@Border[gangzone][1], borderflashcolor);
GangZoneFlashForAll(GangZone@Border[gangzone][
i
], borderflashcolor);
GangZoneFlashForAll(GangZone@Border[gangzone][
2
], borderflashcolor);
}
GangZoneFlashForAll(GangZone@Border[gangzone][3], borderflashcolor);
}
}
if (numberflashcolor != 0x00) {
if (numberflashcolor != 0x00) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneFlashForAll(GangZone@Number1[gangzone][0], numberflashcolor);
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneFlashForAll(GangZone@Number1[gangzone][1], numberflashcolor);
GangZoneFlashForAll(GangZone@Number1[gangzone][
i
], numberflashcolor);
GangZoneFlashForAll(GangZone@Number1[gangzone][2], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][
i
], numberflashcolor);
GangZoneFlashForAll(GangZone@Number1[gangzone][3], numberflashcolor);
}
GangZoneFlashForAll(GangZone@Number1[gangzone][
4], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][0], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][1
], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][2], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][
3
], numberflashcolor);
GangZoneFlashForAll(GangZone@Number2[gangzone][4], numberflashcolor);
}
}
return 1;
return 1;
}
}
#if defined _ALS_GangZoneFlashForAll
#if defined _ALS_GangZoneFlashForAll
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#undef GangZoneFlashForAll
#undef GangZoneFlashForAll
#else
#else
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define _ALS_GangZoneFlashForAll
#define _ALS_GangZoneFlashForAll
#endif
#endif
#define GangZoneFlashForAll GangZone_FlashForAll
#define GangZoneFlashForAll GangZone_FlashForAll
stock GangZone_StopFlashForPlayer(playerid, gangzone, bool:mainzone = true, bool:border = true, bool:number = true) {
stock GangZone_StopFlashForPlayer(playerid, gangzone, bool:mainzone = true, bool:border = true, bool:number = true) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GangZone@MainZone[gangzone] ==
-1
) {
if (GangZone@MainZone[gangzone] ==
INVALID_GANG_ZONE
) {
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
static i;
if (mainzone) {
if (mainzone) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneStopFlashForPlayer(playerid, GangZone@MainZone[gangzone]);
GangZoneStopFlashForPlayer(playerid, GangZone@MainZone[gangzone]);
}
}
if (border) {
if (border) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][0]);
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][1]);
GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][
i
]);
GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][
2
]);
}
GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][3]);
}
}
if (number) {
if (number) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GangZoneStopF
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][i]);
GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][i]);
}
}
return 1;
}
#if defined _ALS_GangZoneStopFlashForPlayer
#undef GangZoneStopFlashForPlayer
#else
#define _ALS_GangZoneStopFlashForPlayer
#endif
#define GangZoneStopFlashForPlayer GangZone_StopFlashForPlayer
stock GangZone_StopFlashForAll(gangzone, bool:mainzone = true, bool:border = true, bool:number = true) {
if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) {
return 0;
}
if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) {
return 0;
}
static i;
if (mainzone) {
GangZoneStopFlashForAll(GangZone@MainZone[gangzone]);
}
if (border) {
for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) {
GangZoneStopFlashForAll(GangZone@Border[gangzone][i]);
}
}
if (number) {
for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) {
GangZoneStopFlashForAll(GangZone@Number1[gangzone][i]);
GangZoneStopFlashForAll(GangZone@Number2[gangzone][i]);
}
}
return 1;
}
#if defined _ALS_GangZoneStopFlashForAll
#undef GangZoneStopFlashForAll
#else
#define _ALS_GangZoneStopFlashForAll
#endif
#define GangZoneStopFlashForAll GangZone_StopFlashForAll
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
#if defined gangzones_included #endinput #endif #define gangzones_included /**************************************/ // gangzones.inc - v2.2 - Last Updated: 28 April, 2018 - By Gammix & beijind /***************************************/ #if !defined GANGZONE_DEFAULT_BORDER_SIZE #define GANGZONE_DEFAULT_BORDER_SIZE 2.0 #endif #if !defined GANGZONE_DEFAULT_NUMBER_SIZE #define GANGZONE_DEFAULT_NUMBER_SIZE 1.0 #endif #if !defined GANGZONE_DEFAULT_BORDER_COLOR #define GANGZONE_DEFAULT_BORDER_COLOR 0xAA #endif #if !defined GANGZONE_DEFAULT_NUMBER_COLOR #define GANGZONE_DEFAULT_NUMBER_COLOR 0xAA #endif static GangZone@MainZone[MAX_GANG_ZONES] = {-1, ...}; static GangZone@Border[MAX_GANG_ZONES][4]; static GangZone@Number1[MAX_GANG_ZONES][5]; static GangZone@Number2[MAX_GANG_ZONES][5]; static GangZone_CreateBorder(dest[], Float:minx, Float:miny, Float:maxx, Float:maxy, Float:bordersize) { dest[0] = GangZoneCreate(minx - bordersize, miny + bordersize, minx + bordersize, maxy - bordersize); dest[1] = GangZoneCreate(minx - bordersize, maxy - bordersize, maxx + bordersize, maxy + bordersize); dest[2] = GangZoneCreate(maxx - bordersize, miny + bordersize, maxx + bordersize, maxy - bordersize); dest[3] = GangZoneCreate(minx - bordersize, miny - bordersize, maxx + bordersize, miny + bordersize); for (new i = 0; i < 4; i++) { if (dest[i] == -1) { for (i = 0; i < 4; i++) { GangZoneDestroy(dest[i]); dest[i] = -1; } return 0; } } return 4; } static GangZone_CreateNumber(dest[], number, Float:centpos_x, Float:centpos_y, Float:numbersize) { if (number < '0' || number > '9') { return 0; } static const Float:LETTER_STROKE = 3.5; static const Float:LETTER_XSQUASH = 0.7; new ret = 0; switch (number) { case '0': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_x = (20.0 * numbersize * LETTER_XSQUASH); new Float:distance_y = (20.0 * numbersize); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down of 0 dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Up of 0 dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left of 0 dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Right of 0 ret = 4; } case '1': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); dest[0] = GangZoneCreate((centpos_x - stroke), (centpos_y - distance_y - stroke),(centpos_x + stroke), (centpos_y + distance_y + stroke)); ret = 1; } case '2': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)),(centpos_y + stroke), (centpos_x + distance_x), (centpos_y + distance_y - stroke)); // Right Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y + stroke), (centpos_x - distance_x + (2 * stroke)),(centpos_y - stroke)); // Left Stick dest[4] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '3': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)),(centpos_y + distance_y + stroke)); // Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 4; } case '4': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y), (centpos_x - distance_x + (2 * stroke)), (centpos_y + stroke)); // Left dest[1] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke));// Middle dest[2] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y)); // Stick ret = 3; } case '5': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Right Stick dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '6': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x - distance_x - (2 * stroke)), (centpos_y + distance_y + stroke), (centpos_x - distance_x), (centpos_y - distance_y - stroke)); // Main Left Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down dest[4] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)), (centpos_y - distance_y + stroke), (centpos_x + distance_x), (centpos_y - stroke)); // Right small stick ret = 5; } case '7': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (15.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Stick of 7 dest[1] = GangZoneCreate((centpos_x - distance_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up of 7 ret = 2; } case '8': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke)); // Left stick dest[1] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y - stroke)); // Right stick dest[2] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke)); // Up dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + stroke)); // Center dest[4] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '9': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), centpos_y, (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y + stroke)); // Right Stick dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), centpos_y, (centpos_x + distance_x), (centpos_y + stroke + stroke)); // Middle dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 5; } } for (new i = 0; i < ret; i++) { if (dest[i] == -1) { for (i = 0; i < ret; i++) { GangZoneDestroy(dest[i]); dest[i] = -1; } return 0; } } return ret; } stock GangZone_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, number = -1, Float:bordersize = GANGZONE_DEFAULT_BORDER_SIZE, Float:numbersize = GANGZONE_DEFAULT_NUMBER_SIZE) { new index = -1; for (new i = 0; i < MAX_GANG_ZONES; i++) { if (GangZone@MainZone[i] == -1) { index = i; break; } } if (index == -1) { return -1; } GangZone@MainZone[index] = GangZoneCreate(minx, miny, maxx, maxy); if (GangZone@MainZone[index] == -1) { return -1; } GangZone@Border[index][0] = -1; GangZone@Border[index][1] = -1; GangZone@Border[index][2] = -1; GangZone@Border[index][3] = -1; GangZone@Number1[index][0] = -1; GangZone@Number1[index][1] = -1; GangZone@Number1[index][2] = -1; GangZone@Number1[index][3] = -1; GangZone@Number1[index][4] = -1; GangZone@Number2[index][0] = -1; GangZone@Number2[index][1] = -1; GangZone@Number2[index][2] = -1; GangZone@Number2[index][3] = -1; GangZone@Number2[index][4] = -1; if (bordersize != 0.0) { if (GangZone_CreateBorder(GangZone@Border[index], minx, miny, maxx, maxy, bordersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = -1; return -1; } } if (numbersize != 0.0) { if (number == -1) { number = (index % 100); } if (number >= 0 && number <= 9) { new Float:centpos_x = ((minx + maxx) / 2); new Float:centpos_y = ((miny + maxy) / 2); new chars[2]; format(chars, sizeof(chars), "%i", number); if (GangZone_CreateNumber(GangZone@Number1[index], chars[0], centpos_x, centpos_y, numbersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = -1; GangZoneDestroy(GangZone@Border[index][0]); GangZoneDestroy(GangZone@Border[index][1]); GangZoneDestroy(GangZone@Border[index][2]); GangZoneDestroy(GangZone@Border[index][3]); return -1; } } else if (number >= 10 && number <= 99) { const Float:NUMBER_DISTANCE = 25.0; new Float:centpos_x = ((minx + maxx) / 2); new Float:centpos_y = ((miny + maxy) / 2); new chars[3]; format(chars, sizeof(chars), "%i", number); new numZones = GangZone_CreateNumber(GangZone@Number1[index], chars[0], (centpos_x - (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize); if (numZones == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = -1; GangZoneDestroy(GangZone@Border[index][0]); GangZoneDestroy(GangZone@Border[index][1]); GangZoneDestroy(GangZone@Border[index][2]); GangZoneDestroy(GangZone@Border[index][3]); return -1; } if (GangZone_CreateNumber(GangZone@Number2[index], chars[1], (centpos_x + (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = -1; GangZoneDestroy(GangZone@Border[index][0]); GangZoneDestroy(GangZone@Border[index][1]); GangZoneDestroy(GangZone@Border[index][2]); GangZoneDestroy(GangZone@Border[index][3]); for (new i = 0; i < numZones; i++) { GangZoneDestroy(GangZone@Number1[index][i]); } return -1; } } else { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = -1; GangZoneDestroy(GangZone@Border[index][0]); GangZoneDestroy(GangZone@Border[index][1]); GangZoneDestroy(GangZone@Border[index][2]); GangZoneDestroy(GangZone@Border[index][3]); return -1; } } return index; } #if defined _ALS_GangZoneCreate #undef GangZoneCreate #else #define _ALS_GangZoneCreate #endif #define GangZoneCreate GangZone_Create stock GangZone_Destroy(gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneDestroy(GangZone@MainZone[gangzone]); GangZone@MainZone[gangzone] = -1; GangZoneDestroy(GangZone@Border[gangzone][0]); GangZoneDestroy(GangZone@Border[gangzone][1]); GangZoneDestroy(GangZone@Border[gangzone][2]); GangZoneDestroy(GangZone@Border[gangzone][3]); GangZoneDestroy(GangZone@Number1[gangzone][0]); GangZoneDestroy(GangZone@Number1[gangzone][1]); GangZoneDestroy(GangZone@Number1[gangzone][2]); GangZoneDestroy(GangZone@Number1[gangzone][3]); GangZoneDestroy(GangZone@Number1[gangzone][4]); GangZoneDestroy(GangZone@Number2[gangzone][0]); GangZoneDestroy(GangZone@Number2[gangzone][1]); GangZoneDestroy(GangZone@Number2[gangzone][2]); GangZoneDestroy(GangZone@Number2[gangzone][3]); GangZoneDestroy(GangZone@Number2[gangzone][4]); return 1; } #if defined _ALS_GangZoneDestroy #undef GangZoneDestroy #else #define _ALS_GangZoneDestroy #endif #define GangZoneDestroy GangZone_Destroy stock GangZone_ShowForPlayer(playerid, gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneShowForPlayer(playerid, GangZone@MainZone[gangzone], color); GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][0], bordercolor); GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][1], bordercolor); GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][2], bordercolor); GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][3], bordercolor); GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][0], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][1], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][2], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][3], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][4], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][0], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][1], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][2], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][3], numbercolor); GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][4], numbercolor); return 1; } #if defined _ALS_GangZoneShowForPlayer #undef GangZoneShowForPlayer #else #define _ALS_GangZoneShowForPlayer #endif #define GangZoneShowForPlayer GangZone_ShowForPlayer stock GangZone_ShowForAll(gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneShowForAll(GangZone@MainZone[gangzone], color); GangZoneShowForAll(GangZone@Border[gangzone][0], bordercolor); GangZoneShowForAll(GangZone@Border[gangzone][1], bordercolor); GangZoneShowForAll(GangZone@Border[gangzone][2], bordercolor); GangZoneShowForAll(GangZone@Border[gangzone][3], bordercolor); GangZoneShowForAll(GangZone@Number1[gangzone][0], numbercolor); GangZoneShowForAll(GangZone@Number1[gangzone][1], numbercolor); GangZoneShowForAll(GangZone@Number1[gangzone][2], numbercolor); GangZoneShowForAll(GangZone@Number1[gangzone][3], numbercolor); GangZoneShowForAll(GangZone@Number1[gangzone][4], numbercolor); GangZoneShowForAll(GangZone@Number2[gangzone][0], numbercolor); GangZoneShowForAll(GangZone@Number2[gangzone][1], numbercolor); GangZoneShowForAll(GangZone@Number2[gangzone][2], numbercolor); GangZoneShowForAll(GangZone@Number2[gangzone][3], numbercolor); GangZoneShowForAll(GangZone@Number2[gangzone][4], numbercolor); return 1; } #if defined _ALS_GangZoneShowForAll #undef GangZoneShowForAll #else #define _ALS_GangZoneShowForAll #endif #define GangZoneShowForAll GangZone_ShowForAll stock GangZone_HideForPlayer(playerid, gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneHideForPlayer(playerid, GangZone@MainZone[gangzone]); GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][0]); GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][1]); GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][2]); GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][3]); GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][0]); GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][1]); GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][2]); GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][3]); GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][4]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][0]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][1]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][2]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][3]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][4]); return 1; } #if defined _ALS_GangZoneHideForPlayer #undef GangZoneHideForPlayer #else #define _ALS_GangZoneHideForPlayer #endif #define GangZoneHideForPlayer GangZone_HideForPlayer stock GangZone_HideForAll(gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneHideForAll(GangZone@MainZone[gangzone]); GangZoneHideForAll(GangZone@Border[gangzone][0]); GangZoneHideForAll(GangZone@Border[gangzone][1]); GangZoneHideForAll(GangZone@Border[gangzone][2]); GangZoneHideForAll(GangZone@Border[gangzone][3]); GangZoneHideForAll(GangZone@Number1[gangzone][0]); GangZoneHideForAll(GangZone@Number1[gangzone][1]); GangZoneHideForAll(GangZone@Number1[gangzone][2]); GangZoneHideForAll(GangZone@Number1[gangzone][3]); GangZoneHideForAll(GangZone@Number1[gangzone][4]); GangZoneHideForAll(GangZone@Number2[gangzone][0]); GangZoneHideForAll(GangZone@Number2[gangzone][1]); GangZoneHideForAll(GangZone@Number2[gangzone][2]); GangZoneHideForAll(GangZone@Number2[gangzone][3]); GangZoneHideForAll(GangZone@Number2[gangzone][4]); return 1; } #if defined _ALS_GangZoneHideForAll #undef GangZoneHideForAll #else #define _ALS_GangZoneHideForAll #endif #define GangZoneHideForAll GangZone_HideForAll stock GangZone_FlashForPlayer(playerid, gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneFlashForPlayer(playerid, GangZone@MainZone[gangzone], flashcolor); if (borderflashcolor != 0x00) { GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][0], borderflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][1], borderflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][2], borderflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][3], borderflashcolor); } if (numberflashcolor != 0x00) { GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][0], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][1], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][2], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][3], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][4], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][0], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][1], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][2], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][3], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][4], numberflashcolor); } return 1; } #if defined _ALS_GangZoneFlashForPlayer #undef GangZoneFlashForPlayer #else #define _ALS_GangZoneFlashForPlayer #endif #define GangZoneFlashForPlayer GangZone_FlashForPlayer stock GangZone_FlashForAll(gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } GangZoneFlashForAll(GangZone@MainZone[gangzone], flashcolor); if (borderflashcolor != 0x00) { GangZoneFlashForAll(GangZone@Border[gangzone][0], borderflashcolor); GangZoneFlashForAll(GangZone@Border[gangzone][1], borderflashcolor); GangZoneFlashForAll(GangZone@Border[gangzone][2], borderflashcolor); GangZoneFlashForAll(GangZone@Border[gangzone][3], borderflashcolor); } if (numberflashcolor != 0x00) { GangZoneFlashForAll(GangZone@Number1[gangzone][0], numberflashcolor); GangZoneFlashForAll(GangZone@Number1[gangzone][1], numberflashcolor); GangZoneFlashForAll(GangZone@Number1[gangzone][2], numberflashcolor); GangZoneFlashForAll(GangZone@Number1[gangzone][3], numberflashcolor); GangZoneFlashForAll(GangZone@Number1[gangzone][4], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][0], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][1], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][2], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][3], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][4], numberflashcolor); } return 1; } #if defined _ALS_GangZoneFlashForAll #undef GangZoneFlashForAll #else #define _ALS_GangZoneFlashForAll #endif #define GangZoneFlashForAll GangZone_FlashForAll stock GangZone_StopFlashForPlayer(playerid, gangzone, bool:mainzone = true, bool:border = true, bool:number = true) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } if (mainzone) { GangZoneStopFlashForPlayer(playerid, GangZone@MainZone[gangzone]); } if (border) { GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][0]); GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][1]); GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][2]); GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][3]); } if (number) { GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][0]); GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][1]); GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][2]); GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][3]); GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][4]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][0]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][1]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][2]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][3]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][4]); } return 1; } #if defined _ALS_GangZoneStopFlashForPlayer #undef GangZoneStopFlashForPlayer #else #define _ALS_GangZoneStopFlashForPlayer #endif #define GangZoneStopFlashForPlayer GangZone_StopFlashForPlayer stock GangZone_StopFlashForAll(gangzone, bool:mainzone = true, bool:border = true, bool:number = true) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == -1) { return 0; } if (mainzone) { GangZoneStopFlashForAll(GangZone@MainZone[gangzone]); } if (border) { GangZoneStopFlashForAll(GangZone@Border[gangzone][0]); GangZoneStopFlashForAll(GangZone@Border[gangzone][1]); GangZoneStopFlashForAll(GangZone@Border[gangzone][2]); GangZoneStopFlashForAll(GangZone@Border[gangzone][3]); } if (number) { GangZoneStopFlashForAll(GangZone@Number1[gangzone][0]); GangZoneStopFlashForAll(GangZone@Number1[gangzone][1]); GangZoneStopFlashForAll(GangZone@Number1[gangzone][2]); GangZoneStopFlashForAll(GangZone@Number1[gangzone][3]); GangZoneStopFlashForAll(GangZone@Number1[gangzone][4]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][0]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][1]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][2]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][3]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][4]); } return 1; } #if defined _ALS_GangZoneStopFlashForAll #undef GangZoneStopFlashForAll #else #define _ALS_GangZoneStopFlashForAll #endif #define GangZoneStopFlashForAll GangZone_StopFlashForAll
परिवर्तित टेक्स्ट
फ़ाइल खोलें
#if defined gangzones_included #endinput #endif #define gangzones_included /**************************************/ // gangzones.inc - v2.2 - Last Updated: 28 April, 2018 - By Gammix & beijind /***************************************/ #if !defined GANGZONE_DEFAULT_BORDER_SIZE #define GANGZONE_DEFAULT_BORDER_SIZE 2.0 #endif #if !defined GANGZONE_DEFAULT_NUMBER_SIZE #define GANGZONE_DEFAULT_NUMBER_SIZE 1.0 #endif #if !defined GANGZONE_DEFAULT_BORDER_COLOR #define GANGZONE_DEFAULT_BORDER_COLOR 0xAA #endif #if !defined GANGZONE_DEFAULT_NUMBER_COLOR #define GANGZONE_DEFAULT_NUMBER_COLOR 0xAA #endif #define MAX_GANGZONE_BORDER_SLOTS 4 #define MAX_GANGZONE_NUMBER_SLOTS 5 static GangZone@MainZone[MAX_GANG_ZONES] = {INVALID_GANG_ZONE, ...}; static GangZone@Border[MAX_GANG_ZONES][MAX_GANGZONE_BORDER_SLOTS]; static GangZone@Number1[MAX_GANG_ZONES][MAX_GANGZONE_NUMBER_SLOTS]; static GangZone@Number2[MAX_GANG_ZONES][MAX_GANGZONE_NUMBER_SLOTS]; public OnGameModeInit() { new i, j; for(i = 0; i < MAX_GANG_ZONES; ++i) { for(j = 0; j < MAX_GANGZONE_NUMBER_SLOTS; ++j) { if(j < MAX_GANGZONE_BORDER_SLOTS) { GangZone@Border[i][j] = INVALID_GANG_ZONE; } GangZone@Number1[i][j] = INVALID_GANG_ZONE; GangZone@Number2[i][j] = INVALID_GANG_ZONE; } } return CallLocalFunction("GangZone_OnGameModeInit", ""); } #if defined _ALS_OnGameModeInit #undef OnGameModeInit #else #define _ALS_OnGameModeInit #endif #define OnGameModeInit GangZone_OnGameModeInit forward OnGameModeInit(); static GangZone_CreateBorder(dest[], Float:minx, Float:miny, Float:maxx, Float:maxy, Float:bordersize) { dest[0] = GangZoneCreate(minx - bordersize, miny + bordersize, minx + bordersize, maxy - bordersize); dest[1] = GangZoneCreate(minx - bordersize, maxy - bordersize, maxx + bordersize, maxy + bordersize); dest[2] = GangZoneCreate(maxx - bordersize, miny + bordersize, maxx + bordersize, maxy - bordersize); dest[3] = GangZoneCreate(minx - bordersize, miny - bordersize, maxx + bordersize, miny + bordersize); for (new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; i++) { if (dest[i] == INVALID_GANG_ZONE) { // If one border failed to create (random out of slots), then destroy all! for (i = 0; i < MAX_GANGZONE_BORDER_SLOTS; i++) { GangZoneDestroy(dest[i]); dest[i] = INVALID_GANG_ZONE; } return 0; } } return 4; } static GangZone_CreateNumber(dest[], number, Float:centpos_x, Float:centpos_y, Float:numbersize) { if (number < '0' || number > '9') { return 0; } static const Float:LETTER_STROKE = 3.5; static const Float:LETTER_XSQUASH = 0.7; new ret = 0; switch (number) { case '0': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_x = (20.0 * numbersize * LETTER_XSQUASH); new Float:distance_y = (20.0 * numbersize); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down of 0 dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Up of 0 dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left of 0 dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Right of 0 ret = 4; } case '1': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); dest[0] = GangZoneCreate((centpos_x - stroke), (centpos_y - distance_y - stroke),(centpos_x + stroke), (centpos_y + distance_y + stroke)); ret = 1; } case '2': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)),(centpos_y + stroke), (centpos_x + distance_x), (centpos_y + distance_y - stroke)); // Right Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y + stroke), (centpos_x - distance_x + (2 * stroke)),(centpos_y - stroke)); // Left Stick dest[4] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '3': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)),(centpos_y + distance_y + stroke)); // Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 4; } case '4': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y), (centpos_x - distance_x + (2 * stroke)), (centpos_y + stroke)); // Left dest[1] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke));// Middle dest[2] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y)); // Stick ret = 3; } case '5': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + stroke), (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Right Stick dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '6': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[1] = GangZoneCreate((centpos_x - distance_x - (2 * stroke)), (centpos_y + distance_y + stroke), (centpos_x - distance_x), (centpos_y - distance_y - stroke)); // Main Left Stick dest[2] = GangZoneCreate((centpos_x - distance_x), (centpos_y - stroke), (centpos_x + distance_x), (centpos_y + stroke)); // Middle dest[3] = GangZoneCreate((centpos_x - distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down dest[4] = GangZoneCreate((centpos_x + distance_x - (2 * stroke)), (centpos_y - distance_y + stroke), (centpos_x + distance_x), (centpos_y - stroke)); // Right small stick ret = 5; } case '7': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (15.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y - stroke)); // Stick of 7 dest[1] = GangZoneCreate((centpos_x - distance_x - distance_x), (centpos_y + distance_y - stroke), (centpos_x + distance_x + stroke), (centpos_y + distance_y + stroke)); // Up of 7 ret = 2; } case '8': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke)); // Left stick dest[1] = GangZoneCreate((centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke), (centpos_x + distance_x + stroke), (centpos_y - distance_y - stroke)); // Right stick dest[2] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + distance_y + stroke)); // Up dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - stroke), (centpos_x + distance_x - stroke), (centpos_y + stroke)); // Center dest[4] = GangZoneCreate((centpos_x - distance_x + stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x - stroke), (centpos_y - distance_y + stroke)); // Down ret = 5; } case '9': { new Float:stroke = (LETTER_STROKE * numbersize); new Float:distance_y = (20.0 * numbersize); new Float:distance_x = (25.0 * numbersize * LETTER_XSQUASH); dest[0] = GangZoneCreate((centpos_x - distance_x - stroke), centpos_y, (centpos_x - distance_x + stroke), (centpos_y + distance_y - stroke)); // Left Stick dest[1] = GangZoneCreate((centpos_x + distance_x), (centpos_y - distance_y - stroke), (centpos_x + distance_x + (2 * stroke)), (centpos_y + distance_y + stroke)); // Right Stick dest[2] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y + distance_y - stroke), (centpos_x + distance_x), (centpos_y + distance_y + stroke)); // Up dest[3] = GangZoneCreate((centpos_x - distance_x + stroke), centpos_y, (centpos_x + distance_x), (centpos_y + stroke + stroke)); // Middle dest[4] = GangZoneCreate((centpos_x - distance_x - stroke), (centpos_y - distance_y - stroke), (centpos_x + distance_x), (centpos_y - distance_y + stroke)); // Down ret = 5; } } for (new i = 0; i < ret; i++) { if (dest[i] == INVALID_GANG_ZONE) { for (i = 0; i < ret; i++) { GangZoneDestroy(dest[i]); dest[i] = INVALID_GANG_ZONE; } return 0; } } return ret; } stock GangZone_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, number = -1, Float:bordersize = GANGZONE_DEFAULT_BORDER_SIZE, Float:numbersize = GANGZONE_DEFAULT_NUMBER_SIZE) { new index = INVALID_GANG_ZONE; for (new i = 0; i < MAX_GANG_ZONES; i++) { if (GangZone@MainZone[i] == INVALID_GANG_ZONE) { index = i; break; } } if (index == INVALID_GANG_ZONE) { return INVALID_GANG_ZONE; } GangZone@MainZone[index] = GangZoneCreate(minx, miny, maxx, maxy); if (GangZone@MainZone[index] == INVALID_GANG_ZONE) { return INVALID_GANG_ZONE; } GangZone@Border[index][0] = INVALID_GANG_ZONE; GangZone@Border[index][1] = INVALID_GANG_ZONE; GangZone@Border[index][2] = INVALID_GANG_ZONE; GangZone@Border[index][3] = INVALID_GANG_ZONE; GangZone@Number1[index][0] = INVALID_GANG_ZONE; GangZone@Number1[index][1] = INVALID_GANG_ZONE; GangZone@Number1[index][2] = INVALID_GANG_ZONE; GangZone@Number1[index][3] = INVALID_GANG_ZONE; GangZone@Number1[index][4] = INVALID_GANG_ZONE; GangZone@Number2[index][0] = INVALID_GANG_ZONE; GangZone@Number2[index][1] = INVALID_GANG_ZONE; GangZone@Number2[index][2] = INVALID_GANG_ZONE; GangZone@Number2[index][3] = INVALID_GANG_ZONE; GangZone@Number2[index][4] = INVALID_GANG_ZONE; if (bordersize != 0.0) { if (GangZone_CreateBorder(GangZone@Border[index], minx, miny, maxx, maxy, bordersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = INVALID_GANG_ZONE; return INVALID_GANG_ZONE; } } if (numbersize != 0.0) { if (number == -1) { number = (index % 100); } if (number >= 0 && number <= 9) { new Float:centpos_x = ((minx + maxx) / 2); new Float:centpos_y = ((miny + maxy) / 2); new chars[2]; format(chars, sizeof(chars), "%i", number); if (GangZone_CreateNumber(GangZone@Number1[index], chars[0], centpos_x, centpos_y, numbersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = INVALID_GANG_ZONE; for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[index][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Border[index][i]); GangZone@Border[index][i] = INVALID_GANG_ZONE; } } return INVALID_GANG_ZONE; } } else if (number >= 10 && number <= 99) { const Float:NUMBER_DISTANCE = 25.0; new Float:centpos_x = ((minx + maxx) / 2); new Float:centpos_y = ((miny + maxy) / 2); new chars[3]; format(chars, sizeof(chars), "%i", number); new numZones = GangZone_CreateNumber(GangZone@Number1[index], chars[0], (centpos_x - (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize); if (numZones == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = INVALID_GANG_ZONE; for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[index][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Border[index][i]); GangZone@Border[index][i] = INVALID_GANG_ZONE; } } return INVALID_GANG_ZONE; } if (GangZone_CreateNumber(GangZone@Number2[index], chars[1], (centpos_x + (NUMBER_DISTANCE * numbersize)), centpos_y, numbersize) == 0) { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = INVALID_GANG_ZONE; for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[index][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Border[index][i]); GangZone@Border[index][i] = INVALID_GANG_ZONE; } } for (new i = 0; i < numZones; i++) { if(GangZone@Number1[index][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Number1[index][i]); GangZone@Number1[index][i] = INVALID_GANG_ZONE; } } return INVALID_GANG_ZONE; } } else { GangZoneDestroy(GangZone@MainZone[index]); GangZone@MainZone[index] = INVALID_GANG_ZONE; for(new i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[index][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Border[index][i]); GangZone@Border[index][i] = INVALID_GANG_ZONE; } } return INVALID_GANG_ZONE; } } return index; } #if defined _ALS_GangZoneCreate #undef GangZoneCreate #else #define _ALS_GangZoneCreate #endif #define GangZoneCreate GangZone_Create stock GangZone_Destroy(gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneDestroy(GangZone@MainZone[gangzone]); GangZone@MainZone[gangzone] = INVALID_GANG_ZONE; for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Border[gangzone][i]); GangZone@Border[gangzone][i] = INVALID_GANG_ZONE; } } for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { if(GangZone@Number1[gangzone][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Number1[gangzone][i]); GangZone@Number1[gangzone][i] = INVALID_GANG_ZONE; } if(GangZone@Number2[gangzone][i] != INVALID_GANG_ZONE) { GangZoneDestroy(GangZone@Number2[gangzone][i]); GangZone@Number2[gangzone][i] = INVALID_GANG_ZONE; } } return 1; } #if defined _ALS_GangZoneDestroy #undef GangZoneDestroy #else #define _ALS_GangZoneDestroy #endif #define GangZoneDestroy GangZone_Destroy stock GangZone_ShowForPlayer(playerid, gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneShowForPlayer(playerid, GangZone@MainZone[gangzone], color); for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForPlayer(playerid, GangZone@Border[gangzone][i], bordercolor); } } for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { if(GangZone@Number1[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForPlayer(playerid, GangZone@Number1[gangzone][i], numbercolor); } if(GangZone@Number2[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForPlayer(playerid, GangZone@Number2[gangzone][i], numbercolor); } } return 1; } #if defined _ALS_GangZoneShowForPlayer #undef GangZoneShowForPlayer #else #define _ALS_GangZoneShowForPlayer #endif #define GangZoneShowForPlayer GangZone_ShowForPlayer stock GangZone_ShowForAll(gangzone, color, bordercolor = GANGZONE_DEFAULT_BORDER_COLOR, numbercolor = GANGZONE_DEFAULT_NUMBER_COLOR) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneShowForAll(GangZone@MainZone[gangzone], color); for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { if(GangZone@Border[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForAll(GangZone@Border[gangzone][i], bordercolor); } } for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { if(GangZone@Number1[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForAll(GangZone@Number1[gangzone][i], numbercolor); } if(GangZone@Number2[gangzone][i] != INVALID_GANG_ZONE) { GangZoneShowForAll(GangZone@Number2[gangzone][i], numbercolor); } } return 1; } #if defined _ALS_GangZoneShowForAll #undef GangZoneShowForAll #else #define _ALS_GangZoneShowForAll #endif #define GangZoneShowForAll GangZone_ShowForAll stock GangZone_HideForPlayer(playerid, gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneHideForPlayer(playerid, GangZone@MainZone[gangzone]); for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneHideForPlayer(playerid, GangZone@Border[gangzone][i]); } for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneHideForPlayer(playerid, GangZone@Number1[gangzone][i]); GangZoneHideForPlayer(playerid, GangZone@Number2[gangzone][i]); } return 1; } #if defined _ALS_GangZoneHideForPlayer #undef GangZoneHideForPlayer #else #define _ALS_GangZoneHideForPlayer #endif #define GangZoneHideForPlayer GangZone_HideForPlayer stock GangZone_HideForAll(gangzone) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneHideForAll(GangZone@MainZone[gangzone]); for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneHideForAll(GangZone@Border[gangzone][i]); } for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneHideForAll(GangZone@Number1[gangzone][i]); GangZoneHideForAll(GangZone@Number2[gangzone][i]); } return 1; } #if defined _ALS_GangZoneHideForAll #undef GangZoneHideForAll #else #define _ALS_GangZoneHideForAll #endif #define GangZoneHideForAll GangZone_HideForAll stock GangZone_FlashForPlayer(playerid, gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneFlashForPlayer(playerid, GangZone@MainZone[gangzone], flashcolor); if (borderflashcolor != 0x00) { for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneFlashForPlayer(playerid, GangZone@Border[gangzone][i], borderflashcolor); } } if (numberflashcolor != 0x00) { for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneFlashForPlayer(playerid, GangZone@Number1[gangzone][i], numberflashcolor); GangZoneFlashForPlayer(playerid, GangZone@Number2[gangzone][i], numberflashcolor); } } return 1; } #if defined _ALS_GangZoneFlashForPlayer #undef GangZoneFlashForPlayer #else #define _ALS_GangZoneFlashForPlayer #endif #define GangZoneFlashForPlayer GangZone_FlashForPlayer stock GangZone_FlashForAll(gangzone, flashcolor, borderflashcolor = 0x00, numberflashcolor = 0x00) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; GangZoneFlashForAll(GangZone@MainZone[gangzone], flashcolor); if (borderflashcolor != 0x00) { for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneFlashForAll(GangZone@Border[gangzone][i], borderflashcolor); } } if (numberflashcolor != 0x00) { for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneFlashForAll(GangZone@Number1[gangzone][i], numberflashcolor); GangZoneFlashForAll(GangZone@Number2[gangzone][i], numberflashcolor); } } return 1; } #if defined _ALS_GangZoneFlashForAll #undef GangZoneFlashForAll #else #define _ALS_GangZoneFlashForAll #endif #define GangZoneFlashForAll GangZone_FlashForAll stock GangZone_StopFlashForPlayer(playerid, gangzone, bool:mainzone = true, bool:border = true, bool:number = true) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; if (mainzone) { GangZoneStopFlashForPlayer(playerid, GangZone@MainZone[gangzone]); } if (border) { for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneStopFlashForPlayer(playerid, GangZone@Border[gangzone][i]); } } if (number) { for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneStopFlashForPlayer(playerid, GangZone@Number1[gangzone][i]); GangZoneStopFlashForPlayer(playerid, GangZone@Number2[gangzone][i]); } } return 1; } #if defined _ALS_GangZoneStopFlashForPlayer #undef GangZoneStopFlashForPlayer #else #define _ALS_GangZoneStopFlashForPlayer #endif #define GangZoneStopFlashForPlayer GangZone_StopFlashForPlayer stock GangZone_StopFlashForAll(gangzone, bool:mainzone = true, bool:border = true, bool:number = true) { if (gangzone < 0 || gangzone >= MAX_GANG_ZONES) { return 0; } if (GangZone@MainZone[gangzone] == INVALID_GANG_ZONE) { return 0; } static i; if (mainzone) { GangZoneStopFlashForAll(GangZone@MainZone[gangzone]); } if (border) { for(i = 0; i < MAX_GANGZONE_BORDER_SLOTS; ++i) { GangZoneStopFlashForAll(GangZone@Border[gangzone][i]); } } if (number) { for(i = 0; i < MAX_GANGZONE_NUMBER_SLOTS; ++i) { GangZoneStopFlashForAll(GangZone@Number1[gangzone][i]); GangZoneStopFlashForAll(GangZone@Number2[gangzone][i]); } } return 1; } #if defined _ALS_GangZoneStopFlashForAll #undef GangZoneStopFlashForAll #else #define _ALS_GangZoneStopFlashForAll #endif #define GangZoneStopFlashForAll GangZone_StopFlashForAll
अंतर खोजें