Jump to content
  • 0

Server scripts vs Client scripts


Sandbird

Question

I am a bit confused when it comes to scripts that are server based and client based.

I see in the dayz_server.pbo it has some functions that operate on client side.

 

If i wanted to run a script that will be placed in dayz_server.pbo, how can i execute this on the client side?

Its a script that i want it to run all the time until a player triggers an event and then the waituntil on the script will be released running the code.

 

I just dont understand why this works if i place it on the MPMission folder init.sqf

 

_nill = execvm "custom_scripts\trigger.sqf";

 

but when i move the script in the server.pbo and do in the server_function.sqf

 

_nill = execvm "\z\addons\dayz_server\init\trigger.sqf";

 

it wont work.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Are you getting any errors in your .rpt file. Specifically file not found errors. That would imply packaging the pbo with a missing prefix.

Am assuming you know that already. so, what are you trying to do ? Have found through hours of trying to get lights to work that some things only work locally. Eg. A #lightpoint created on the server is not seen by the clients..

Usually, in the biki, it does say somewhere if it is local or not..sometimes not :)

Link to comment
Share on other sites

  • 0

no errors, although when i do _nill = execvm "\z\addons\dayz_server\init\trigger.sqf";    the client says it cant find trigger.sqf (which is there oO)

pbo is packed fine with PBOManager, the prefix is there and the checksum exists.

 

I want to put my code in the server file for 2 reasons.

1) I want to learn how to do this, to start putting my client addons there instead of the mppmission file cause ....my mission is already 3mb :/

2) ...hide some addons, so the server is unique. Last Chernarus server we had, had tons of people but after a while i saw some servers had the exact same mods and the exact same 'errors' i've made on earlier versions of it.

Link to comment
Share on other sites

  • 0

I'm currently also trying to make my admin tools server side instead of client with no luck what so ever, so if you can get something like that to run on the server let me know!

 

yeah admin tools will need alot of work to get inside server files....that free anti-hack roaming around opendayz has some admin tools in it...maybe you can find what you are looking for there.

I have customized my admin tools alot, and i see no way of adding them to server files.....i cant even get the simple sidechat to show on clients....

I've had 5 different server versions...vanilla chernarus, lingor, taviana 2, Origins and epoch. Only origins and epoch were the 2 most difficult servers to 'tweak'.

I can only imagine the hell i'll go through if i start bringing my old chernarus scripts to work with epoch....and most of them are client based.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...