Jump to content
Sign in to follow this  
Timmymachine109

onPlayerConnected problems

Recommended Posts

Hi everyone,

I'm having major dramas with the onPlayerConnected command for a multiplayer mission! This is the first time I've ever made anything for a dedicated server and I have looked at every topic that I can find on the net for help!! I just need to know what is the correct syntax for this function and where should it be placed?

Currently I have at the top of my init.sqf:

if (isServer) then

{

onPlayerConnected "nul = [_id, _name] execVM ""PlayerConnected.sqf""";

};

This however doesn't seem to do anything!! I have tried putting in remotely execute hints to check if it is running but they don't appear so I assume they aren't running.

PlayerConnected.sqf is in the main folder of the mission, is this right or does it need to be stored in the same directory as the server?? Inside it is just a load of public variables to client.

Any help would be amazing!!!

Thanks

Tim

Share this post


Link to post
Share on other sites

WOW....What an idiot, found out what I was doing wrong!! The PlayerConnected.sqf was in a folder inside the mission folder!!! Epic fail!!! Not sure how to delete this post but it can be closed :)

Share this post


Link to post
Share on other sites

Btw you dont need the isServer check, onPlayerConnected is only executed on the server.

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  

×