Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Rainbow.Enable && Rainbow.Skin)
- {
- if (ImGui::CollapsingHeader("Skin"), true)
- {
- ImGui::BeginChild("##123", ImVec2(380, 167), true);
- for (int i = 0; i < sVector.size(); i++)
- {
- sIndex = i;
- if (sIndex != sVector.size())
- {
- SelectedAddress[sIndex] = sVector[sIndex];
- }
- if (sTexture[i] != NULL) {
- ImGui::Columns(2, NULL, false);
- ImGui::Image((void*)sTexture[i], ImVec2(150, 150), ImVec2(0, 0), ImVec2(1, 1), ImVec4(1, 1, 1, 1), ImVec4(0, 0, 0, 0));
- ImGui::NextColumn();
- ImGui::Text("Texture #%i", sIndex);
- ImGui::Text("PrimCount: %i", SelectedAddress[sIndex]);
- char label2[128];
- sprintf(label2, "Selected ##%d", i);
- ImGui::Checkbox(label2, &Selected[sIndex]);
- ImGui::Columns(1);
- }
- }
- ImGui::EndChild();
- }
- }
- if (Rainbow.Enable && Rainbow.Skin)
- {
- UINT ReturnAddress = primCount;
- if (!IsAddressPresent2(ReturnAddress))
- sVector.push_back(ReturnAddress);
- if (Skin != pSAMP->getPlayers()->pLocalPlayer->iSpawnSkin) {
- for (int i = 0; i < sVector.size(); i++)
- {
- Selected[i] = false;
- }
- sVector.clear();
- Skin = pSAMP->getPlayers()->pLocalPlayer->iSpawnSkin;
- }
- for (int i = 0; i < sVector.size(); i++)
- {
- if (primCount == SelectedAddress[i] != NULL)
- {
- pDevice->GetTexture(0, &sTexture[i]);
- if (Selected[i])
- {
- pD3DHook->Orginal_DrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
- pDevice->SetPixelShader(Shader);
- pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
- pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
- pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
- pD3DHook->Orginal_DrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
- pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
- pDevice->SetPixelShader(NULL);
- pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
- return pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
- }
- }
- }
- }
- //B1G Rainbow Chat Imput By sanity
- if (Rainbow.Enable && Rainbow.Chat)
- {
- DWORD ChatAddr = *(DWORD*)(g_Options.Other.g_dwSAMP_Addr + 0x21A0E8);
- DWORD ChatAddr2 = *(DWORD*)((ChatAddr + 0x8));
- *(DWORD*)(ChatAddr2 + 0x127) = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
- *(DWORD*)(((g_Options.Other.g_dwSAMP_Addr + 0x21A0E8) + 0x8) + 0x127) = rainbow_color_x;
- }
- //B1G Rainbow NameTags By sanity
- if (Rainbow.Enable && Rainbow.NameTags)
- {
- for (int ii = 0; ii < SAMP_MAX_PLAYERS; ii++)
- {
- if (pSAMP->getPlayers()->pRemotePlayer[ii] == nullptr)
- continue;
- if (pSAMP->getPlayers()->pRemotePlayer[ii]->pPlayerData == nullptr)
- continue;
- ((D3DCOLOR*)((char*)g_Options.Other.g_dwSAMP_Addr + SAMP_COLOR_OFFSET))[ii] = D3DCOLOR_ARGB((BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f), 255);
- }
- }
- //B1G Rainbow Kill List By sanity
- if (g_Options.Rainbow.Enable && g_Options.Rainbow.KillList)
- {
- for (int kill = 0; kill < 5; kill++)
- {
- struct stKillEntry *ent = &pSAMP->stGetKillInfo()->killEntry[kill];
- ent->clKillerColor = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
- ent->clVictimColor = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement