Finest Posted May 15, 2013 Share Posted May 15, 2013 Hello Everybody im new here an i hope anyone can help me i would like to use the custom script to set the Maxplayers Variable in my Config.cfg MOVE dayz_1_2017.chernarus\Config.cfg dayz_1_2017.chernarus\server.old Type dayz_1_2017.chernarus\server.old | findstr /v maxPlayers > dayz_1_2017.chernarus\server.old2 Echo maxPlayers = $[service.Slots]; >> dayz_1_2017.chernarus\server.old2 MOVE dayz_1_2017.chernarus\server.old2 dayz_1_2017.chernarus\Config.cfg If Exist dayz_1_2017.chernarus\server.old Del dayz_1_2017.chernarus\server.old If Exist dayz_1_2017.chernarus\server.old2 Del dayz_1_2017.chernarus\server.old2 when i start the bat alone it will work fine but when i use the custom scripts i will get no effekt on this :/ Operation System: Windows (for arma2) Script Engine: Batch/Shell before Start Ignore errors so what i do false :/ i hope anyone can help me :/ Link to comment Share on other sites More sharing options...
Finest Posted May 15, 2013 Author Share Posted May 15, 2013 not it works but ! what variable i need to use for custom scripts ! $[service.Slots] in need a value like this %slots% Link to comment Share on other sites More sharing options...
Raizio Posted May 15, 2013 Share Posted May 15, 2013 TCAdmin will recognize this for your needs; %ThisService_Slots% Link to comment Share on other sites More sharing options...
Finest Posted May 15, 2013 Author Share Posted May 15, 2013 (edited) @echo off MOVE dayz_1_2017.chernarus\Config.cfg dayz_1_2017.chernarus\server.old Type dayz_1_2017.chernarus\server.old | findstr /v maxPlayers > dayz_1_2017.chernarus\server.old2 Echo maxPlayers = %ThisService_Slots%; >> dayz_1_2017.chernarus\server.old2 MOVE dayz_1_2017.chernarus\server.old2 dayz_1_2017.chernarus\Config.cfg If Exist dayz_1_2017.chernarus\server.old Del dayz_1_2017.chernarus\server.old If Exist dayz_1_2017.chernarus\server.old2 Del dayz_1_2017.chernarus\server.old2 atm i use Before started (executed by the Service Manager) and before started dont support this service .... aaa shit how can i use now the playersvariable ... Available variables: Service Manager Scripting Variables Edited May 15, 2013 by Finest Link to comment Share on other sites More sharing options...
Finest Posted May 15, 2013 Author Share Posted May 15, 2013 when i use this script as a action script it will work ... arg Link to comment Share on other sites More sharing options...
LFA Posted May 17, 2013 Share Posted May 17, 2013 The slots are not available in the before start event. http://help.tcadmin.com/Service_Manager_Scripting_Variables What you can do is save the slots to a file and read it in the before start script. Link to comment Share on other sites More sharing options...
Finest Posted May 17, 2013 Author Share Posted May 17, 2013 i have know set the slots in config file with the configuration editor and it works now ! Link to comment Share on other sites More sharing options...
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