Jump to content
  • 0

~~ Can Help Me ?? ~~


‎‏M‎‏

Question

HI :mrgreen:

It seems that I have a problem to server :D

Because there is a script shop when entering the server Broken

And must be restart to work

Will help me to find a way to restart automatically when you enter the player :fadein:

~~

function restartAllResources() 
  
    local allResources = getResources() 
  
    for index, shop in ipairs(allResources) do 
        -- if it's running, 
        if getResourceState(shop) == "running" then 
  
            restartResource(shop) 
        end 
    end 
end 
  
addEventHandler("onPlayerJoin", getRootElement(), restartAllResources ) 

<meta> 
      <info author="mta" type="script" version="1.0" /> 
    <script src="restartshop.lua"/> 
     
</meta> 

Link to comment

2 answers to this question

Recommended Posts

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