WerTer Posted October 13, 2023 Share Posted October 13, 2023 Hello there i was trying to script when you drive on the grass the car loses grip and becomes undriveable but it doesn't work tried changing values from 255 to 0 but nothing happens here is the script function tyregrip() engineSetSurfaceProperties(9, tyregrip, 255) engineSetSurfaceProperties(10, tyregrip, 255) engineSetSurfaceProperties(11, tyregrip, 255) engineSetSurfaceProperties(12, tyregrip, 255) engineSetSurfaceProperties(13, tyregrip, 255) engineSetSurfaceProperties(14, tyregrip, 255) engineSetSurfaceProperties(15, tyregrip, 255) engineSetSurfaceProperties(16, tyregrip, 255) engineSetSurfaceProperties(17, tyregrip, 255) engineSetSurfaceProperties(20, tyregrip, 255) engineSetSurfaceProperties(80, tyregrip, 255) engineSetSurfaceProperties(81, tyregrip, 255) engineSetSurfaceProperties(82, tyregrip, 255) engineSetSurfaceProperties(115, tyregrip, 255) engineSetSurfaceProperties(116, tyregrip, 255) engineSetSurfaceProperties(117, tyregrip, 255) engineSetSurfaceProperties(118, tyregrip, 255) engineSetSurfaceProperties(119, tyregrip, 255) engineSetSurfaceProperties(120, tyregrip, 255) engineSetSurfaceProperties(121, tyregrip, 255) engineSetSurfaceProperties(122, tyregrip, 255) engineSetSurfaceProperties(125, tyregrip, 255) engineSetSurfaceProperties(146, tyregrip, 255) engineSetSurfaceProperties(147, tyregrip, 255) engineSetSurfaceProperties(148, tyregrip, 255) engineSetSurfaceProperties(149, tyregrip, 255) engineSetSurfaceProperties(150, tyregrip, 255) engineSetSurfaceProperties(151, tyregrip, 255) engineSetSurfaceProperties(152, tyregrip, 255) engineSetSurfaceProperties(153, tyregrip, 255) engineSetSurfaceProperties(160, tyregrip, 255) outputChatBox( "test" ) end addCommandHandler( "grip", tyregrip) Link to comment
Hydra Posted October 14, 2023 Share Posted October 14, 2023 You are not doing it correctly, it should be: function GripTyre() engineSetSurfaceProperties(9, "tyregrip", 255) engineSetSurfaceProperties(10, "tyregrip", 255) engineSetSurfaceProperties(11, "tyregrip", 255) engineSetSurfaceProperties(12, "tyregrip", 255) engineSetSurfaceProperties(13, "tyregrip", 255) engineSetSurfaceProperties(14, "tyregrip", 255) engineSetSurfaceProperties(15, "tyregrip", 255) engineSetSurfaceProperties(16, "tyregrip", 255) engineSetSurfaceProperties(17, "tyregrip", 255) engineSetSurfaceProperties(20, "tyregrip", 255) engineSetSurfaceProperties(80, "tyregrip", 255) engineSetSurfaceProperties(81, "tyregrip", 255) engineSetSurfaceProperties(82, "tyregrip", 255) engineSetSurfaceProperties(115, "tyregrip", 255) engineSetSurfaceProperties(116, "tyregrip", 255) engineSetSurfaceProperties(117, "tyregrip", 255) engineSetSurfaceProperties(118, "tyregrip", 255) engineSetSurfaceProperties(119, "tyregrip", 255) engineSetSurfaceProperties(120, "tyregrip", 255) engineSetSurfaceProperties(121, "tyregrip", 255) engineSetSurfaceProperties(122, "tyregrip", 255) engineSetSurfaceProperties(125, "tyregrip", 255) engineSetSurfaceProperties(146, "tyregrip", 255) engineSetSurfaceProperties(147, "tyregrip", 255) engineSetSurfaceProperties(148, "tyregrip", 255) engineSetSurfaceProperties(149, "tyregrip", 255) engineSetSurfaceProperties(150, "tyregrip", 255) engineSetSurfaceProperties(151, "tyregrip", 255) engineSetSurfaceProperties(152, "tyregrip", 255) engineSetSurfaceProperties(153, "tyregrip", 255) engineSetSurfaceProperties(160, "tyregrip", 255) iprint("Tyre grip started") end addCommandHandler( "grip", GripTyre) 1 Link to comment
WerTer Posted October 16, 2023 Author Share Posted October 16, 2023 Thanks it worked sorry for wasting a bit of your time I did not read properly wiki for engineSetSurfaceProperties thanks again. And for those looking for more info of this function i found this page really helpful https://github.com/multitheftauto/mtasa-blue/pull/702 Link to comment
Hydra Posted October 17, 2023 Share Posted October 17, 2023 16 hours ago, WerTer said: Thanks it worked sorry for wasting a bit of your time I did not read properly wiki for engineSetSurfaceProperties thanks again. And for those looking for more info of this function i found this page really helpful https://github.com/multitheftauto/mtasa-blue/pull/702 No problem, your welcome 1 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