Home   Help Search Login Register  

Author Topic: Client custom action, not running on server  (Read 1140 times)

0 Members and 1 Guest are viewing this topic.

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Client custom action, not running on server
« on: 04 Mar 2004, 02:09:44 »
I've determined that when a clinet uses a custom action assigned to them, the activated script doesnt run on the server, it only runs locally.  How can I get the script to run on the server?

I added in simple hints to show then the server ran various parts of the script, however they dont show when the client activates the script.  If the server does however, the script works flawlessly.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Client custom action, not running on server
« Reply #1 on: 04 Mar 2004, 02:19:22 »
have the client action run a script that declares a boolean then PV's the boolean

Use a looping script on clients and server that is checking for the boolean to become true, and when it does, execute the script from the looping check system you have



eg
Addaction runs a local script on the client machine which declares
Runscript = True; Publicvariable "Runscript"

and then on all machines that you want the script to run on, have then run the following looping script or use a trigger activated by boolean


#START
~1
?RUNSCRIPT: goto "STARTSCRIPT"
goto "START"

#STARTSCRIPT
[] Exec "Myscript.sqs"
Runscript = False
;;Exit
goto "START"


Turn the boolean back off again, ready to be re initiated, or if its a one off action simply exit the looping script after it has been initiated
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Client custom action, not running on server
« Reply #2 on: 04 Mar 2004, 02:43:54 »
Thats the way I came up with, I was hoping there was a more elegant way, but I will happily settle.  Thank you very much.