Jump to content

[HELP] notMovable


ViRuZGamiing

Recommended Posts

Posted

Hi,

I want to create a Showroom car but i'm afraid that people will push the car so how can I make it notMovable?

Thanks in advance.

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

  • Moderators
Posted
setElementFrozen 

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

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Yup works,

Now I have

local driver = getVehicleOccupant ( source ) 
    if ( driver ) then 

but the source is created in another function do I need to re-create it in this function to work?

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted

Example:

I create my car in 1 function and want to call it in another function

function createCar () 
 local car = createVehicle (.....) 
end 

Then another function where i want to call 'car' back...

function callCar 
local driver = getVehicleOccupant ( car ) -- I want to call the 'car' from the other function 
 if ( driver ) then 
 ........ 
 end 
end 

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted
function createCar () 
  car = createVehicle (.....) 
end 

Just remove the local to do it there is code ^

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

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