Jump to content
  • 0

Hancuff script help


SgtSparraGump

Question

Hi Everyone,

 

So I have installed the handcuff mod and it works, have changed it so trader dont get cuffed as well, what I have done is allowed heros with +20000 humanity and bandits with -10000 humanity to be able to cuff, unfortunately they show the same "Investigation Menu" in the scroll options, what I want is 1 for heros and 1 for bandits, first script is what I have, second is what might work, what I need to know is will it work?

 

Current Script:

	if ((player getVariable"humanity") >= 20000 or (player getVariable"humanity") >= -10000) then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal && !(_traderType in serverTraders)) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Investigation Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];
                };
        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
            };
    };

Looking at replacing it with this, but will it work?

	if ((player getVariable"humanity") >= 20000 then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal && !(_traderType in serverTraders)) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Investigation Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];
                };

} else ((player getVariable"humanity") <= 10000 then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal && !(_traderType in serverTraders)) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Robbery Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];

        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
            };
    };
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Looks horribly wrong to me.

 

Here:

if ((player getVariable ["humanity",0]) >= 20000 then) {
	if (_isMan && _isAlive && !inSafeZone && !_isZombie && !_isAnimal && !(_traderType in serverTraders)) then {
		if (s_player_arrest < 0) then {
			s_player_arrest = player addAction ['<t color="#0074E8">'+"Investigation Menu"+'</t>',"Scripts\Investigation\investigation.sqf","",100,false,true,"",""];
		};
	};
} else {
	player removeAction s_player_arrest;
	s_player_arrest = -1;
};

if ((player getVariable ["humanity",0]) <= -10000 then) {
	if (_isMan && _isAlive && !inSafeZone && !_isZombie && !_isAnimal && !(_traderType in serverTraders)) then {
		if (s_player_arrest2 < 0) then {
			s_player_arrest2 = player addAction ['<t color="#0074E8">'+"Robbery Menu"+'</t>',"Scripts\Investigation\investigation.sqf","",100,false,true,"",""];
		};
	};
} else {
	player removeAction s_player_arrest2;
	s_player_arrest2 = -1;
};

It's still same menu for both tho. I don't get your point. You just want to change the scroll wheel text?

Link to comment
Share on other sites

  • 0

What I want is if you are a bandit it will show a scroll wheel menu saying "Robbery Menu" and if you are a hero it will say "Investigation Menu" not both at the same time, I mean at the end of the day it doesn't really matter if I can't get it to do it just thought it would be nice.

Link to comment
Share on other sites

  • 0

Looks horribly wrong to me.

 

Here:

if ((player getVariable ["humanity",0]) >= 20000 then) {
	if (_isMan && _isAlive && !inSafeZone && !_isZombie && !_isAnimal && !(_traderType in serverTraders)) then {
		if (s_player_arrest < 0) then {
			s_player_arrest = player addAction ['<t color="#0074E8">'+"Investigation Menu"+'</t>',"Scripts\Investigation\investigation.sqf","",100,false,true,"",""];
		};
	};
} else {
	player removeAction s_player_arrest;
	s_player_arrest = -1;
};

if ((player getVariable ["humanity",0]) <= -10000 then) {
	if (_isMan && _isAlive && !inSafeZone && !_isZombie && !_isAnimal && !(_traderType in serverTraders)) then {
		if (s_player_arrest2 < 0) then {
			s_player_arrest2 = player addAction ['<t color="#0074E8">'+"Robbery Menu"+'</t>',"Scripts\Investigation\investigation.sqf","",100,false,true,"",""];
		};
	};
} else {
	player removeAction s_player_arrest2;
	s_player_arrest2 = -1;
};

It's still same menu for both tho. I don't get your point. You just want to change the scroll wheel text?

 

Where does this go in fn_selfactions? Is this replacing the code found in this script? http://opendayz.net/threads/dayz-1-8-0-3-handcuff-player-help.15324/page-8#post-96967

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...