help with a file
#1

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
Reply
#2

nobody know what's wrong
Reply
#3

show the saving thing?
Reply
#4

nvm i got it now

just needed to use Dini functions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)