Quantcast

Jump to content

» «
Photo

Niko wears big bag like GTA V

11 replies to this topic
Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#1

Posted 17 April 2014 - 08:27 PM

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.

LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#2

Posted 18 April 2014 - 01:10 AM

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


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#3

Posted 18 April 2014 - 06:51 AM

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 :/


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#4

Posted 18 April 2014 - 08:10 AM

Just a quick question, is it also possible to store the players current clothes somewhere ?


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#5

Posted 18 April 2014 - 04:13 PM

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


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#6

Posted 18 April 2014 - 04:25 PM Edited by LordOfTheBongs, 24 April 2014 - 04:31 PM.

Game.LocalPlayer.Skin

idaNjOu.png

 

which inherits PedSkin...

2novj68.png

 

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);

yrjeNtC.png

pedprop0 i think is for hats and helmet

B2j2aJA.png

 

or access the component property from PedSkin class

Game.LocalPlayer.Skin.Component

FTkdZK1.png

 

then u can access the PedComponentCollection object for the player...

 

WA4R7LN.png

 

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

 

Zk9F25F.png

  • Deadly Target likes this

Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#7

Posted 24 April 2014 - 02:51 PM Edited by Wiebrendh, 24 April 2014 - 02:56 PM.

Game.LocalPlayer.Skin

idaNjOu.png

 

which inherits PedSkin...

2novj68.png

 

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);

yrjeNtC.png

pedprop0 i think is for hats and helmet

B2j2aJA.png

 

or access the component property from PedSkin class

Game.LocalPlayer.Skin.Component

FTkdZK1.png

 

then u can access the PedComponentCollection object for the player...

 

FTkdZK1.png

 

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

 

Zk9F25F.png

 

 

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..


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#8

Posted 24 April 2014 - 04:29 PM Edited by LordOfTheBongs, 24 April 2014 - 04:33 PM.

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


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#9

Posted 24 April 2014 - 04:31 PM

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 :(


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#10

Posted 24 April 2014 - 04:37 PM Edited by LordOfTheBongs, 24 April 2014 - 04:42 PM.

 

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

  • Wiebrendh likes this

LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#11

Posted 24 April 2014 - 04:45 PM

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;
    }
}

Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#12

Posted 24 April 2014 - 08:13 PM

 

 

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 likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users