Wiebrendh Posted April 17, 2014 Share Posted April 17, 2014 How do i make Niko wear a bag like the bag of a money heist in GTA V? Searched through native funcions and all the things that i learned from this forum, but i could not find anything This is possible, i saw it in some other mods. Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 18, 2014 Share Posted April 18, 2014 set the skin bag component for the player to the correct value or u have to set ped prop i forget... player has a skin object that u can access components or set ped props Link to comment Share on other sites More sharing options...
Wiebrendh Posted April 18, 2014 Author Share Posted April 18, 2014 set the skin bag component for the player to the correct value or u have to set ped prop i forget... player has a skin object that u can access components or set ped props SET_PLAYER_DRAW_COMPONENT can remove visuale player components like his head, torso, legs, hands or teeths. SET_CHAR_PROP_INDEX i have no idea what this is, but i think that i can spawn that bag with it Link to comment Share on other sites More sharing options...
stef538 Posted April 18, 2014 Share Posted April 18, 2014 Just a quick question, is it also possible to store the players current clothes somewhere ? Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 18, 2014 Share Posted April 18, 2014 use the scripthookdotnet, u dont need to use native functions yourself, they are already wrapped so like i said The Player class has a Skin property... if u then access the Skin object's Component property then u can set the bag component or if that doesnt work use the set prop index method and i think u set Ped prop 2 to some integer use ilspy and look at the player class in the GTA namespace and follow what i said u dont need to use natives clothes are represented by an integer value so yes, make a integer object and save it to memory or whatever Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 18, 2014 Share Posted April 18, 2014 (edited) Game.LocalPlayer.Skin which inherits PedSkin... PedSkin has this method to set ped props...test pedprop 01 to find the bag, test different values 0 - 8 Game.LocalPlayer.Skin.SetPropIndex(PedProp.Unknown01, 1); pedprop0 i think is for hats and helmet or access the component property from PedSkin class Game.LocalPlayer.Skin.Component then u can access the PedComponentCollection object for the player... these are all PedComponent objects so now u set the model index and/or texture index to change clothing... make sure u check available textures because if u use a bad index value, script will crash Edited April 24, 2014 by LordOfTheBongs D T 1 Link to comment Share on other sites More sharing options...
Wiebrendh Posted April 24, 2014 Author Share Posted April 24, 2014 (edited) Game.LocalPlayer.Skin which inherits PedSkin... PedSkin has this method to set ped props...test pedprop 01 to find the bag, test different values 0 - 8 Game.LocalPlayer.Skin.SetPropIndex(PedProp.Unknown01, 1); pedprop0 i think is for hats and helmet or access the component property from PedSkin class Game.LocalPlayer.Skin.Component then u can access the PedComponentCollection object for the player... these are all PedComponent objects so now u set the model index and/or texture index to change clothing... make sure u check available textures because if u use a bad index value, script will crash Oke this works when i do: Game.LocalPlayer.Skin.SetPropIndex(PedProp.UNKNOWN_1, 2); (i can change the 0 to 0,1,2 and those are different glasses) But when i go higher, nothing is added to niko.. Same with UNKNOW_0 when i do 0,1,2 niko will wear other hats, but when i do 3 nothing changes..... What am i doing wrong.. Edited April 24, 2014 by Wiebrendh Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 24, 2014 Share Posted April 24, 2014 (edited) i guess 0, 1, 2 are the only valid values then... it means the character's file only has 3 props to choose from ur not doing anything wrong, this is how the player was designed btw i had to edit my post u quoted because i accidently pasted the same image link twice... now i included the image of the pedcomponentcollection those are used to change clothing Edited April 24, 2014 by LordOfTheBongs Link to comment Share on other sites More sharing options...
Wiebrendh Posted April 24, 2014 Author Share Posted April 24, 2014 i guess 0, 1, 2 are the only valid values then... it means the character's file only has 3 props to choose from ur not doing anything wrong, this is how the player was designed Oowh, that sounds logic But, how do i get that bag then, i had another look an the natives, but could not find anything Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 24, 2014 Share Posted April 24, 2014 (edited) i guess 0, 1, 2 are the only valid values then... it means the character's file only has 3 props to choose from ur not doing anything wrong, this is how the player was designed Oowh, that sounds logic But, how do i get that bag then, i had another look an the natives, but could not find anything u didnt read my entire post about setting model index for the ped components... example Game.LocalPlayer.Skin.Components.Bags.ModelIndex = 1; Im assuming 1 is a valid model index, u can check available indices... read my post and look at the images for methods to use... AvailableModels basically a component has an array of models and textures to choose so checking the available models or textures is like checking the length of these arrays and then u select the index position u want to set on the player if ur doing this on Niko then for sure ur doing something wrong... i know for a fact u can set a bag on him either through the bag component which u can access from the player's pedcomponentcollection or u set one of the ped props if ur doing this on johnny or luis then maybe the bag is not available for them in their player file Edited April 24, 2014 by LordOfTheBongs Wiebrendh 1 Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted April 24, 2014 Share Posted April 24, 2014 so just like an array u check length of the array and u only select an index that is greater than -1 and less than the length private void SetPlayerBagModelIndex(int index){ if (index < 0) return; if (index < Game.LocalPlayer.Skin.Components.Bag.AvailableModels) { Game.LocalPlayer.Skin.Components.Bag.ModelIndex = index; }} Link to comment Share on other sites More sharing options...
Wiebrendh Posted April 24, 2014 Author Share Posted April 24, 2014 i guess 0, 1, 2 are the only valid values then... it means the character's file only has 3 props to choose from ur not doing anything wrong, this is how the player was designed Oowh, that sounds logic But, how do i get that bag then, i had another look an the natives, but could not find anything u didnt read my entire post about setting model index for the ped components... example Game.LocalPlayer.Skin.Components.Bags.ModelIndex = 1; Im assuming 1 is a valid model index, u can check available indices... read my post and look at the images for methods to use... AvailableModels basically a component has an array of models and textures to choose so checking the available models or textures is like checking the length of these arrays and then u select the index position u want to set on the player if ur doing this on Niko then for sure ur doing something wrong... i know for a fact u can set a bag on him either through the bag component which u can access from the player's pedcomponentcollection or u set one of the ped props if ur doing this on johnny or luis then maybe the bag is not available for them in their player file This helped me really out!! with: Game.LocalPlayer.Skin.Components.Bags.ModelIndex = 1; you make Niko wear a bag Thanks man! LordOfTheBongs 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now