Jump to content
  • 0

Executing Server.pbo scripts from self actions


Guest

Question

Hi, so when a player points at a flag I'm looking to fire off a script that is in the server.pbo or server side? I'm doing it from the self actions file, that I have working, but executing the file that's in the server.pbo doesn't work. Anyone have a work around? I thought about creating a server side loop that checks a public var..

 

Thanks,

-Silk 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Lookup publicvariableserver and eventhandler.

You basically just need to create a public variable. Put an array of parameters you want to pass to the server side script and call the publicvariableserver command to pass it you the server. The server has an eventhandler listening for that variable changi get and when it does it calls a server side script with the contents of the passed variable (in whole or selected elements also possible if an array is passed).

For an example, look at remove.sqf . It calls a public variable at the end. Check publceh.sqf to see where the eventhandler is defined and how it spawns the script server side.

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
  • Discord

×
×
  • Create New...