30.10.2018, 05:21
GangZoneCreate has only 4 parameters minx, miny,maxx,maxy
So Under OnGamemodeInit
You should use GangZoneShowForPlayer(playerid, zoneid, zonecolor); Under OnPlayerSpawn.
So, Under OnPlayerSpawn
So Under OnGamemodeInit
pawn Код:
for(new f = 0; f < sizeof(TurfsInfo); f++)//Creates a loop, that goes through all of the businesses.
{
new strs[40];
format(strs, sizeof(strs), TPATH, f);//formats the file path, with the biz ID
INI_ParseFile(strs, "loadturf_%s", .bExtra = true, .extra = f );
TurfsInfo[f][TurfID] = GangZoneCreate(TurfsInfo[f][minx], TurfsInfo[f][miny], TurfsInfo[f][maxx], TurfsInfo[f][maxy]);
printf("[debug] Turf %d: %x", f, TurfsInfo[f][TurfsColor]);
}
So, Under OnPlayerSpawn
pawn Код:
for(new f = 0; f < sizeof(TurfsInfo); f++)
{
new colour[15];
format(colour, 15, "%s50", TurfsInfo[f][TurfsColor]);
GangZoneShowForPlayer(playerid, TurfsInfo[f][TurfID], colour);
}