Jump to content

[EASY] Remove Public Cop slot


suffer4real
 Share

Recommended Posts

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Difficulty: Easy

Publish by:  suffer4real

Source AltisLifeRPG.com cache

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hello, many of you probably know this problem. Then let's start

Open your " fn_initCop.sqf " and replaced this block:

 

if(!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
 if((FETCH_CONST(life_coplevel) == 1) && (FETCH_CONST(life_adminlevel) == 1)) then {
 ["NotWhitelisted",false,true] call BIS_fnc_endMission;
 sleep 35;
 };
};


Replace With :

 

if(!(str(player) in ["cop_99"])) then { 
 if((FETCH_CONST(life_coplevel) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then {
 ["NotWhitelisted",false,true] call BIS_fnc_endMission;
 sleep 35;
 };
};

 

Now open your Mission.sqm and change cop_1, cop_2, cop_3, cop_4 with your desired name Example: ( WhiteListed - Cop 1 )

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

14 hours ago, suffer4real said:

if(!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then { if((FETCH_CONST(life_coplevel) == 1) && (FETCH_CONST(life_adminlevel) == 1)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; };

easier if 

if (!(str(player) in [""])) then {
    if ((FETCH_CONST(life_coplevel) == 1) && (FETCH_CONST(life_adminlevel) == 1)) then {
        ["NotWhitelisted", false, true] call BIS_fnc_endMission;
        sleep 35;
    };
};

Link to comment
Share on other sites

  • 1 month later...
  • 5 weeks later...
  • 11 months later...
19 minutes ago, *ΔLutoΔ* - Dev said:

How about making them all public.

It's a highly stupid idea but

wouldnt it just be removing this line?

if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
    if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
        sleep 35;
    };
};

 

  • Like 1
Link to comment
Share on other sites

On 10/25/2017 at 4:10 PM, Deadlesszombie said:

It's a highly stupid idea but

wouldnt it just be removing this line?

if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
    if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
        sleep 35;
    };
};

 

Is it ? 

Link to comment
Share on other sites

13 hours ago, *ΔLutoΔ* - Dev said:

No like does it work by removing it lol

It does it you analyze and read the code, it checks if the player is NOT in the first 5 slots, if it isn't and they are not an admin or not whitelisted, then they get kicked for not being whitelisted

if you remove it then it makes all cop slots public, which I regarded as a highly idiotic

 

and why does your name have dev in it if you can't READ the code? 

Link to comment
Share on other sites

38 minutes ago, Deadlesszombie said:

It does it you analyze and read the code, it checks if the player is NOT in the first 5 slots, if it isn't and they are not an admin or not whitelisted, then they get kicked for not being whitelisted

if you remove it then it makes all cop slots public, which I regarded as a highly idiotic

 

and why does your name have dev in it if you can't READ the code? 

new to arma I made this account long time ago I worked with gmod / websites, and I cant change my name on here so the name is very old.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
1 hour ago, MT519 said:

this is something i am trying to fix on my server, i removed replaced and what not. with all above codes. doesn't seem to work, i am currently on the 5.0 Framework.

https://github.com/AsYetUntitled/Framework/blob/master/Altis_Life.Altis/core/fn_initCop.sqf#L16

Replace:

if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
    if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
        sleep 35;
    };
};

With:

if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
    ["NotWhitelisted",false,true] call BIS_fnc_endMission;
    sleep 35;
};

 

Now you have only whitelisted cop slots.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.