Jump to content

مساعده تشغيل


Recommended Posts

دا مثال اسف ان يوجد خطأ غير مجرب

  
resourcename = {"test","test2","test3"} 
  
addEventHandler("onResourceStart",resourceRoot,function() 
    for k,v in ipairs (#resourcename) do 
        local name = getResourceFromName(k) 
            startResource(name) 
    end 
end) 
  

Link to comment
resourcename = {"test1","test2","test3"} 
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for key, value in ipairs ( resourcename ) do 
            local resource = getResourceFromName ( value ) 
            if resource then 
                local state = getResourceState ( resource ) 
                if state == "loaded" or state == "stopping" then 
                    if not startResource ( resource ) then 
                        outputDebugString ( "#Auto-Start: Error, couldn't start '"..value.."'." ) 
                    end 
                end 
            else 
                outputDebugString ( "#Auto-Start: '"..value.."' not found." ) 
            end 
        end 
    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...