23.04.2009, 15:49
hi
i have a question:
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
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; }
whatever is in the file, always Materials: 1 Drugs: 2
what's wrong with this?
i hope you can help
greetings