CliffHanger Posted June 16, 2016 Share Posted June 16, 2016 (edited) I'm missing something. This works for civilian peds or the story characters: CharacterModel = PedHash.FreemodeMale01 Model characterModel = new Model(CharacterModel); characterModel.Request(); while (!characterModel.IsLoaded) { Wait(0); } Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, characterModel.Hash); When I spawn the model it will be invisible. I tried to restore default components to the model but it wouldn't work Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, PED); Any ideas? Using Jedijosh's trainer to restore to default actually shows the model, so it appears to have been assigned properly. Edited June 16, 2016 by CliffHanger Link to comment Share on other sites More sharing options...
CliffHanger Posted June 17, 2016 Author Share Posted June 17, 2016 I fixed this problem by using this code instead. var characterModel = new Model(CharacterModel);characterModel.Request(500);if (characterModel.IsInCdImage && characterModel.IsValid){ while (!characterModel.IsLoaded) Script.Wait(100); Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, characterModel.Hash); Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, Game.Player.Character.Handle);}characterModel.MarkAsNoLongerNeeded(); frodzet 1 Link to comment Share on other sites More sharing options...
frodzet Posted June 17, 2016 Share Posted June 17, 2016 I fixed this problem by using this code instead. var characterModel = new Model(CharacterModel);characterModel.Request(500);if (characterModel.IsInCdImage && characterModel.IsValid){ while (!characterModel.IsLoaded) Script.Wait(100); Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, characterModel.Hash); Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, Game.Player.Character.Handle);}characterModel.MarkAsNoLongerNeeded(); this would be the correct approach ;-) CliffHanger 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