GangZone Loader not working
#8

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);
		}
	}
}
that's my updated code, I'm using the split thing to get the data into the argument array,

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.)
Reply


Messages In This Thread
GangZone Loader not working - by _Vortex - 19.12.2009, 23:24
Re: GangZone Loader not working - by _Vortex - 20.12.2009, 13:02
Re: GangZone Loader not working - by dice7 - 20.12.2009, 13:29
Re: GangZone Loader not working - by LarzI - 20.12.2009, 13:33
Re: GangZone Loader not working - by Donny_k - 20.12.2009, 13:42
Re: GangZone Loader not working - by _Vortex - 20.12.2009, 17:03
Re: GangZone Loader not working - by dice7 - 20.12.2009, 17:20
Re: GangZone Loader not working - by _Vortex - 20.12.2009, 17:51
Re: GangZone Loader not working - by _Vortex - 20.12.2009, 19:11

Forum Jump:


Users browsing this thread: 2 Guest(s)