Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!gloves_updated) {
- DWORD* hMyWearables = LocalPlayer->GetWearables();
- if (hMyWearables != NULL)
- {
- static ClientClass* pClass;
- if (!pClass)
- pClass = BaseClientDll->GetAllClasses();
- while (pClass)
- {
- if (pClass->m_ClassID == 45)
- break;
- pClass = pClass->m_pNext;
- }
- if (!pClass) {
- }
- else {
- int iEntry, iSerial;
- iEntry = ClientEntityList->GetHighestEntityIndex() + 1;
- iSerial = RandomInt(0x0, 0xFFF);
- pClass->m_pCreateFn(iEntry, iSerial);
- hMyWearables[0] = iEntry | (iSerial << 16);
- CBaseCombatWeapon* pEnt = (CBaseCombatWeapon*)ClientEntityList->GetClientEntityFromHandle(hMyWearables[0]);
- if (pEnt) {
- char* model = getGloveModelFileByName(getValueAsString("glove_model"));
- if (pEnt->GetModelIndex() != ModelInfoClient->GetModelIndex(model) || *pEnt->GetFallbackPaintKit() == getValueAsInt("glove_skin") || *pEnt->GetFallbackWear() == getValueAsFloat("glove_wear")) {
- *pEnt->GetFallbackPaintKit() = getValueAsInt("glove_skin"); ;
- *pEnt->GetEntityQuality() = 4;
- *pEnt->GetItemIDHigh() = -1;
- *pEnt->GetFallbackSeed() = 0;
- *pEnt->GetFallbackStatTrak() = -1;
- *pEnt->GetFallbackWear() = getValueAsFloat("glove_wear");
- *pEnt->GetAccountID() = LocalPlayerInfo.m_nXuidLow;
- pEnt->SetModelIndex2(ModelInfoClient->GetModelIndex(model));
- *pEnt->GetItemDefinitionIndex() = getGloveDefinitionIndexByName(getValueAsString("glove_model"));;
- pEnt->PreDataUpdate(DATA_UPDATE_CREATED);
- }
- gloves_updated = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement