SadBoy1981 Posted April 8, 2015 Report Share Posted April 8, 2015 Is there some good info how to run scripts server side to protect own work? Link to comment Share on other sites More sharing options...
1Man Posted April 8, 2015 Report Share Posted April 8, 2015 Try this Link to comment Share on other sites More sharing options...
horbin Posted April 8, 2015 Report Share Posted April 8, 2015 FuMS uses some script transfer routines you may find helpful. Link to comment Share on other sites More sharing options...
knights†emplar Posted April 8, 2015 Report Share Posted April 8, 2015 config.cpp is your new friend :-) Link to comment Share on other sites More sharing options...
KiloSwiss Posted April 8, 2015 Report Share Posted April 8, 2015 http://kiloswiss.ch/misc/arma3/a3autoexec_addon.zip RHE24 1 Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 8, 2015 Report Share Posted April 8, 2015 Noob question incoming What's the difference between dedicated and localhost and under what circumstances would you specify either or both? Link to comment Share on other sites More sharing options...
KiloSwiss Posted April 8, 2015 Report Share Posted April 8, 2015 Localhost is when You start a mission ingame (also if You load a mission and klick preview in the mission editor) and Your client then also works as a host/server. A dedicated is, well a dedicated Server, startet via the server executable. For more information, read this great Article from KillzoneKid: Or use the official BIS Arma wiki pages as source of information:https://community.bistudio.com/wiki/isServer Or use the official BIS Arma wiki pages as source of information:https://community.bistudio.com/wiki/isServerhttps://community.bistudio.com/wiki/isDedicatedhttps://community.bistudio.com/wiki/hasInterfacehttps://community.bistudio.com/wiki/isMultiplayer Darth_Rogue 1 Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 9, 2015 Author Report Share Posted April 9, 2015 Is it possible execute MPMission altis.pbo script from @epoch.hive/addons/pbo ? Link to comment Share on other sites More sharing options...
RHE24 Posted April 10, 2015 Report Share Posted April 10, 2015 Is it possible execute MPMission altis.pbo script from @epoch.hive/addons/pbo ? a mpmission File? NO WAY this File is for Clients some Scripts from a MPMissionfile? YES THIS WORKS Link to comment Share on other sites More sharing options...
GZA Posted April 10, 2015 Report Share Posted April 10, 2015 Is there some good info how to run scripts server side to protect own work? You could compile the scripts server side and broadcast them via publicvariable. Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 10, 2015 Author Report Share Posted April 10, 2015 You could compile the scripts server side and broadcast them via publicvariable. This is what i want to understand! Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 10, 2015 Report Share Posted April 10, 2015 I'm gradually moving more and more stuff server side. I'd love to get R3F moved there but that's a pretty big project. Link to comment Share on other sites More sharing options...
1Man Posted April 10, 2015 Report Share Posted April 10, 2015 I don't think it hurts to have some run client side, I would rather them eat some of the performance hit Link to comment Share on other sites More sharing options...
GZA Posted April 10, 2015 Report Share Posted April 10, 2015 This is what i want to understand! Have a look at this post. Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 10, 2015 Author Report Share Posted April 10, 2015 I'm gradually moving more and more stuff server side. I'd love to get R3F moved there but that's a pretty big project. Can you share some example how to do that! Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 10, 2015 Report Share Posted April 10, 2015 Can you share some example how to do that! It's quite easy really. You just create an addon PBO and call scripts from it. In your fn_init.sqf in the PBO make it look like this: // ADDONS scrpt1 = compileFinal preprocessFileLineNumbers "\a3_epoch_addons\scripts\scrpt1.sqf"; scrpt2 = compileFinal preprocessFileLineNumbers "\a3_epoch_addons\scripts\scrpt2.sqf"; scrpt3 = compileFinal preprocessFileLineNumbers "\a3_epoch_addons\scripts\scrpt3.sqf"; publicVariable "scrpt1"; publicVariable "scrpt2"; publicVariable "scrpt3"; diag_log "Epoch Addons compiled"; Then in your mission file create a file called onPlayerRespawn.sqf. Inside that file, place this: if (!isDedicated and hasInterface) then { waitUntil {alive vehicle player}; waitUntil {typeOF player != "VirtualMan_EPOCH"}; waitUntil{!isNil "Scrpt1"}; [] spawn Scrpt1; waitUntil{!isNil "Scrpt2"}; [] spawn Scrpt2; waitUntil{!isNil "Scrpt3"}; [] spawn Scrpt3; }; That way the public variables get put back onto players on respawn events. The onPlayerRespawn.sqf does NOT need to be called from any other files. Just place it in your mission's root folder. Note that for every new pubvar you create you will have to add an exception to the pubvar.txt BE filter, like !="scrpt1" !="scrpt2" !="scrpt3" There are certain things though that have to remain client side, like the status bar, but many things can be moved server side. Basically anything that adds a function or action to the player can go server side and be called from a public variable. Depending on the size and complexity of the script it may take some recoding to make it work. Anything that is more complex than a single file or two probably wouldn't be practical just because of all the re-writing that would be necessary. Now R3F....that's doable, but it would take a lot of time and trial and error since there's so many scripts and variables. One word of caution though. Anytime you introduce a public variable, it's...well...public, which means it could potentially be accessed by other players for dishonest purposes. So I'd avoid setting anything to a public variable that can potentially have negative player effects if the wrong person got ahold of the variables. Link to comment Share on other sites More sharing options...
Face Posted April 10, 2015 Report Share Posted April 10, 2015 Broadcasting code isn't a good idea from a performance perspective. First, sending multiple PVs to multiple clients is not performance friendly and increases network traffic, and PVing code is even less so. Put them together and you're on your way to adding more desync to your server. KiloSwiss 1 Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 10, 2015 Report Share Posted April 10, 2015 Important considerations to make, for sure. :) Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 10, 2015 Author Report Share Posted April 10, 2015 Thanks for info! I just try to found out, how to hide my own configs and scripts hide "players" Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 11, 2015 Author Report Share Posted April 11, 2015 a mpmission File? NO WAY this File is for Clients some Scripts from a MPMissionfile? YES THIS WORKS u are wrong, i call my ammo box script located in \MPMissions\epoch.Altis\ammo_box.sqf from \@epochhive\addons\spawn_ammo_box.pbo Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now