Advertisement
Guest User

Untitled

a guest
Aug 16th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. stock Path(playerid)
  2. new str[128],name[MAX_PLAYER_NAME];
  3. GetPlayerName(playerid,name,sizeof(name));
  4. format(str,sizeof(str),UserPath,name);
  5. return str;
  6. }
  7.  
  8. stock SaveAccount(playerid)
  9. {
  10. new INI:file = INI_Open(Path(playerid));
  11. INI_SetTag(file, "PLAYER DATA");
  12. INI_WriteInt(file, "MONEY", GetPlayerMoney(playerid));
  13. INI_WriteInt(file, "SKIN", GetPlayerSkin(playerid));
  14. INI_WriteInt(file, "LEVEL", GetPlayerScore(playerid));
  15. INI_WriteInt(file, "EXP", PLAYER_INFO[playerid][EXP]);
  16. INI_WriteInt(file, "KILLS", PLAYER_INFO[playerid][KILLS]);
  17. INI_WriteInt(file, "DEATHS", PLAYER_INFO[playerid][DEATHS]);
  18. INI_WriteInt(file, "LOGGED IN", PLAYER_INFO[playerid][IS_LOGGEDIN]);
  19. INI_WriteInt(file, "FIRST CONNECTION", PLAYER_INFO[playerid][NEW_REGISTRATION]);
  20. return 1;
  21. }
  22.  
  23. stock SaveAccounts()
  24. {
  25. foreach (new i : Player)
  26. {
  27. SaveAccount(i);
  28. }
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement