Hi guys, my english is not so good sorry.
1.Go into your database and run this code on your sql console.
ALTER TABLE `players` ADD COLUMN `example_level` ENUM('0','1','2','3') NOT NULL DEFAULT '0' COLLATE 'latin1_swedish_ci';
2.Go into life_server\Functions\MySQL\fn_queryRequest.sqf
Now, I will add new level to civilian, you can add new level to other sides.
Find this code at "fn_queryRequest.sqf"
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];};
Then, add "example_level" to end.
Like this,
case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, example_level FROM players WHERE pid='%1'",_uid];};
Our level is 13rd in query command, this is important for us.
Go into your "core\session\fn_requestReceived.sqf" and find "case civilian:"
case civilian: {
life_is_arrested = _this select 7;
CONST(life_coplevel, 0);
CONST(life_medicLevel, 0);
life_houses = _this select (_count - 3);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
And add "example_level" under medic_level.I wrote "_this select 13" because "example_level" in 13rd place in my "fn_queryRequest.sqf"
If you add your new level to other sides, you must write that to the side of you wrote.
Like this,
case civilian: {
life_is_arrested = _this select 7;
CONST(life_coplevel, 0);
CONST(life_medicLevel, 0);
CONST(life_examplelevel,(_this select 13));
life_houses = _this select (_count - 3);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
Finally you can use your level at other scripts.
Example,
if ((FETCH_CONST(life_examplelevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
["NotWhitelisted",false,true] call BIS_fnc_endMission;
sleep 35;
};