GreuhZbug / greuh_liberation.Altis

Liberation for Arma 3
https://trello.com/b/FfUXrHn1/liberation-dev
MIT License
43 stars 40 forks source link

Commander Slot Whitelist #34

Closed Matoshx closed 8 years ago

Matoshx commented 8 years ago

Instead of killing the unauthorized player in a commander slot use something like this below.

    if ( !( _tagmatch || _idmatch || _namematch ) ) then {
        titleText ["", "BLACK OUT"];
        hint "You are in a restricted slot! You will be kicked to the lobby in 15 seconds!";
        sleep 5;
        hint "You are in a restricted slot! You will be kicked to the lobby in 10 seconds!";
        sleep 5;
        hint "You are in a restricted slot! You will be kicked to the lobby in 5 seconds!";
        sleep 5;
        titleText ["", "BLACK IN"];
        failMission "end1";
    };
};

This will make player's screen go dark with message showing in the right upper corner then after 15 seconds the "Mission Completed" window will open with option to go back to the lobby.

GreuhZbug commented 8 years ago

Currently the script enforcing the whitelist is server side, and we don't really want the server to exit its own mission :p

Moreover 15 seconds is plenty of time to mess with the default permissions and so on, which is what I really want to prevent with the whitelist system (griefing and such).

So I'll make it client side and remove the delay, but I'll use your solution to kick the unauthorized commander out of the mission instead of just killing them.

Matoshx commented 8 years ago

I know it's server side, but wanted to give you an idea of a another approach on punishing unauthorized players.

Well you can always remove those two hints and lower the delay, so the kick to lobby will be instant. Since that makes instant kick player might not have the chance to read the message. Unless you can make for players not being able to use any controls when screen goes dark and have time for them to read the message, but instant kick is fine too.

GreuhZbug commented 8 years ago

I've found an elegant way which does both instant ejection + explicit message so the player knows why. Thanks for pointing me in the right direction ;)