Mizudori Posted January 4, 2015 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
TrapLord Studios™ Posted January 4, 2015 Posted January 4, 2015 What does the debug say? Visit TrapLord Studios™
TrapLord Studios™ Posted January 4, 2015 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 ) Visit TrapLord Studios™
Mizudori Posted January 4, 2015 Author 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.
darhal Posted January 4, 2015 Posted January 4, 2015 Strange really #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
Mizudori Posted January 4, 2015 Author 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.
darhal Posted January 4, 2015 Posted January 4, 2015 Maybe mta bug #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
darhal Posted January 4, 2015 Posted January 4, 2015 Change the vehicle dont use banshe use infernus or smthg like this #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
Mizudori Posted January 4, 2015 Author Posted January 4, 2015 I used monster track and others cars it shown exactly the same thing as on my screen.
TrapLord Studios™ Posted January 4, 2015 Posted January 4, 2015 Try using this along with the script, so it will get the specific upgrades for the specified model. getVehicleModelFromName Visit TrapLord Studios™
Mizudori Posted January 4, 2015 Author 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
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