F-22 Posted November 17, 2012 Posted November 17, 2012 Hello! Im having some trouble with changing handling. When i start the script, it works in the play gamemode, but it does not want to work in race. function handling ( ) for _,veh in pairs(getElementsByType("vehicle")) do if getElementModel(veh) == 541 then setVehicleHandling(veh, "handlingFlags", 0x284020) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), handling ) It just wont work in race
Castillo Posted November 17, 2012 Posted November 17, 2012 Try this: function handling ( ) if ( getElementModel ( source ) == 541 ) then setVehicleHandling ( source, "handlingFlags", 0x284020 ) end end addEventHandler ( "onVehicleEnter", getRootElement(), handling )
F-22 Posted November 17, 2012 Author Posted November 17, 2012 (edited) It still wont work, now not even in play Edited November 17, 2012 by Guest
Baseplate Posted November 17, 2012 Posted November 17, 2012 Well, on race you don't enter a vehicle, you just get spawned in it so, function handling ( ) if ( getElementModel ( source ) == 541 ) then setVehicleHandling ( source, "handlingFlags", 0x284020 ) end end addEventHandler ( "onResourceStart", resourceRoot, handling )
F-22 Posted November 17, 2012 Author Posted November 17, 2012 Nope, its the same... The steering should work like in a forklift, on the back wheels...
Renkon Posted November 17, 2012 Posted November 17, 2012 Why don't you just reply what was the problem and help everybody. You guys are just asking and asking but not cooperating nor helping other people
Baseplate Posted November 17, 2012 Posted November 17, 2012 And why did you go mad, just ask politely... Here's the answer: he puted it in a map resource + the event handler wasn't really the one should be used in race gamemode
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