Advertisement
FocusedSG

Untitled

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