Advertisement
Guest User

saveplayer

a guest
Apr 22nd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. stock SavePlayer(playerid)
  2. {
  3. if(p_logged{playerid} == true) return true;
  4. static const fmt_str[] = "accounts/%s.ini";
  5. new string[sizeof(fmt_str)-2+MAX_PLAYER_NAME+4];
  6. format(string, sizeof(string), fmt_str, pNick(playerid));
  7. new iniFile = ini_openFile(string);
  8. ini_setString(iniFile, "parola", p_info[playerid][p_password]);
  9. ini_setString(iniFile, "email", p_info[playerid][p_mail]);
  10. p_info[playerid][p_level] = GetPlayerScore(playerid);
  11. ini_setString(iniFile, "Level", p_info[playerid][p_level]);
  12. ini_setString(iniFile, "pCarLic", p_info[playerid][p_permis]);
  13. ini_setString(iniFile, "Admin", p_info[playerid][p_admin]);
  14. ini_setString(iniFile, "Job", p_info[playerid][p_job]);
  15. p_info[playerid][p_money] = GetPlayerMoney(playerid);
  16. ini_setInteger(iniFile, "bani", p_info[playerid][p_money]);
  17. p_info[playerid][p_skin] = GetPlayerSkin(playerid);
  18. ini_setInteger(iniFile, "Skin", p_info[playerid][p_skin]);
  19. ini_closeFile(iniFile);
  20. return true;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement