piKA Posted July 22, 2019 Share Posted July 22, 2019 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 Link to comment
Scripting Moderators ds1-e Posted July 23, 2019 Scripting Moderators Share Posted July 23, 2019 4 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 First example. https://wiki.multitheftauto.com/wiki/RestartResource Link to comment
nxFairlywell Posted July 23, 2019 Share Posted July 23, 2019 (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 July 23, 2019 by NX_CI Link to comment
Hakan Posted July 23, 2019 Share Posted July 23, 2019 server side addCommandHandler ( "rsall" , function ( ) for k,v in ipairs ( getResources ( ) ) do if ( getResourceState ( v ) == "Running" ) then restartResource ( v ) end end end ) ; Link to comment
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 accountSign in
Already have an account? Sign in here.
Sign In Now