Jump to content

how can I make this work?


IIYAMA

Recommended Posts

  • Moderators
Posted

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 

  Tutorials  4x 

 

Posted

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

Posted
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
Posted

ok,

that last part should work.

thank you very much :D

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...