Jump to content
Eroge

Serverside blacklist?

Recommended Posts

So I made a simple blacklist script like this (this is the best I can do with my knowledge of scripting...)

 

_blacklistedUIDList = ["UID12345678"];

if (getplayerUID player in _blacklistedUIDList) then
{
["<t color='#ff0000' font='PuristaBold' align='center' size='3'>You're Banned</t>", 0, 0.9, 30, 2] spawn BIS_fnc_dynamicText;
endMission "Banned";
};

if (true) exitWith
{
sleep 3;
["<t color='#ffffff' font='PuristaBold' align='center' size='2'>Welcome to the Server</t>", 0, 0.9, 30, 2] spawn BIS_fnc_dynamicText;
playMusic "gameIntro";  
};

So every time I want to add a new blacklisted UID I'll have to reupload the mission file, how can I store the uid list serverside?

Share this post


Link to post
Share on other sites

You can have a file in server root called say bannedUIDs.sqf then in there add an array. Not sure if it will update live, you may have to restart server. If so you can just temp add them until server restarts.

bannedUIDs =
[
	"123",
	"321",
	"etc"
];
publicVariable "bannedUIDs"; // or use PVC when user connects
bannedUIDs pushBack "12345";
// initServer.sqf
[] execVM "\bannedUIDs.sqf";

 

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, HazJ said:

You can have a file in server root called say bannedUIDs.sqf then in there add an array. Not sure if it will update live, you may have to restart server. If so you can just temp add them until server restarts.


bannedUIDs =
[
	"123",
	"321",
	"etc"
];
publicVariable "bannedUIDs"; // or use PVC when user connects

bannedUIDs pushBack "12345";

// initServer.sqf
[] execVM "\bannedUIDs.sqf";

 

 

 

very helpful, thanks a lot!

Share this post


Link to post
Share on other sites

Each time you change bannedUIDs (when pushBack), publicVariable it.

  • Like 2

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

Each time you change bannedUIDs (when pushBack), publicVariable it.

Ah yes. Forgot that. Also, pushBack won't overwrite the file on the server.

@Eroge

You'll still need to do that manually unless you use some DLL file.

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

×