Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "plugin.h"
- #include "CPedIK.h"
- #include "CModelInfo.h"
- #include "CHud.h"
- #include "CCoronas.h"
- #include "extensions\ScriptCommands.h"
- using namespace plugin;
- class BonePosVC {
- public:
- BonePosVC() {
- Events::gameProcessEvent += [] {
- auto playa = FindPlayerPed();
- if (playa) {
- std::string skinName = CModelInfo::ms_modelInfoPtrs[playa->m_nModelIndex]->m_szName;
- // CHud::SetHelpMessage(skinName.c_str(), false, true);
- RwV3d bonePosition; unsigned int boneID = 5; // leftHand_ID = 5;
- playa->m_pedIK.GetComponentPosition(&bonePosition, boneID);
- if (skinName == "than1") {
- // purple
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 191, 0, 255);
- } else {
- if (skinName == "than2") {
- // blue
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 38, 110, 246);
- } else {
- if (skinName == "than3") {
- // red
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 198, 4, 4);
- } else {
- if (skinName == "than4") {
- // orange
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 255, 139, 0);
- } else {
- if (skinName == "than5") {
- // green
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 53, 181, 53);
- } else {
- if (skinName == "than6") {
- // yellow
- Command<Commands::DRAW_WEAPONSHOP_CORONA>(bonePosition.x, bonePosition.y, bonePosition.z, 0.5f, 0, 0, 255, 211, 0);
- }
- }
- }
- }
- }
- }
- }
- };
- }
- } bonePosVC;
Add Comment
Please, Sign In to add comment