Jump to content

Assign Mask to Ped


DavidM91

Recommended Posts

Hi, i am a c# developer, new to lspdfr and playing with the github sample code just now.

 

i wanted to know if it is possible to assign a pig mask (https://gaming.stackexchange.com/questions/202785/where-could-i-get-a-pig-mask-in-gta5) to a ped. If its possible could someone please help me figure out how to do it with some sample code?

 

I've looked online for this for about a week and haven't found anything.

 

Cheers!

Dave

Link to comment
Share on other sites

you need to change the variation of the ped with Ped.SetVariation:

ped.SetVariation((int)EComponent.Head), drawableIndex, drawableTextureIndex);
Link to comment
Share on other sites

You can change the variation of a ped through a trainer than get the variation through a rph method.

I'll give you a class when I get home.

But basically till then you can try this:

1. Use the ped.GetVariation method and get the variation of the ped's head

2. Put that code in a cs file and put it somewhere

3. Start gta5 and when in game, execute the command ExecuteCodeSnippet from the rph console and select the cs file saved.

4. Once you execute the code just make it display a notification of the variation and write that down and set the variation in your project.

 

Hope that makes sense but thats all I can help you with till later.

Edited by NoNameSet
Link to comment
Share on other sites

ok so firstly use a trainer to change your model to mp_m_freemode_01 or mp_f_freemode_01 then change your character to have a mask then in the RPH console execute this:

int drawableIndex, drawableTextureIndex;
Game.LocalPlayer.Character.GetVariation(0, out drawableIndex, out drawableTextureIndex);
Game.DisplayNotification("drawableIndex = " + drawableIndex + "~n~drawableTextureIndex = " + drawableTextureIndex);
Edited by NoNameSet
Link to comment
Share on other sites

Cheers mate, i'll have a look at this tonight. Need to work out how to apply the pig mask. I am using NativeTrainer so should be in there right?

 

guess my question is, is the pig mask part of GTA 5 online? or will it be in co-op too.

Link to comment
Share on other sites

Figured this one out if anybody needs to do it in the future. 

 

Your ped should have a multiplayer model e.g - mp_m_weapwork_01

then to spawn the pig mask, set the following variation: Aggressor.SetVariation(1, 1, 0);

 

this will set the pig mask.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/15/2018 at 3:43 PM, DavidM91 said:

Figured this one out if anybody needs to do it in the future. 

 

Your ped should have a multiplayer model e.g - mp_m_weapwork_01

then to spawn the pig mask, set the following variation: Aggressor.SetVariation(1, 1, 0);

 

this will set the pig mask.

a little too late but here:

https://gist.github.com/NoNameSet/abb977770fdbc23aeb32f30beb84fa8b

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...