HolywoodJack

BonePosVC.asi

Apr 16th, 2022 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. #include "plugin.h"
  2. #include "CPedIK.h"
  3. #include "CModelInfo.h"
  4. #include "CHud.h"
  5. #include "CCoronas.h"
  6. #include "extensions\ScriptCommands.h"
  7.  
  8. using namespace plugin;
  9.  
  10. class BonePosVC {
  11. public:
  12. BonePosVC() {
  13. Events::gameProcessEvent += [] {
  14. auto playa = FindPlayerPed();
  15. if (playa) {
  16. std::string skinName = CModelInfo::ms_modelInfoPtrs[playa->m_nModelIndex]->m_szName;
  17. // CHud::SetHelpMessage(skinName.c_str(), false, true);
  18. RwV3d bonePosition; unsigned int boneID = 5; // leftHand_ID = 5;
  19. playa->m_pedIK.GetComponentPosition(&bonePosition, boneID);
  20. if (skinName == "than1") {
  21. // purple
  22. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 191, 0, 255);
  23. } else {
  24. if (skinName == "than2") {
  25. // blue
  26. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 38, 110, 246);
  27. } else {
  28. if (skinName == "than3") {
  29. // red
  30. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 198, 4, 4);
  31. } else {
  32. if (skinName == "than4") {
  33. // orange
  34. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 255, 139, 0);
  35. } else {
  36. if (skinName == "than5") {
  37. // green
  38. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 53, 181, 53);
  39. } else {
  40. if (skinName == "than6") {
  41. // yellow
  42. Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 255, 211, 0);
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. };
  51. }
  52. } bonePosVC;
  53.  
Add Comment
Please, Sign In to add comment