Jump to content
  • 0

Random Rims/Wheels at starting race. How to put this off.


Decayed

Question

Hi,

I've got a question of which I can't seem to find the answer anywhere. Maybe you guys can help me:

I'm trying to set up a Race server. And up to this point everything works like I want it to work, I even managed to implement custom cars. However, I've run into an issue regarding those modded cars. Whenever I start a race, my car seems to get his rims at random. Sometimes it gets the modded rims, and sometimes it gets one of the normal sets which came with the game.

Is there a way for me to guarantee that a car will get the custom rims instead of only sometimes.

I hope you guys can understand the problem I ran into, otherwise I will try to provide some additional information via screenshot.

Greetings,

Decayed

Link to comment

2 answers to this question

Recommended Posts

  • 0

If you want remove the whole upgrades (wheels/spoiler/vent/roof/etc) just comment the line number 192 of file util_server.lua

Should looks like this:

addVehicleUpgrade(vehicle, upgrades[math.random(#upgrades)]) 

then

--addVehicleUpgrade(vehicle, upgrades[math.random(#upgrades)]) 

But if you want keep the others upgrades (spoiler/vent/roof/etc), but not wheels, change the line 191:

Should looks like this:

if slotName ~= 'Nitro' and slotName ~= 'Hydraulics' then 

then

if slotName ~= 'Nitro' and slotName ~= 'Hydraulics' and slotName ~= 'Wheels' then 

But if you want to keep all the default upgrades and only your custom wheels, change to this:

Should looks like this:

for slotName,upgrades in pairs(getVehicleCompatibleUpgradesGrouped(vehicle)) do 
          if slotName ~= 'Nitro' and slotName ~= 'Hydraulics' then 
               addVehicleUpgrade(vehicle, upgrades[math.random(#upgrades)]) 
          end 
end 

then

for slotName,upgrades in pairs(getVehicleCompatibleUpgradesGrouped(vehicle)) do 
          if slotName ~= 'Nitro' and slotName ~= 'Hydraulics' and slotName ~= 'Wheels' then 
               addVehicleUpgrade(vehicle, upgrades[math.random(#upgrades)]) 
          elseif slotName == 'Wheels' then 
               addVehicleUpgrade(vehicle, math.random(YOURWHEELID,YOURWHEELID,YOURWHEELID)) 
          end 
end 

I haven't tested it, just found it searching on google code

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...