How to spawn a ped model with a specific walking style in .CS?
-
I have this mod where you can spawn a ped model using a hotkey, in .CS, I was wondering how one would spawn a ped model with a certain walking style attached to it. Like drunk or overweight, for example.
I know you can select these walking styles with a trainer like Menyoo, But I would like to have it already applied to the character. Is that possible, in .CS?
To be specific, I want to spawn one with "Intimidation 3" walking style (at least, that's what it's called in Menyoo)
Any help with this would be a great help.
-
Spawn the ped normally, then use this code to set the movement clipset to "Intimidation 3"
Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, Game.Player.Character, "move_m@intimidation@unarmed", 1.0f);
I took the movement clipset from here: https://github.com/MAFINS/MenyooSP/blob/ccecad0f7f7eff7ab1618e609cd772055911e19a/Solution/source/Submenus/PedAnimation.cpp#L1338
-
Jitnaught, the scripting genius to the rescue! Awesome, gonna try this out.
-
Hmm..having trouble getting it to work. Where would I put that code within this?:
{
Keys changeModelKey = Keys.V;
Model modelToChangeTo = "u_m_m_jesus_01";public ChangePlrModel() { KeyDown += ChangePlrModel_KeyDown; } private void ChangePlrModel_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == changeModelKey) { Game.Player.ChangeModel(modelToChangeTo); } }
}
-
After
Game.Player.ChangeModel