Guest Posted July 19, 2018 Posted July 19, 2018 Help please ! local playerBikes = { [522]=true, [468]=true } addEventHandler ( "onVehicleEnter",root, function ( thePlayer, seat, jacked ) if playerBikes[seat] then addPedClothes ( thePlayer, 16 ) end end ) addEventHandler ( "onVehicleExit",root, function ( thePlayer, seat, jacked ) removePedClothes ( thePlayer, 16 ) end )
Moderators IIYAMA Posted July 20, 2018 Moderators Posted July 20, 2018 A vehicle seat isn't a vehicle model. The vehicle seat: a number represents the location of the player in the vehicle. But a vehicle model: https://wiki.multitheftauto.com/wiki/Vehicle_IDs https://wiki.multitheftauto.com/wiki/GetElementModel if playerBikes[getElementModel( source )] then Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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