whisper 0 Posted July 7, 2009 (edited) Doolittle made this little tool for ArmA back in the days, I don't know if he's still active, but anyway, I took his concept and adapted to ArmA2. Originally intended for my server, I guess I can make it public. EDIT June 16th 2010 : : New release has changed the installed files and addon requirements on server. People already using this should re-read the description below :) Goal This addon is to be installed only on your server. It requires Extended_Eventhandlers, that are included in CBA (on your server only, once again, clients don't need these addons, they can run Vanilla ArmA2 or whatever addon permitted) It will, at each mission startup, send a string to each client containing scripting code. This code will be executed on every clients, even clients connecting after mission startup. This code will be executed for every mission Installation Uncompress in main ArmA2 directory of server, it'll create in the main directory a serverSide subfolder and 2 .sqf files : ArmA2\globalscript.sqf ArmA2\serverside.sqf ArmA2\serverSide\Addons\serverSide.pbo Launch the server with -mod=@CBA;serverSide Utilization globalscript.sqf file contains the code that will be sent to all connected machines, in the format : " <Code to execute> ... " call WHIS_createLogicCode; This file is in readable format at the root ArmA2 directory It can be modified before launching the server. From this code, you can execute on each client commands independantly of the mission played, using commands that should only have a local use, like setting the grass level of detail, view distance, or printing regular hints and messages. serverside.sqf contains a script that will be executed exclusively on the server. Handy to separate server and client sides of things :) Examples Here are some examples of globalscript.sqf coding for various uses : * Disabling grass and forcing view distance on clients * Having regular hint advertisement on player's screen * Disabling 3rd Person View only for infantry, enabling 3rd Person View only when in vehicle Download and feedback The ServerSide Addon now has a Dev-Heaven project space, for bug reporting, help and further suggestion: http://dev-heaven.net/projects/serversidescripting/wiki/Wiki You can get latest versions when they come out on the Files area of the DH project space : http://dev-heaven.net/projects/serversidescripting/files Report bugs and wishlist on the Issues pages http://dev-heaven.net/projects/serversidescripting/issues Versions 1.1 : Added CBA and postInit_XEH usage, now works on any island 1.0 : Initial release, Chernarus only Future I'm going to concentrate on adding new features in globalscript.sqf and serverside.sqf. Next target is releasing a server-wide anti-TK feature. Credits Doolitle for the original concept. CBA crew Sickboy for advice and permanent help Kju for advice and permanent help Mikero and Killswitch for easing workload on Linux server ArmaLiga.de for the excellent infantry 3rd person view system Edited June 16, 2010 by whisper Explicite title Share this post Link to post Share on other sites
Doolittle 0 Posted July 8, 2009 What's: while {true} do { hint ""TeamSpeak Server IP :X.X.X.X:8767""; sleep 10; hint ""InGame VoIP activated on server, Caps Lock to use""; sleep 10; hint ""use ingame chat with /, change your channels to be heard!""; sleep 300; }; ....? Share this post Link to post Share on other sites
whisper 0 Posted July 8, 2009 A permanent in-game messaging system. I use it to advertise from time to time the TS IP address, and tell things for newcomers :) Share this post Link to post Share on other sites
Minizzzile 10 Posted July 11, 2009 (edited) Ahh okay, so I can just take the globalServer.sqf file and place it in the addons folder to our server? -sorry for bump, posted in the wrong forum somehow...- Edited July 11, 2009 by Minizzzile Share this post Link to post Share on other sites
whisper 0 Posted July 11, 2009 In your main ArmA directory, you should have : globalServer.sqf noGrass directory, containing an "Addons" directory with a pbo in it Modify the globaServer.sqf to suit your needs. Launch the server with parameter -mod=noGrass Share this post Link to post Share on other sites
KvakMekRampa 10 Posted July 17, 2009 I have problems to download it, please reupload it to another server. Thx. Share this post Link to post Share on other sites
whisper 0 Posted July 18, 2009 Looks like dump.no is unavailable. Will sort that out asap Share this post Link to post Share on other sites
whisper 0 Posted July 20, 2009 (edited) Hosting changed to filefront, it should be OK now, check OP. Sorry for the long delay Beware I changed the filename and instructions Edited July 20, 2009 by whisper Share this post Link to post Share on other sites
l mandrake 9 Posted July 22, 2009 sorry if this is a dumb question - but would this allow me to force people joining my server to use a mod such as afp's minimal crosshair - even if they don't have it installed? Share this post Link to post Share on other sites
whisper 0 Posted July 22, 2009 easily, no. With a bit of heavy investigation on how to check client-side the existance of a class specific to your addon (if any) and forcing client disconnection, perhaps Share this post Link to post Share on other sites
Roler 10 Posted July 22, 2009 A permanent in-game messaging system. I use it to advertise from time to time the TS IP address, and tell things for newcomers I don't think that many players like this sound. As far as I know there was a command like 'hint' but without sound( hintSilent? ). I would be better, I think. Share this post Link to post Share on other sites
whisper 0 Posted July 23, 2009 Thanks for the tip, hintSilent doest indeed exist, it's a new ArmA2 command though, apparently. Thing is, the globalServer.sqf file is plain text for any admin to modify it at will. It's the purpose of the tool, you do what you want to Share this post Link to post Share on other sites
Taxman 10 Posted July 31, 2009 Still cant get this too work,, any ideas... no grass wont work and neither will the messages. :( Share this post Link to post Share on other sites
=SF=Hyrax 0 Posted July 31, 2009 i had this same problem but if you put the setterraingrid 50; into your missions init file it will disable grass Share this post Link to post Share on other sites
Taxman 10 Posted July 31, 2009 yeah i realise that, but wanted to be able to set it globally if poss, and the messages would have come in handy, Thanks anyway Hyrax Share this post Link to post Share on other sites
TheDaddy2003 0 Posted August 5, 2009 Doesnt loop the text! Share this post Link to post Share on other sites
tcp 10 Posted August 8, 2009 (edited) What does the mod actually do? Edited August 11, 2009 by tcp Share this post Link to post Share on other sites
TAW_T-Bone 10 Posted August 20, 2009 I have no clue Share this post Link to post Share on other sites
mattxr 9 Posted August 20, 2009 Yeh it doesnt quite work :) Share this post Link to post Share on other sites
whisper 0 Posted August 20, 2009 Looks like I missed some posts during my holidays! Right : This addon is made to execute code on every client connecting to your server. Code is stored on the server, and is injected on client PC and executed when the client connects. Download the addon, extract into your server's main ArmA2 directory, it will create a serverSide directory and add a globalServer.sqf file into your server's ArmA2 main directory. Launch the game with a "serverSide" mod (with parameter -mod=serverSide) The code executed in every client PC is in the globalServer.sqf file in you server's main ArmA2 directory. It's the whole part between "" in the .sqf file. Why execute code on clients? Well, tons of reasons, mainly to execute command which, if executed on server, would have no effect on clients. I used it to : - execute setTerrainGrid 50; on every client to remove grass on the client PCs without having to modify every mission manually to do so (the code is executed whatever the mission played) - Execute a regular loop on clients making regular hint to indicate my TS Server's IP address and other various message, this regularly (not only once on client connection) And yeah, it does work :) Share this post Link to post Share on other sites
private plowjoy 0 Posted August 24, 2009 Looks like I missed some posts during my holidays! Right : This addon is made to execute code on every client connecting to your server. Code is stored on the server, and is injected on client PC and executed when the client connects. Download the addon, extract into your server's main ArmA2 directory, it will create a serverSide directory and add a globalServer.sqf file into your server's ArmA2 main directory. Launch the game with a "serverSide" mod (with parameter -mod=serverSide) The code executed in every client PC is in the globalServer.sqf file in you server's main ArmA2 directory. It's the whole part between "" in the .sqf file. Why execute code on clients? Well, tons of reasons, mainly to execute command which, if executed on server, would have no effect on clients. I used it to : - execute setTerrainGrid 50; on every client to remove grass on the client PCs without having to modify every mission manually to do so (the code is executed whatever the mission played) - Execute a regular loop on clients making regular hint to indicate my TS Server's IP address and other various message, this regularly (not only once on client connection) And yeah, it does work :) Thanks for the heads-up on this mate but it's just not working. I still get grass in MP games. My Arma2 server folder is as follows. Root of the folder has a 'serverSide' folder which contains an 'Addons' folder and inside that a 'serverSide.pbo' file. 'globalserver.sqf' also sits in the root of my Arma2 server folder. The globalserver.sqf file contains 'setTerrainGrid 50; My server startup batch file contains -mod=serverSide Where am I going wrong? Share this post Link to post Share on other sites
whisper 0 Posted August 24, 2009 You setup looks ok. Strange. Can you check your server's arma.rpt for any error message that may come from, say, syntax error in the .sqf I provided? Share this post Link to post Share on other sites
private plowjoy 0 Posted August 24, 2009 (edited) You setup looks ok. Strange. Can you check your server's arma.rpt for any error message that may come from, say, syntax error in the .sqf I provided? Ignore me, was looking at the start of the file, ahem :) Right, got an error... 2009/08/24, 19:40:25 Error in expression <[] spawn { //game settings, setTerrainGrid 50 remov> 2009/08/24, 19:40:25 Error position: <//game settings, setTerrainGrid 50 remov> 2009/08/24, 19:40:25 Error Invalid number in expression 2009/08/24, 19:40:25 Error in expression <[] spawn { //game settings, setTerrainGrid 50 remov> 2009/08/24, 19:40:25 Error position: <//game settings, setTerrainGrid 50 remov> 2009/08/24, 19:40:25 Error Invalid number in expression Edited August 24, 2009 by Private Plowjoy Share this post Link to post Share on other sites
whisper 0 Posted August 24, 2009 At the end is fine ** scratches head ** any other mod running at the same time? Share this post Link to post Share on other sites
private plowjoy 0 Posted August 24, 2009 At the end is fine** scratches head ** any other mod running at the same time? Clean install of Arma2, patched to 1.3 with the 1.3 arma2 server executable. The only extras are MP missions that i've added. Nothing else. Share this post Link to post Share on other sites