ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2609

GTA V Steal Players Outfit

by NGxDTV1225 - 09-04-2018 - 09:03 PM
#1
AddOption("Steal Outfit");


case 1: { stealPlayersOutfit(); } break;

void stealPlayersOutfit()

{

int Handle = PLAYER::GET_PLAYER_PED(selectedPlayer);

int draw[12];

int text[12];

int prop[2];

int proptext[2];

//drawable ID

PED::CLEAR_PED_DECORATIONS(PLAYER::PLAYER_PED_ID());

resetPlayerComps();

draw[0] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 0);

draw[1] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 1);

draw[2] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 2);

draw[3] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 3);

draw[4] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 4);

draw[5] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 5);

draw[6] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 6);

draw[7] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 7);

draw[8] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 8);

draw[9] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 9);

draw[10] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 10);

draw[11] = PED::GET_PED_DRAWABLE_VARIATION(Handle, 11);

//texture

text[0] = PED::GET_PED_TEXTURE_VARIATION(Handle, 0);

text[1] = PED::GET_PED_TEXTURE_VARIATION(Handle, 1);

text[2] = PED::GET_PED_TEXTURE_VARIATION(Handle, 2);

text[3] = PED::GET_PED_TEXTURE_VARIATION(Handle, 3);

text[4] = PED::GET_PED_TEXTURE_VARIATION(Handle, 4);

text[5] = PED::GET_PED_TEXTURE_VARIATION(Handle, 5);

text[6] = PED::GET_PED_TEXTURE_VARIATION(Handle, 6);

text[7] = PED::GET_PED_TEXTURE_VARIATION(Handle, 7);

text[8] = PED::GET_PED_TEXTURE_VARIATION(Handle, 8);

text[9] = PED::GET_PED_TEXTURE_VARIATION(Handle, 9);

text[10] = PED::GET_PED_TEXTURE_VARIATION(Handle, 10);

text[11] = PED::GET_PED_TEXTURE_VARIATION(Handle, 11);

//Set outfit

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 0, draw[0], text[0], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 1, draw[1], text[1], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 2, draw[2], text[2], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 3, draw[3], text[3], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 4, draw[4], text[4], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 5, draw[5], text[5], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 6, draw[6], text[6], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 7, draw[7], text[7], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 8, draw[8], text[8], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 9, draw[9], text[9], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 10, draw[10], text[10], 2);

PED::SET_PED_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID(), 11, draw[11], text[11], 2);

//get ped props

prop[0] = PED::GET_PED_PROP_INDEX(Handle, 0);

prop[1] = PED::GET_PED_PROP_INDEX(Handle, 1);

prop[2] = PED::GET_PED_PROP_INDEX(Handle, 2);

//prop texture index

proptext[0] = PED::GET_PED_PROP_TEXTURE_INDEX(Handle, 0);

proptext[1] = PED::GET_PED_PROP_TEXTURE_INDEX(Handle, 1);

proptext[2] = PED::GET_PED_PROP_TEXTURE_INDEX(Handle, 2);

//ped props - hats etc

PED::SET_PED_PROP_INDEX(PLAYER::PLAYER_PED_ID(), 0, prop[0], proptext[0], true);

PED::SET_PED_PROP_INDEX(PLAYER::PLAYER_PED_ID(), 1, prop[1], proptext[1], true);

PED::SET_PED_PROP_INDEX(PLAYER::PLAYER_PED_ID(), 2, prop[2], proptext[2], true);

char buf[32];

sprintf(buf, "Stole ~b~%s ~g~: Outfit", PLAYER::GET_PLAYER_NAME(selectedPlayer));

NotifyAboveMap(buf);

}
Reply
#2
useless posts :vvvvv
Reply
#3
Super pointless thread
Papa A1 Original
Reply
#4
Dang thats some of i420NZ old code
This account is currently banned
Ban reason: Multi
Reply
#5
steal player outfit in 2 natives

Hidden Content
You must register or login to view this content.

Reply
#6
WOW you do know vectors exist
Reply
#7
thios works wow cool
Reply
#8
Here it is done properly

Code:
void StealOutfit(Player player)
    {
        Ped self = PLAYER::PLAYER_ID();
        Ped selfPed = PLAYER::PLAYER_PED_ID();
        Ped playerPed = PED::GET_PLAYER_PED(player);

        if (ENTITY::DOES_ENTITY_EXIST(playerPed))
        {
            Hash playerModel = ENTITY::GET_ENTITY_MODEL(playerPed);
            Hash selfModel = ENTITY::GET_ENTITY_MODEL(selfPed);

            if (selfModel != targetModel)
            {
                if (STREAMING::IS_MODEL_VALID(targetModel))
                {
                    STREAMING::REQUEST_MENU_PED_MODEL(targetModel);
                    DWORD64 now = GetTickCount64();
                    while (!STREAMING::HAS_MODEL_LOADED(targetModel) && GetTickCount64() < now + 3000) WAIT(0);
                    if (STREAMING::HAS_MODEL_LOADED(targetModel) == TRUE)
                    {
                        PLAYER::SET_PLAYER_MODEL(self, targetModel);
                        STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(targetModel);
                    }
                }
            }

            PED::SET_PED_DEFAULT_COMPONENT_VARIATION(selfPed);

            for (int i = 0; i < 12; i++)
            {
                auto ped_drawable = PED::GET_PED_DRAWABLE_VARIATION(playerPed, i);
                auto ped_texture = PED::GET_PED_TEXTURE_VARIATION(playerPed, i);
                auto ped_palette = PED::GET_PED_PALETTE_VARIATION(playerPed, i);
                PED::SET_PED_COMPONENT_VARIATION(selfPed, i, ped_drawable, ped_texture, ped_palette);
            }

            PED::CLEAR_ALL_PED_PROPS(selfPed);

            for (int i = 0; i < 10; i++)
            {
                auto prop_drawable = PED::GET_PED_PROP_INDEX(playerPed, i);
                auto prop_texture = PED::GET_PED_PROP_TEXTURE_INDEX(playerPed, i);
                PED::SET_PED_PROP_INDEX(selfPed, i, prop_drawable, prop_texture, 1);
            }

            std::array<int, 10> head_values;
            if (PED::_GET_PED_HEAD_BLEND_DATA(playerPed, &values))
            {
                //ped, shapeMotherID, shapeFatherID, shapeExtraID, skinMotherID, skinFatherID, skinExtraID, shapeMix, skinMix, thirdMix
                PED::SET_PED_HEAD_BLEND_DATA(selfPed, values[0], values[1], values[2], values[3], values[4], values[5], SYSTEM::TO_FLOAT(values[6]), SYSTEM::TO_FLOAT(values[7]), SYSTEM::TO_FLOAT(values[8]), values[9]);
            }

            Notification::Bottom(FMT("Copied %s's outfit", PLAYER::GET_PLAYER_NAME(player)));
        }
    }
Reply
#9
(09-08-2018 - 10:08 AM)give-two Wrote: Here it is done properly

Code:
void StealOutfit(Player player)
    {
        Ped self = PLAYER::PLAYER_ID();
        Ped selfPed = PLAYER::PLAYER_PED_ID();
        Ped playerPed = PED::GET_PLAYER_PED(player);

        if (ENTITY::DOES_ENTITY_EXIST(playerPed))
        {
            Hash playerModel = ENTITY::GET_ENTITY_MODEL(playerPed);
            Hash selfModel = ENTITY::GET_ENTITY_MODEL(selfPed);

            if (selfModel != targetModel)
            {
                if (STREAMING::IS_MODEL_VALID(targetModel))
                {
                    STREAMING::REQUEST_MENU_PED_MODEL(targetModel);
                    DWORD64 now = GetTickCount64();
                    while (!STREAMING::HAS_MODEL_LOADED(targetModel) && GetTickCount64() < now + 3000) WAIT(0);
                    if (STREAMING::HAS_MODEL_LOADED(targetModel) == TRUE)
                    {
                        PLAYER::SET_PLAYER_MODEL(self, targetModel);
                        STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(targetModel);
                    }
                }
            }

            PED::SET_PED_DEFAULT_COMPONENT_VARIATION(selfPed);

            for (int i = 0; i < 12; i++)
            {
                auto ped_drawable = PED::GET_PED_DRAWABLE_VARIATION(playerPed, i);
                auto ped_texture = PED::GET_PED_TEXTURE_VARIATION(playerPed, i);
                auto ped_palette = PED::GET_PED_PALETTE_VARIATION(playerPed, i);
                PED::SET_PED_COMPONENT_VARIATION(selfPed, i, ped_drawable, ped_texture, ped_palette);
            }

            PED::CLEAR_ALL_PED_PROPS(selfPed);

            for (int i = 0; i < 10; i++)
            {
                auto prop_drawable = PED::GET_PED_PROP_INDEX(playerPed, i);
                auto prop_texture = PED::GET_PED_PROP_TEXTURE_INDEX(playerPed, i);
                PED::SET_PED_PROP_INDEX(selfPed, i, prop_drawable, prop_texture, 1);
            }

            std::array<int, 10> head_values;
            if (PED::_GET_PED_HEAD_BLEND_DATA(playerPed, &values))
            {
                //ped, shapeMotherID, shapeFatherID, shapeExtraID, skinMotherID, skinFatherID, skinExtraID, shapeMix, skinMix, thirdMix
                PED::SET_PED_HEAD_BLEND_DATA(selfPed, values[0], values[1], values[2], values[3], values[4], values[5], SYSTEM::TO_FLOAT(values[6]), SYSTEM::TO_FLOAT(values[7]), SYSTEM::TO_FLOAT(values[8]), values[9]);
            }

            Notification::Bottom(FMT("Copied %s's outfit", PLAYER::GET_PLAYER_NAME(player)));
        }
    }
Reply
#10
thanks it's work:)
Reply

Users browsing: 1 Guest(s)