Jump to content
Sign in to follow this  
Taxen0

hints with the new multiplayer framework?

Recommended Posts

Hello, I want to send a message to all players connected to the server.

how can I do this with the new multiplayer framework?

I found this at the wiki:

["{hint "Hello World!";}","BIS_fnc_spawn",true,true] spawn BIS_fnc_MP;

but it also says that it's a not recommended way of transferring code as parameters, so I'm guessing it's just an example?

what would be the proper way?

Share this post


Link to post
Share on other sites

bis_fnc_mp is awesome, but it requires a little extra work to make it work the way you want. F.ex, it can only accept functions, so in order to broadcast a hint to all players you would have to create your own hint function. This is not hard.

//first create the function
taxenHint = {

hint _this;

};

//then spawn it using bis_fnc_mp, the parameter of course being a string
["Hey everyone!","taxenHint"] spawn BIS_fnc_mp;

Should also mention that the function needs to have been defined on the client before running bis_fnc_mp

Edited by Tuliq

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  

×