Jump to content

car settime cancel


Estevam2d

Recommended Posts

Hi guys, i am with an problem can help-me ? I'm not achieving canceled set time when entering the vehicle.

I do not want to destroy the vehicle when returning to the car.

I am very beginner in the area to cancel a function

sorry bad english.

local car = 10000 
function desapar() 
    setTimer(destroyElement, car, 1, source) 
end 
addEventHandler("onVehicleStartExit",getRootElement(),desapar) 
  
addEventHandler("onVehicleStartEnter", getRootElement(), function ( theplayer, seat, jacked ) 
   destroyElement ( car) 
   end 
) 

Link to comment
  
local car = 10000 
function desapar() 
    setTimer(destroyElement, car, 1, source) 
end 
addEventHandler("onVehicleStartExit",getRootElement(),desapar) 
  
addEventHandler("onVehicleStartEnter", getRootElement(), function ( theplayer, seat, jacked ) 
   destroyElement ( source ) 
   end 
) 
  

Link to comment

I havê made this way yet the vehicle disappears with time.

what's wrong?

local car = 10000 
function desapar() 
    setTimer(destroyElement, car, 1, source) 
end 
addEventHandler("onVehicleStartExit",getRootElement(),desapar) 
  
function test() 
    if isTimer ( car ) then killTimer ( car ) end 
end 
addEventHandler("onVehicleStartEnter",getRootElement(),test) 

Link to comment
  
local carT = 10000 
function desapar() 
    car = setTimer(destroyElement, carT, 1, source) 
end 
addEventHandler("onVehicleStartExit",getRootElement(),desapar) 
  
function test() 
    if isTimer ( car ) then killTimer ( car ) end 
end 
addEventHandler("onVehicleStartEnter",getRootElement(),test) 
  

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