Guest User

Untitled

a guest
Dec 27th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public OnPlayerDisconnect(playerid, reason)
  2. {
  3. new arquivo[40], name[MAX_PLAYER_NAME];
  4. GetPlayerName(playerid, name, 32);
  5. format(arquivo, 40, "Contas/%s.ini", name);
  6. if(DOF2_FileExists(arquivo))
  7. {
  8. Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
  9. Player[playerid][Vida] = GetPlayerHealth(playerid, &Float:health);
  10. DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
  11. DOF2_SetInt(arquivo, "Admin", Player[playerid][Admin]);
  12. DOF2_SetInt(arquivo, "Score", Player[playerid][Score]);
  13. DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
  14. DOF2_SetInt(arquivo, "Skin", Player[playerid][Skin]);
  15. DOF2_SetInt(arquivo, "Godmode", Player[playerid][Godmode]);
  16. DOF2_SetFloat(arquivo, "Vida", Player[playerid][Vida]);
  17. DOF2_SaveFile();
  18. }
  19. return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment