19.02.2019, 18:15
I have a weird bug when I'm creating and showing the gang zone.
my code:
turfs in database table are with ID:
1, 2, 3....last id: 28
When i'm use /gangz all turfs are WHITE, but the first turf (ID 1) is black, why?
Pictures: https://i.gyazo.com/7390a849ada93f12...bcaf6ca4f2.png
my code:
turfs in database table are with ID:
1, 2, 3....last id: 28
Код:
#define MAX_GANG_ZONES (29) public LoadZoness() { for(new x = 0; x < cache_num_rows(); x++) { new id = cache_get_field_content_int(x, "ID"); tvar[id][tID] = id; tvar[id][tOwner] = cache_get_field_content_int(x, "owned_by"); tvars[id][tMinX] = cache_get_field_content_float(x, "min_x"); tvar[id][tMinY] = cache_get_field_content_float(x, "min_y"); tvar[id][tMaxX] = cache_get_field_content_float(x, "max_x"); tvar[id][tMaxY] = cache_get_field_content_float(x, "max_y"); tvar[id][tPosition] = GangZoneCreateEx(tvar[id][tMinX], tvar[id][tMinY], tvar[id][tMaxX], tvar[id][tMaxY], tvar[id][tID], 1.5); } } CMD:gangz(playerid) { for(new t = 1; t < MAX_GANG_ZONES; t++) { GangZoneShowForPlayerEx(playerid, tvar[t][tPosition], COLOR_WHITE); } return 1; }
Pictures: https://i.gyazo.com/7390a849ada93f12...bcaf6ca4f2.png