01.11.2012, 12:04
I think you misunderstand the issue. The saving and all works when I call the function from within my gamemode. However, it doesnt when I call the function from the filterscript. So basically the function is called from the FS, it prints the correct money YET it doesnt save the correct money. But if I change the pMoney from my GM it will save correctly.
Just incase you guys still think it is about the saving function:
Just incase you guys still think it is about the saving function:
Код:
UserDataSave_data(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); PlayerInfo[playerid][pX] = x; PlayerInfo[playerid][pY] = y; PlayerInfo[playerid][pZ] = z; new uFile[35]; format(uFile, 35, USER_FILE, GetName(playerid)); new INI:file = INI_Open(uFile); INI_WriteInt(file,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteString(file,"Nationality",PlayerInfo[playerid][pNat]); INI_WriteString(file,"City",PlayerInfo[playerid][pCity]); INI_WriteInt(file,"Phone",PlayerInfo[playerid][pPhone]); INI_WriteInt(file,"BankAccount",PlayerInfo[playerid][pBaccount]); INI_WriteInt(file,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(file,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(file,"Bankmoney",PlayerInfo[playerid][pBankmoney]); INI_WriteInt(file,"Money",PlayerInfo[playerid][pMoney]); INI_WriteInt(file,"Online",PlayerInfo[playerid][pOnline]); INI_WriteInt(file,"Age",PlayerInfo[playerid][pAge]); INI_WriteInt(file,"Pin",PlayerInfo[playerid][pPin]); INI_WriteFloat(file,"Xpos",PlayerInfo[playerid][pX]); INI_WriteFloat(file,"Ypos",PlayerInfo[playerid][pY]); INI_WriteFloat(file,"Zpos",PlayerInfo[playerid][pZ]); INI_WriteInt(file,"Skin",PlayerInfo[playerid][pSkin]); INI_WriteInt(file,"Gender",PlayerInfo[playerid][pGender]); INI_WriteInt(file,"Faction",PlayerInfo[playerid][pFaction]); INI_WriteInt(file,"Rank",PlayerInfo[playerid][pRank]); INI_Close(file); return 1; }