Advertisement
Guest User

Untitled

a guest
Oct 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 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.  
  8.  
  9. std::ofstream o("players/" + username + ".json");
  10. if (!o.is_open()) {
  11. cout << GetLastError() << endl;
  12. _getch();
  13. }
  14. json j;
  15.  
  16. int clothback = p->cloth_back;
  17. int clothhand = p->cloth_hand;
  18. int clothface = p->cloth_face;
  19. int clothhair = p->cloth_hair;
  20. int clothfeet = p->cloth_feet;
  21. int clothpants = p->cloth_pants;
  22. int clothneck = p->cloth_necklace;
  23. int clothshirt = p->cloth_shirt;
  24. int clothmask = p->cloth_mask;
  25. int level = p->level;
  26. int blc = p->blockbroken;
  27. string password = ((PlayerInfo*)(peer->data))->tankIDPass;
  28. j["username"] = username;
  29. j["password"] = hashPassword(password);
  30. j["adminLevel"] = 0;
  31. j["ClothBack"] = clothback;
  32. j["ClothHand"] = clothhand;
  33. j["ClothFace"] = clothface;
  34. j["ClothShirt"] = clothshirt;
  35. j["ClothPants"] = clothpants;
  36. j["ClothNeck"] = clothneck;
  37. j["ClothHair"] = clothhair;
  38. j["ClothFeet"] = clothfeet;
  39. j["ClothMask"] = clothmask;
  40. j["Level"] = level;
  41. j["block"] = blc;
  42. o << j << std::endl;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement