Jump to content

Train resouce


Recommended Posts

Would Be Better To Use

  
-- ServerSide Script 
addEventHandler("onResourceStart",getRootElement(), 
function () 
    local myTrain = createVehicle(537,1995,-1949,13)  -- Create the train 
    setTrainDirection(myTrain, true) -- Make the train drive clockwise 
        setTrainSpeed(myTrain, 1) -- Speed up 
end 
) 
  

Link to comment

Using root will trigger for any resource start.

-- ServerSide Script 
addEventHandler("onResourceStart",resourceRoot, 
function () 
        local myTrain = createVehicle(537,1995,-1949,13)  -- Create the train 
        setTrainDirection(myTrain, true) -- Make the train drive clockwise 
        setTrainSpeed(myTrain, 1) -- Speed up 
end 
) 

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