26.02.2009, 17:52
Quote:
Originally Posted by ʞɹod ɹǝpıds || SpiderPork
You have to use a /register command to save the stats in a file.
|
ToD: Search the forums for a register and login filterscript. Copy all the content to your gamemode. Then place OnPlayerRegister in OnPlayerConnect (but do a file name check with player name, and if so take OnPlayerLogin). Easy.
Leopard
EDIT:
Quote:
Originally Posted by ToD
Код:
public OnPlayerDisconnect(playerid) { new pname[MAX_PLAYER_NAME]; new Destination[256]; new Logged[MAX_PLAYERS]; GetPlayerName(playerid, pname, sizeof(pname)); format(Destination,sizeof(Destination),"\\Users\\%s.ini",pname); if (dini_Exists(Destination) && Logged[playerid]) { dini_IntSet(Destination,"Score", GetPlayerScore(playerid)); } } |
2) I think \\ is wrong, try \ only
3) What happends if the file name doesn't exist? (name not registered) You gotta create the file.