Moderators IIYAMA Posted October 22, 2012 Moderators Posted October 22, 2012 how can I make this work? warning ........................ Bad argument @ 'getVehicleType' local thrownout = { ["Bike"]=true, ["Boat"]=true, ["BMX"]=true, ["Quad"]=true} if (getVehicleType(theVehicle) == thrownout) then outputChatBox ("works!! fap fap fap") end wiki: https://wiki.multitheftauto.com/wiki/GetVehicleType 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
denny199 Posted October 22, 2012 Posted October 22, 2012 where's the function? where is theVehicle defined? edit: Or do this? if (getVehicleType(theVehicle) == "Bike" or getVehicleType(theVehicle) == "Boat" or getVehicleType(theVehicle) == "BMX" or getVehicleType(theVehicle) == "Quad") then outputChatBox ("works!! fap fap fap") end And then * fap fap fap fap fap * Sometimes I dream about cheese
Smart. Posted October 22, 2012 Posted October 22, 2012 local thrownout = { [ID]=true, } if (thrownout[getElementModel(theVehicle)]) then outputChatBox ("works!! fap fap fap") end edit: if you want to use name instead, use getVehicleModelFromName lol
Moderators IIYAMA Posted October 22, 2012 Author Moderators Posted October 22, 2012 ok, that last part should work. thank you very much 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