Jump to content

Vehicle.GetRandomDriver() Creating Same Ped Model


NWpilot07

Recommended Posts

So I'm running into an issue with one of my callouts where I need to create a random driver for three different vehicles at different times during the callout. My code for each instance is as follows:

 

 Driver1Sent = true;
                    SpeedVehicle1 = new Vehicle(Tools.Tools.RandomCarModel(), SpeedSpawn);
                    SpeedVehicle1.IsPersistent = true;
                    Driver1 = SpeedVehicle1.CreateRandomDriver();
                    Driver1.IsPersistent = true;
                    Driver1.BlockPermanentEvents = true;

 Driver2Sent = true;
                    SpeedVehicle2 = new Vehicle(Tools.Tools.RandomCarModel(), SpeedSpawn);
                    SpeedVehicle2.IsPersistent = true;
                    Driver2 = SpeedVehicle2.CreateRandomDriver();
                    Driver2.IsPersistent = true;
                    Driver2.BlockPermanentEvents = true;

 Driver3Sent = true;
                    SpeedVehicle3 = new Vehicle(Tools.Tools.RandomCarModel(), SpeedSpawn);
                    SpeedVehicle3.IsPersistent = true;
                    Driver3 = SpeedVehicle3.CreateRandomDriver();
                    Driver3.IsPersistent = true;
                    Driver3.BlockPermanentEvents = true;

The issue I'm running into is that the driver of each car is always the exact same model every single time. Is there something obvious that I'm missing here? Any help will be appreciated 🙂

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...