(09-04-2018 - 09:03 PM)NGxDTV1225 Wrote: 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);
}
Thanks
(09-06-2018 - 06:06 AM)BModzMasterTM Wrote: steal player outfit in 2 natives
Thanks
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.