SA-MP Forums Archive
help with a file - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with a file (/showthread.php?tid=74512)



help with a file - Flo_White - 23.04.2009

hi

i have a question:

Код:
dcmd_storage(playerid,params[])
{
  #pragma unused params
	new pgang = GetPlayerGang(playerid);
	LoadGangStorage(pgang);
	//if(isinhq[playerid] == false) return SendClientMessage(playerid,COLOR_WHITE,"You can see the Gangstorage only in the HQ!");
	new string[128];
	SendClientMessage(playerid,COLOR_ORANGE,"===== Gang Storage =====");
	format(string,sizeof(string),"Materials: %d Drugs: %d",Gangs[pgang][Materials],Gangs[pgang][Drugs]);
	SendClientMessage(playerid,COLOR_ORANGE,string);
	return 1;
}
Код:
stock LoadGangStorage(id)
{
	new string[128], File:gang;
	format(string, sizeof(string), "/Roleplay/Gangs/gang%d.ini", id);
	gang = fopen(string, io_read);
	Gangs[id][Materials] = Materials;
	Gangs[id][Drugs] = Drugs;
	fclose(gang);
	return id;
}
now when i tpye /storage it always shows me Materials: 1 Drugs: 2
whatever is in the file, always Materials: 1 Drugs: 2

what's wrong with this?

i hope you can help

greetings


Re: help with a file - Flo_White - 23.04.2009

nobody know what's wrong


Re: help with a file - Think - 23.04.2009

show the saving thing?


Re: help with a file - Flo_White - 23.04.2009

nvm i got it now

just needed to use Dini functions