Advertisement
Juantlo

Untitled

Oct 8th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 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::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.  
  28. string password = ((PlayerInfo*)(peer->data))->tankIDPass;
  29. j["username"] = username;
  30. j["password"] = hashPassword(password);
  31. j["adminLevel"] = 0;
  32. j["ClothBack"] = clothback;
  33. j["ClothHand"] = clothhand;
  34. j["ClothFace"] = clothface;
  35. j["ClothShirt"] = clothshirt;
  36. j["ClothPants"] = clothpants;
  37. j["ClothNeck"] = clothneck;
  38. j["ClothHair"] = clothhair;
  39. j["ClothFeet"] = clothfeet;
  40. j["ClothMask"] = clothmask;
  41.  
  42.  
  43. o << j << std::endl;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement