Jump to content

Syntax question


000000000000

Recommended Posts

Hello all,

In Java I would be able to do something like this:

local result = (vehicle == false or getVehicleOccupant(vehicle, 0) ~= localPlayer) 

This would store a boolean value in the result variable. Is there a similar way to do this in Lua? I tried searching the internet but I do not know how it's called and what to search for.

Thanks in advance,

Link to comment
Hello all,

In Java I would be able to do something like this:

local result = (vehicle == false or getVehicleOccupant(vehicle, 0) ~= localPlayer) 

This would store a boolean value in the result variable. Is there a similar way to do this in Lua? I tried searching the internet but I do not know how it's called and what to search for.

Thanks in advance,

I guess Lua its a bit baah compared to java xD

Try this :

if ( (vehicle == false or getVehicleOccupant(vehicle, 0) ~= localPlayer) ) then 
result = true 
else 
returl = false 
end 
  

I guess it works !

Link to comment

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