Jump to content
Sign in to follow this  
Bulldog72

Client needs to start a script that runs on dedicated server only

Recommended Posts

I need some help/advise on how to start a script on a dedicated server.

Basically I have a script that is called by a client from his action menu and creates a car.

If a player does this I want to start a simple monitor script that does "something" if the car is destroyed at some later time.

I can do all this in a single player environment and its working as intended - but now said monitor script needs to run server side (only) in case the player disconnects and leaves the spawned car behind and I am not sure how to do this correctly...

Share this post


Link to post
Share on other sites

Not sure/tested but maybe if you set a variable (eg. runscriptnow) to false initially, then when the player activates the action menu item it sets runscriptnow to true.

At the start of your server script something like

if (isServer) then {

waitUntil (runscriptnow);

etc.

..

}

Something like that should work? (May be a bit of a hack way but hey... I am rubbish at scripting so its how I get stuff to work!)

Share this post


Link to post
Share on other sites

Ty, that thread is indeed helpful.

Looks like I would be needing CBA for optimal results after all...

Share this post


Link to post
Share on other sites

if you look at my post- it does the job needed and you can use it for calling various scripts to be run on the server. Not necessary to use CBA - you can code it yourself to be efficient. HOWEVER - CBA is well designed and does the job required and less grief!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×