Difficulty: Very simple
Suitable for beginner
fn_requestReceived.sqf
find
!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")
change it to
!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel"|| !isNil "life_whitelist")
then find
CONST(life_coplevel,(_this select 7));
Add code below it
CONST(life_whitelist,(_this select 12));
then find
life_is_arrested = _this select 7;
Add code below it
CONST(life_whitelist,(_this select 13));
then find
CONST(life_medicLevel,(_this select 7));
Add code below it
CONST(life_whitelist,(_this select 11));
then to
fn_initciv.sqf
add it:
if((call life_whitelist) < 1) then {["NotWhitelistplayer",false,false] call BIS_fnc_endMission;};
then to
description.ext
find
class NotWhitelisted { title = "$STR_NotWhitelisted_Title"; subtitle = "$STR_NotWhitelisted_SubTitle"; description = "$STR_NotWhitelisted_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; };
Add code below it
class NotWhitelistplayer { title = "You are not a whitelist player applied by the server, please contact the administrator"; subtitle = "You are not a whitelist player applied by the server, please contact the administrator"; description = "You are not a whitelist player applied by the server, please contact the administrator"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; };
then go to the life_server:
find fn_queryRequest.sqf
change it
_query = switch (_side) do {
// West - 11 entries returned
case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime FROM players WHERE pid='%1'",_uid];};
// Civilian - 12 entries returned
case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime FROM players WHERE pid='%1'",_uid];};
// Independent - 10 entries returned
case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime FROM players WHERE pid='%1'",_uid];};
};
to
_query = switch (_side) do {
// West - 11 entries returned
case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, whitelist FROM players WHERE pid='%1'",_uid];};
// Civilian - 12 entries returned
case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, whitelist FROM players WHERE pid='%1'",_uid];};
// Independent - 10 entries returned
case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, whitelist FROM players WHERE pid='%1'",_uid];};
};
at last you should add this to sql -> players
`whitelist` ENUM('0','1') NOT NULL DEFAULT '0',
If you change the value of whitelist to 1, players can enter, otherwise they cannot enter, that's it!