13.06.2010, 23:35
can anyone tell me why my function crashes the server?
Forward:
Gamemodeinit:
Saveuser function:
Annoys the crap outta me.. Thx for all help!
Forward:
Код:
forward SaveUser(playerid);
Код:
SetTimer("SaveUser", 15000, true);
Код:
public SaveUser(playerid) { if (IsLogged[playerid] == 1) { new Score; format(cfile, 128, userfile, GetName(playerid)); Score = dini_Int(cfile, "Minutes Ingame"); dini_IntSet(cfile, "Money", GetPlayerMoney(playerid)); dini_IntSet(cfile, "Deaths", GetPlayerDeaths(playerid)); dini_IntSet(cfile, "Kills", GetPlayerKills(playerid)); dini_IntSet(cfile, "Score", Score / 10); SetPlayerMoney(playerid, dini_Int(cfile, "Money")); SetPlayerScore(playerid, dini_Int(cfile, "Score")); SetPlayerDeaths(playerid, dini_Int(cfile, "Deaths")); SetPlayerKills(playerid, dini_Int(cfile, "Kills")); GetPlayerPos(playerid, positionx, positiony, positionz); dini_FloatSet(cfile, "X", positionx); dini_FloatSet(cfile, "Y", positiony); dini_FloatSet(cfile, "Z", positionz); SavePlayerBagToFile(playerid); } return 1; }