nexameu Posted February 10, 2014 Share Posted February 10, 2014 Hola, me pueden ayudar, es que quiero un script el cual inicie todos los demás pero que no sea /start "nombre del script", que tu pongas un comando y se inicien todos. Hello, can you help me, is that I want a script which starts everyone else but that is not / start "script name" put your command and all started. Link to comment
Jacobob14 Posted February 10, 2014 Share Posted February 10, 2014 Hola, me pueden ayudar, es que quiero un script el cual inicie todos los demás pero que no sea /start "nombre del script", que tu pongas un comando y se inicien todos.Hello, can you help me, is that I want a script which starts everyone else but that is not / start "script name" put your command and all started. mm not think there's such scrip but you can edit the metaserver for the scrip will initiate power on the server Link to comment
xXMADEXx Posted February 10, 2014 Share Posted February 10, 2014 addCommandHandler ( "startall", function ( ) for i, v in pairs ( getResources ( ) ) do if ( getResourceState ( v ) ~= "running" ) then startResource ( v ) end end end ) Link to comment
nexameu Posted February 11, 2014 Author Share Posted February 11, 2014 addCommandHandler ( "startall", function ( ) for i, v in pairs ( getResources ( ) ) do if ( getResourceState ( v ) ~= "running" ) then startResource ( v ) end end end ) Solo lo copio y lo pego?o le agrego algo más? Just copy it and paste?, Or I add something else? Link to comment
Damien_Teh_Demon Posted February 11, 2014 Share Posted February 11, 2014 addCommandHandler ( "startall", function ( ) for i, v in pairs ( getResources ( ) ) do if ( getResourceState ( v ) ~= "running" ) then startResource ( v ) end end end ) Solo lo copio y lo pego?o le agrego algo más? Just copy it and paste?, Or I add something else? This should work, and so you know how it works, what it's doing is adding a command and a function, and if the function is called by the command, get all the resources on server, and if the resource pulled from list isnt running ( which is what ~= means ) then start the resource that was pulled from the list of resources. You need to learn how things work before you try to makem work and ask for help, justa tip! Link to comment
xXMADEXx Posted February 11, 2014 Share Posted February 11, 2014 Just put it in a server-side script and make sure it has access to startResource. Link to comment
Damien_Teh_Demon Posted February 11, 2014 Share Posted February 11, 2014 Just put it in a server-side script and make sure it has access to startResource. Im not sure if it needs this or not, cant remmember, but you will most likely need to add it as a object under your admin acl group so it has access to resource managing ( truning on and off, etc ). You just need to add this underneath your admin section of ACL : 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