Jump to content
DankanX37

Issue with server script ran from vehicle init

Recommended Posts

So I made a mod where I created a vehicle and I used the vehicle's "init" event handler.

From the event handler I remotely execute a function: 

[_this # 0] remoteExec ['function', 2, false];

 

The first line of the function contains this:

if(!isServer) exitWith {}

 

I'm being told that the script isn't running and I was wondering what was wrong with this, everything compiles and works in SP, but on MP (dedicated servers) nothing works.

Could it be I need to setup CfgRemoteExec?

Thanks.

Share this post


Link to post
Share on other sites

What's in the function? May be a locality issue, since it's only being executed on the server.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Harzach said:

What's in the function? May be a locality issue, since it's only being executed on the server.

Yes apparently switching it to if(!local _unit) exitWith {}

fixed this issue, though I find it strange that it's not running on the server, my fear is that it will run for every client...

 

On top of that,  I have the same issue with a function set to postInit, it has the exact same structure and once again, it's not running.

 

I do want to mention that I am using FASTER and I have set the mod to run on Server, Client, and Headless. 

Could this have something to do with the matter?

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

×