Alemarius Nexus Posted July 16, 2009 Share Posted July 16, 2009 Hi. I have a problem using the getVehiclePanelState() function. This is what I have: local veh = createVehicle(420, -2253.28, 13.7155, 35) setVehiclePanelState(veh, 0, 3) setVehiclePanelState(veh, 1, 3) setVehiclePanelState(veh, 2, 3) setVehiclePanelState(veh, 3, 3) setVehiclePanelState(veh, 4, 3) setVehiclePanelState(veh, 5, 3) setVehiclePanelState(veh, 6, 3) outputDebugString("0: "..getVehiclePanelState(veh, 0)) outputDebugString("1: "..getVehiclePanelState(veh, 1)) outputDebugString("2: "..getVehiclePanelState(veh, 2)) outputDebugString("3: "..getVehiclePanelState(veh, 3)) outputDebugString("4: "..getVehiclePanelState(veh, 4)) outputDebugString("5: "..getVehiclePanelState(veh, 5)) outputDebugString("6: "..getVehiclePanelState(veh, 6)) Now I expect all the functions to return 3 (well, maybe some not, because some panels may not be supported), but the output is: [21:16:08] INFO: 0: 0 [21:16:08] INFO: 1: 0 [21:16:08] INFO: 2: 0 [21:16:08] INFO: 3: 192 [21:16:08] INFO: 4: 12 [21:16:08] INFO: 5: 0 [21:16:08] INFO: 6: 0 Is there anything wrong in my code? I can't imagine what, so may it be a bug? I'm using MTA server v1.0dp2 for Linux. Thanks in advance! Link to comment
50p Posted July 16, 2009 Share Posted July 16, 2009 This function never worked correctly. Even if you change the state and function returned true, you may not see its results. There is nothing wrong with your code but make sure you use onResourceStart event instead of using none. Link to comment
Alemarius Nexus Posted July 16, 2009 Author Share Posted July 16, 2009 This function never worked correctly. Even if you change the state and function returned true, you may not see its results Hmm, ok. Let's hope it will be fixed in later versions. but make sure you use onResourceStart event instead of using none. I do, just didn't post it. Thanks for you 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