JunkDealer Posted December 31, 2014 Share Posted December 31, 2014 Hi. I have DD server and I need help about wheels. Almost in all maps we are using Cheetah and as everyone know every map car's wheels changing. I want to make it start with default wheel. Like this: http://mahiwaga.com/img.jpg I mean other uprages will stay but every map car will start with default wheel. I hope you understand me and anyone can help me. Thx.. Link to comment
Castillo Posted December 31, 2014 Share Posted December 31, 2014 Remove every wheel upgrade when you first get the vehicle. onVehicleEnter removeVehicleUpgrade Link to comment
JunkDealer Posted December 31, 2014 Author Share Posted December 31, 2014 ty for help. I tried this but it doesn't work. function remWheel ( sourcePlayer ) theVehicle = getPlayerOccupiedVehicle ( sourcePlayer ) if ( theVehicle ) then removeVehicleUpgrade ( theVehicle, 1085 ) end end I did this, started map (with map 1085 id wheel is coming) but nothing changed. Can you tell me more wide? Link to comment
Castillo Posted December 31, 2014 Share Posted December 31, 2014 Maybe the upgrades are being applied after, try this: addEvent ( "onRaceStateChanging", true ) addEventHandler ( "onRaceStateChanging", root, function ( state ) if ( state == "GridCountdown" ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do local theVehicle = getPlayerOccupiedVehicle ( player ) if ( theVehicle ) then removeVehicleUpgrade ( theVehicle, 1085 ) end end end end ) Link to comment
JunkDealer Posted December 31, 2014 Author Share Posted December 31, 2014 it works! ty so much Link to comment
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