Mizudori Posted January 4, 2015 Share Posted January 4, 2015 When I enter car with getVehicleCompatibleUpgrades is doesn't show me a compatibleUpgrades it shows some upgrades for other cars. It shows compatible list of spoilers for banshee when banshee doesn't have spoilers to upgrade. function scriptOnPlayerEnterVehicle ( invehicle, seat, jacked ) local upgrades = getVehicleCompatibleUpgrades ( invehicle ) for upgradeKey, upgradeValue in ipairs ( upgrades ) do outputChatBox ( getVehicleUpgradeSlotName ( upgradeValue ) .. ": " .. upgradeValue ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), scriptOnPlayerEnterVehicle ) Proof that I am not insane here 1162 spl_a_j_b Spoiler Alien Jester 1163 spl_c_u_b Spoiler X-Flow Uranus Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 What does the debug say? Link to comment
Mizudori Posted January 4, 2015 Author Share Posted January 4, 2015 No errors in debug Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 Try this: function playEnterVeh ( theVehicle, seat ) local upgrades = getVehicleCompatibleUpgrades ( theVehicle ) for upgradeKey, upgradeValue in ipairs ( upgrades ) do outputChatBox ( getVehicleUpgradeSlotName ( upgradeValue ) .. ": " .. upgradeValue ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), playerEnterVeh ) Link to comment
Mizudori Posted January 4, 2015 Author Share Posted January 4, 2015 Try this: function playEnterVeh ( theVehicle, seat ) local upgrades = getVehicleCompatibleUpgrades ( theVehicle ) for upgradeKey, upgradeValue in ipairs ( upgrades ) do outputChatBox ( getVehicleUpgradeSlotName ( upgradeValue ) .. ": " .. upgradeValue ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), playerEnterVeh ) same result as on my screen. Showing 1162,1163 ID spoilers etc. Link to comment
Mizudori Posted January 4, 2015 Author Share Posted January 4, 2015 Yeah I really don't understand why this is happening I even turned off all other scripts and still the same problem. Link to comment
darhal Posted January 4, 2015 Share Posted January 4, 2015 Change the vehicle dont use banshe use infernus or smthg like this Link to comment
Mizudori Posted January 4, 2015 Author Share Posted January 4, 2015 I used monster track and others cars it shown exactly the same thing as on my screen. Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 Try using this along with the script, so it will get the specific upgrades for the specified model. getVehicleModelFromName Link to comment
Mizudori Posted January 4, 2015 Author Share Posted January 4, 2015 Try using this along with the script, so it will get the specific upgrades for the specified model. getVehicleModelFromName Hmm you mean if statement for some cars? This is only with spoilers so I will create spoilers table and use them for all cars with expections. Anyway thanks for help 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