Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. if (((PlayerInfo*)(peer->data))->haveGrowId) {
  2.  
  3. PlayerInfo* p = ((PlayerInfo*)(peer->data));
  4.  
  5. string username = PlayerDB::getProperName(p->rawName);
  6.  
  7. std::ofstream o("players/" + username + ".json");
  8. if (!o.is_open()) {
  9. cout << GetLastError() << endl;
  10. _getch();
  11. }
  12. json j;
  13.  
  14. int clothback = p->cloth_back;
  15. int clothhand = p->cloth_hand;
  16. int clothface = p->cloth_face;
  17. int clothhair = p->cloth_hair;
  18. int clothfeet = p->cloth_feet;
  19. int clothpants = p->cloth_pants;
  20. int clothneck = p->cloth_necklace;
  21. int clothshirt = p->cloth_shirt;
  22. int clothmask = p->cloth_mask;
  23. int level = p->level;
  24. int skin = p->skinColor;
  25.  
  26. int ban = p->ban;
  27. int puncheffect = p->puncheffect;
  28. int mute = p->mute;
  29. int gem = p->gem;
  30. string friendlist = p->friendlist;
  31. string password = ((PlayerInfo*)(peer->data))->tankIDPass;
  32. j["username"] = username;
  33. j["password"] = hashPassword(password);
  34. j["adminLevel"] = 0;
  35. j["ClothBack"] = clothback;
  36. j["ClothHand"] = clothhand;
  37. j["ClothFace"] = clothface;
  38. j["ClothShirt"] = clothshirt;
  39. j["ClothPants"] = clothpants;
  40. j["ClothNeck"] = clothneck;
  41. j["ClothHair"] = clothhair;
  42. j["ClothFeet"] = clothfeet;
  43. j["ClothMask"] = clothmask;
  44. j["Level"] = level;
  45. j["Skin"] = skin;
  46. j["puncheffect"] = puncheffect;
  47. j["gem"] = gem;
  48.  
  49. j["isMuted"] = mute;
  50. j["isBanned"] = ban;
  51.  
  52. j["friend"] = friendlist;
  53. o << j << std::endl;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement