23.12.2012, 15:52
Hello,
I'm trying to create a TDM and I'm to the gangzones.
I load them with dini.
In printf, positions appear well, but does not create gangzones ingame.
Here are my codes:
Sorry for my english
Thanks.
I'm trying to create a TDM and I'm to the gangzones.
I load them with dini.
In printf, positions appear well, but does not create gangzones ingame.
Here are my codes:
Код:
public OnGameModeInit() { for( new g; g < MAX_GANGZONES; g++ ) { LoadGangzone(g); Zones[g][ID] = GangZoneCreate(Zones[g][Xmin],Zones[g][Ymin],Zones[g][Xmax],Zones[g][Ymax]); printf("[GangZone] Zone %d (%s) loaded.",Zones[g][ID], Zones[g][Nom]); } } stock LoadGangzone(gzid) { new path[128]; format(path, sizeof(path), "Gangzones/%d.ini", gzid); format(Zones[gzid][Nom], 256, "%s", dini_Get(path, "Nom")); format(Zones[gzid][Xmin], 256, "%s", dini_Get(path, "Xmin")); format(Zones[gzid][Ymin], 256, "%s", dini_Get(path, "Ymin")); format(Zones[gzid][Xmax], 256, "%s", dini_Get(path, "Xmax")); format(Zones[gzid][Ymax], 256, "%s", dini_Get(path, "Ymax")); format(Zones[gzid][SpawnX], 256, "%s", dini_Get(path, "SpawnX")); format(Zones[gzid][SpawnY], 256, "%s", dini_Get(path, "SpawnY")); format(Zones[gzid][SpawnZ], 256, "%s", dini_Get(path, "SpawnZ")); format(Zones[gzid][Team], 256, "%s", dini_Get(path, "Team")); Zones[gzid][ID] = GangZoneCreate(Zones[gzid][Xmin],Zones[gzid][Ymin],Zones[gzid][Xmax],Zones[gzid][Ymax]); GangZoneShowForAll(Zones[gzid][ID], 0xFF0000FF); printf("nom %s xmin %s ymin %s", Zones[gzid][Nom], Zones[gzid][Xmin], Zones[gzid][Ymin]); return 1; }
Thanks.