20.12.2009, 17:51
Quote:
Originally Posted by dice7
He means how do you get data into the "Argument" array
|
Код:
stock LoadZones() { if(fexist("TurfZones/turfs.ini")) { new entry[256]; new Argument[9][70]; new File: turffile = fopen("TurfZones/turfs.ini", io_read); if (turffile) { for(new i; i<MAX_ZONES; i++) { fread(turffile, entry); split(entry, Argument, ','); pTurf[i][ID] = strval(Argument[0]); pTurf[i][minx] = floatstr(Argument[1]); pTurf[i][miny] = floatstr(Argument[2]); pTurf[i][maxx] = floatstr(Argument[3]); pTurf[i][maxy] = floatstr(Argument[4]); pTurf[i][Team] = strval(Argument[5]); pTurf[i][ID] = GangZoneCreate(pTurf[i][minx],pTurf[i][miny],pTurf[i][maxx],pTurf[i][maxy]); } fclose(turffile); } } }
It loads them now, but they're not positioned right and they're the wrong color than what they should be :S
(I'm using http://forum.sa-mp.com/index.php?topic=14702.0 to get the minx miny maxx and maxy, and using GetTeamColor to load the color from the team array from the turfs file.)