TrickyDickNixon1969 Posted January 13, 2018 Share Posted January 13, 2018 (edited) Hi, I want to replace any ped model with an in-game (vanilla) model of Trevor for a project I'm working on.So, how should I go about doing this? Can I save a custom player model using mods? Or is there a mod to duplicate the player model? Or is there even a way to spawn it through the rockstar editor? I'm kind of model illiterate, so Thanks! Edited January 13, 2018 by TrickyDickNixon1969 Link to comment Share on other sites More sharing options...
Bob_74 Posted January 14, 2018 Share Posted January 14, 2018 You cannot change a ped's model on the fly afaik (only the player's model). So you need to delete NPCs and creates new ones with Trevor's model. I gave it a quick try in C# Model trevor = new Model(-1686040670);foreach (Ped ped in World.GetAllPeds()){ if (ped.Model.Hash != trevor.Hash && !ped.IsPlayer && ped.IsHuman && !ped.IsPersistent && ped.IsVisible) { Ped trevorPed; Vector3 pos = ped.Position; float heading = ped.Heading; // If ped is in vehicle if (ped.CurrentVehicle != null) { Vehicle veh = ped.CurrentVehicle; VehicleSeat seat = ped.SeatIndex; Vector3 posUnderground = pos; posUnderground.Z = posUnderground.Z - 50.0f; ped.MarkAsNoLongerNeeded(); ped.Delete(); trevorPed = World.CreatePed(trevor, posUnderground, heading); trevorPed.SetIntoVehicle(veh, seat); } else { ped.MarkAsNoLongerNeeded(); ped.Delete(); trevorPed = World.CreatePed(trevor, pos, heading); } trevorPed.RandomizeOutfit(); // randomize the clothes Script.Yield(); }} It works but I've got graphic glitches and a memory error when I do it too often, so there must be a cleaner way to do so. If you want to use specific clothes, you'll need to use PED::SET_PED_COMPONENT_VARIATION (http://www.dev-c.com/nativedb/func/info/262b14f48d29de80) You can see how to use it here: http://gtaforums.com/topic/903982-outifts/ Link to comment Share on other sites More sharing options...