Jump to content
WitchDivision

How to make my server whitelist?

Recommended Posts

Hello guys, how you doing today?

I want to make my server whitelist by steam ID, can I do that?

If so, how can I do that? what I have to do?

Thank you for helping me.

Share this post


Link to post
Share on other sites

I did not test anything, just wrote some stuff out of my mind...

 

initServer.sqf

myGlobalWhitelist = [

 "5673401289675890234",
 "4702358907894532849",
 "4352089734208957689"

];

//grab all players on connect to check if whitelisted
addMissionEventHandler ["PlayerConnected", {

 params ["", "_uid", "_name"];

 if !( _uid in myGlobalWhitelist) then
 {
  
  //kick not whitelisted player
  serverCommand format ["#kick %1", _name];

  //log to .rpt file
  diag_log format ["kicked player: %1 for using not whitelisted UID: %2", _name, _uid];
 };

}];

 

Share this post


Link to post
Share on other sites

Some little words bout the solution mentioned above:

 

This solution is not very flexebile. No, its the opposite.

You always have to rebuild the whole mission file if you wan't to delete or add a steam ID from/to the whitelist. Thats a thing you have to live with if u wanna have an easy solution.

 

A flexible solution where you are able to edit those list at any time and the server  handles that list nearly instant can be archieved with database integration only.

To do this you need a database mod, a database and the knowledge bout accessing the database via sqf.

But all of this is far beyond the things I can tell you about in this forum.

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

×