Jump to content
LonelyWolf

5.0 Cop slots

Recommended Posts

hello try this

if ((str(player) in ["cop_1"])  &&  (FETCH_CONST(life_coplevel) < 7) ) then {
        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
        sleep 35;
    };

 

or

 

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

 

 

 

Share this post


Link to post
Share on other sites
1 hour ago, john_65wadwada654 said:

hello try this

if ((str(player) in ["cop_1"])  &&  (FETCH_CONST(life_coplevel) < 7) ) then {
        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
        sleep 35;
    };

 

or

 

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

 

 

 

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

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

The code works fine.  I added the same to the Cop 2 slot. But it goes into the six-level, seven-level slot. How do I fix this? I also want to give each slot a separate level.

Edited by LonelyWolf

Share this post


Link to post
Share on other sites

Hello @LonelyWolf.
 

switch (str player) do {
	case "cop_1": {
		if (!(FETCH_CONST(life_coplevel) isEqualTo 7)) then {
	        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
	        sleep 35;
		};
	};
	case "cop_2": {
		if (!(FETCH_CONST(life_coplevel) isEqualTo 6)) then {
	        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
	        sleep 35;
		};
	};
	case "cop_3": {
		if (!(FETCH_CONST(life_coplevel) isEqualTo 5)) then {
	        ["NotWhitelisted",false,true] call BIS_fnc_endMission;
	        sleep 35;
		};
	};
	default {};
};

 

Share this post


Link to post
Share on other sites

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.


×
×
  • Create New...

Important Information

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