Advertisement
Guest User

saniy e sef

a guest
Oct 26th, 2018
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. if (Rainbow.Enable && Rainbow.Skin)
  2. {
  3. if (ImGui::CollapsingHeader("Skin"), true)
  4. {
  5. ImGui::BeginChild("##123", ImVec2(380, 167), true);
  6. for (int i = 0; i < sVector.size(); i++)
  7. {
  8. sIndex = i;
  9. if (sIndex != sVector.size())
  10. {
  11. SelectedAddress[sIndex] = sVector[sIndex];
  12. }
  13. if (sTexture[i] != NULL) {
  14. ImGui::Columns(2, NULL, false);
  15. ImGui::Image((void*)sTexture[i], ImVec2(150, 150), ImVec2(0, 0), ImVec2(1, 1), ImVec4(1, 1, 1, 1), ImVec4(0, 0, 0, 0));
  16. ImGui::NextColumn();
  17. ImGui::Text("Texture #%i", sIndex);
  18. ImGui::Text("PrimCount: %i", SelectedAddress[sIndex]);
  19. char label2[128];
  20. sprintf(label2, "Selected ##%d", i);
  21. ImGui::Checkbox(label2, &Selected[sIndex]);
  22. ImGui::Columns(1);
  23. }
  24. }
  25. ImGui::EndChild();
  26. }
  27. }
  28.  
  29. if (Rainbow.Enable && Rainbow.Skin)
  30. {
  31. UINT ReturnAddress = primCount;
  32. if (!IsAddressPresent2(ReturnAddress))
  33. sVector.push_back(ReturnAddress);
  34.  
  35. if (Skin != pSAMP->getPlayers()->pLocalPlayer->iSpawnSkin) {
  36. for (int i = 0; i < sVector.size(); i++)
  37. {
  38. Selected[i] = false;
  39. }
  40. sVector.clear();
  41. Skin = pSAMP->getPlayers()->pLocalPlayer->iSpawnSkin;
  42. }
  43.  
  44. for (int i = 0; i < sVector.size(); i++)
  45. {
  46. if (primCount == SelectedAddress[i] != NULL)
  47. {
  48. pDevice->GetTexture(0, &sTexture[i]);
  49.  
  50. if (Selected[i])
  51. {
  52. pD3DHook->Orginal_DrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
  53. pDevice->SetPixelShader(Shader);
  54. pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
  55. pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  56. pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
  57. pD3DHook->Orginal_DrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
  58. pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
  59. pDevice->SetPixelShader(NULL);
  60. pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
  61. return pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
  62. }
  63. }
  64. }
  65. }
  66.  
  67. //B1G Rainbow Chat Imput By sanity
  68.  
  69.  
  70. if (Rainbow.Enable && Rainbow.Chat)
  71. {
  72. DWORD ChatAddr = *(DWORD*)(g_Options.Other.g_dwSAMP_Addr + 0x21A0E8);
  73. DWORD ChatAddr2 = *(DWORD*)((ChatAddr + 0x8));
  74.  
  75. *(DWORD*)(ChatAddr2 + 0x127) = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
  76.  
  77. *(DWORD*)(((g_Options.Other.g_dwSAMP_Addr + 0x21A0E8) + 0x8) + 0x127) = rainbow_color_x;
  78. }
  79.  
  80. //B1G Rainbow NameTags By sanity
  81. if (Rainbow.Enable && Rainbow.NameTags)
  82. {
  83. for (int ii = 0; ii < SAMP_MAX_PLAYERS; ii++)
  84. {
  85. if (pSAMP->getPlayers()->pRemotePlayer[ii] == nullptr)
  86. continue;
  87. if (pSAMP->getPlayers()->pRemotePlayer[ii]->pPlayerData == nullptr)
  88. continue;
  89. ((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);
  90. }
  91. }
  92.  
  93. //B1G Rainbow Kill List By sanity
  94. if (g_Options.Rainbow.Enable && g_Options.Rainbow.KillList)
  95. {
  96. for (int kill = 0; kill < 5; kill++)
  97. {
  98. struct stKillEntry *ent = &pSAMP->stGetKillInfo()->killEntry[kill];
  99.  
  100. ent->clKillerColor = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
  101. ent->clVictimColor = D3DCOLOR_ARGB(255, (BYTE)round(mainColorActive.x * 255.f), (BYTE)round(mainColorActive.y * 255.f), (BYTE)round(mainColorActive.z * 255.f));
  102. }
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement