Jump to content

HELP script restart all


piKA

Recommended Posts

Posted

my mta server bugged and i need to restart all the scripts !

i can do that with P admin panel?

because i cant restart the server

Posted (edited)
7 hours ago, piKA said:

my mta server bugged and i need to restart all the scripts !

i can do that with P admin panel?

because i cant restart the server

use these functions :

getResources () -- this function returns a table, so you need a loop for get the resources

getResourceName() -- use this function in the loop for get the name of the resource
-- or use directly:
restartResource(value) -- use this function in the loop when you want to restart the resource , value = value of the loop

 

Edited by NX_CI
Posted

server side 

addCommandHandler ( "rsall" , function ( ) 
for k,v in ipairs ( getResources ( ) ) do 
if ( getResourceState ( v ) == "Running" ) then 
restartResource ( v )
end
end
end ) ; 

 

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