06.12.2010, 13:18
Hi guys,i've a problem.
I've got this code to auto save player stats.
The timer:
I've a problem,why the message STATS SAVED is showed every 5 seconds ingame?
I wanna show only 1 time,everytime he save stats.
Thanks.
I've got this code to auto save player stats.
Код:
public AutoSave() { for(new playerid;playerid<MAX_PLAYERS;playerid++) { dini_IntSet(udb_encode(nameee), "money", GetPlayerMoney(playerid)); dini_IntSet(udb_encode(nameee), "score", GetPlayerScore(playerid)); dini_IntSet(udb_encode(nameee), "rank", rank[playerid]); dini_IntSet(udb_encode(nameee), "deaths", deaths[playerid]); dini_IntSet(udb_encode(nameee), "kills", kills[playerid]); dini_IntSet(udb_encode(nameee), "piolet", piolet[playerid]); dini_IntSet(udb_encode(nameee), "logged", 1); dini_IntSet(udb_encode(nameee), "adminlevel",adminlevel[playerid]); dini_IntSet(udb_encode(nameee), "totalbans",bans[playerid]); format(string, sizeof(string), "STATS SAVED"); SendClientMessageToAll(0xFF0000FF, string); } return 1; }
Код:
SetTimer("AutoSave",10000,true);
I wanna show only 1 time,everytime he save stats.
Thanks.