Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1.  
  2. if (!gloves_updated) {
  3. DWORD* hMyWearables = LocalPlayer->GetWearables();
  4. if (hMyWearables != NULL)
  5. {
  6. static ClientClass* pClass;
  7. if (!pClass)
  8. pClass = BaseClientDll->GetAllClasses();
  9. while (pClass)
  10. {
  11. if (pClass->m_ClassID == 45)
  12. break;
  13. pClass = pClass->m_pNext;
  14.  
  15. }
  16. if (!pClass) {
  17. }
  18. else {
  19.  
  20. int iEntry, iSerial;
  21. iEntry = ClientEntityList->GetHighestEntityIndex() + 1;
  22. iSerial = RandomInt(0x0, 0xFFF);
  23.  
  24. pClass->m_pCreateFn(iEntry, iSerial);
  25. hMyWearables[0] = iEntry | (iSerial << 16);
  26.  
  27.  
  28. CBaseCombatWeapon* pEnt = (CBaseCombatWeapon*)ClientEntityList->GetClientEntityFromHandle(hMyWearables[0]);
  29.  
  30.  
  31. if (pEnt) {
  32. char* model = getGloveModelFileByName(getValueAsString("glove_model"));
  33.  
  34. if (pEnt->GetModelIndex() != ModelInfoClient->GetModelIndex(model) || *pEnt->GetFallbackPaintKit() == getValueAsInt("glove_skin") || *pEnt->GetFallbackWear() == getValueAsFloat("glove_wear")) {
  35. *pEnt->GetFallbackPaintKit() = getValueAsInt("glove_skin"); ;
  36. *pEnt->GetEntityQuality() = 4;
  37. *pEnt->GetItemIDHigh() = -1;
  38. *pEnt->GetFallbackSeed() = 0;
  39. *pEnt->GetFallbackStatTrak() = -1;
  40. *pEnt->GetFallbackWear() = getValueAsFloat("glove_wear");
  41.  
  42. *pEnt->GetAccountID() = LocalPlayerInfo.m_nXuidLow;
  43.  
  44. pEnt->SetModelIndex2(ModelInfoClient->GetModelIndex(model));
  45. *pEnt->GetItemDefinitionIndex() = getGloveDefinitionIndexByName(getValueAsString("glove_model"));;
  46. pEnt->PreDataUpdate(DATA_UPDATE_CREATED);
  47.  
  48. }
  49. gloves_updated = true;
  50.  
  51. }
  52. }
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement