Nyden Posted May 18, 2018 Share Posted May 18, 2018 (edited) Hi everyone, I have a problem with a model change. When I try to change the model of the character with the model of Lamar, the character becomes invisible. (I'm developing a mini mod menu with NativeUI) Here te code : if (item == lamarItem) { Ped gamePed = Game.Player.Character; Game.Player.ChangeModel(PedHash.LamarDavis); } Can you help me to fix ? Thanks Normal Model (ex: Alien, Police, Marine) : https://imgur.com/a/yzQnzuX Invisible Model (ex: Amanda,Lamar, Abigail) : https://imgur.com/a/qxME3k1 Edited May 18, 2018 by Nyden Link to comment Share on other sites More sharing options...
CamxxCore Posted May 21, 2018 Share Posted May 21, 2018 (edited) Hi everyone, I have a problem with a model change. When I try to change the model of the character with the model of Lamar, the character becomes invisible. (I'm developing a mini mod menu with NativeUI) Here te code : if (item == lamarItem) { Ped gamePed = Game.Player.Character; Game.Player.ChangeModel(PedHash.LamarDavis); } Can you help me to fix ? Thanks Normal Model (ex: Alien, Police, Marine) : https://imgur.com/a/yzQnzuX Invisible Model (ex: Amanda,Lamar, Abigail) : https://imgur.com/a/qxME3k1 Ensure the model is loaded beforehand: Model model = PedHash.LamarDavis;if (!model.IsLoaded && !model.Request(1000)){ // we couldn't load that model... return;}Game.Player.ChangeModel(model); Edited May 21, 2018 by CamxxCore Link to comment Share on other sites More sharing options...
Nyden Posted May 21, 2018 Author Share Posted May 21, 2018 (edited) Hi everyone, I have a problem with a model change. When I try to change the model of the character with the model of Lamar, the character becomes invisible. (I'm developing a mini mod menu with NativeUI) Here te code : if (item == lamarItem) { Ped gamePed = Game.Player.Character; Game.Player.ChangeModel(PedHash.LamarDavis); } Can you help me to fix ? Thanks Normal Model (ex: Alien, Police, Marine) : https://imgur.com/a/yzQnzuX Invisible Model (ex: Amanda,Lamar, Abigail) : https://imgur.com/a/qxME3k1 Ensure the model is loaded beforehand: Model model = PedHash.LamarDavis;if (!model.IsLoaded && !model.Request(1000)){ // we couldn't load that model... return;}Game.Player.ChangeModel(model); Tried to use this code : if (item == lamarItem) { Model model = PedHash.LamarDavis; if (!model.IsLoaded && !model.Request(1000)) { // we couldn't load that model... return; } Game.Player.ChangeModel(model); } it seems that it still does not work. (image) = https://imgur.com/a/0Le5HZ3 Edited May 21, 2018 by Nyden Link to comment Share on other sites More sharing options...
CamxxCore Posted May 22, 2018 Share Posted May 22, 2018 Hi everyone, I have a problem with a model change. When I try to change the model of the character with the model of Lamar, the character becomes invisible. (I'm developing a mini mod menu with NativeUI) Here te code : if (item == lamarItem) { Ped gamePed = Game.Player.Character; Game.Player.ChangeModel(PedHash.LamarDavis); }Can you help me to fix ? Thanks Normal Model (ex: Alien, Police, Marine) : https://imgur.com/a/yzQnzuX Invisible Model (ex: Amanda,Lamar, Abigail) : https://imgur.com/a/qxME3k1 Ensure the model is loaded beforehand: Model model = PedHash.LamarDavis;if (!model.IsLoaded && !model.Request(1000)){ // we couldn't load that model... return;}Game.Player.ChangeModel(model); Tried to use this code : if (item == lamarItem) { Model model = PedHash.LamarDavis; if (!model.IsLoaded && !model.Request(1000)) { // we couldn't load that model... return; } Game.Player.ChangeModel(model); } it seems that it still does not work. (image) = https://imgur.com/a/0Le5HZ3 It seems you will also need to call "SET_PED_DEFAULT_COMPONENT_VARIATION" when changing to a model that is not one of the 3 protagonists. Your code might look like this: Model model = PedHash.LamarDavis;if (!model.IsLoaded && !model.Request(1000)){ // we couldn't load that model... return;}Game.Player.ChangeModel(model);Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, Game.Player.Character); Link to comment Share on other sites More sharing options...