Jump to content
  • 0

Bunker only for Heroes


lucho

Question

 

How i can make that only hero with =>5000 humanity can get in?

///////////////////////////////////////////////////////////////////////////
if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 ) then {
    if (s_player_bunker < 0) then {
        s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("In den Bunker") +"</t>"),"fixes\actions\bunkerin.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_bunker;
    s_player_bunker = -1;
};

 

if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 ) then {
    if (s_player_bunkero < 0) then {
        s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Lass mich raus!!!") +"</t>"),"fixes\actions\bunkerout.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_bunkero;
    s_player_bunkero = -1;
};
///////////////////////////////////////////////////////////////////////////

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
26 minutes ago, creativv said:

((player getVariable"humanity") >= 5000)

if  ((player getVariable"humanity") >= 5000)  && ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 ) then {

 

thnaks

so is okey?

tested its not work

Link to comment
Share on other sites

  • 0

PlayerHumanity = (player getVariable"humanity");
if (PlayerHumanity < 5000) then {

if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 ) then {
    if (s_player_bunker < 0) then {
        s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("In den Bunker") +"</t>"),"fixes\actions\bunkerin.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_bunker;
    s_player_bunker = -1;
};

 

if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 ) then {
    if (s_player_bunkero < 0) then {
        s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Lass mich raus!!!") +"</t>"),"fixes\actions\bunkerout.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_bunkero;
    s_player_bunkero = -1;
};
///////////////////////////////////////////////////////////////////////////

} else {

titleText ["YOUR NOT HERO BLABLABLA!", "PLAIN DOWN", 3];
sleep 5;

};

Link to comment
Share on other sites

  • 0

If you can make a variable wich detects if the player is inside the bunker or outside the bunker you can make it even more neat .

Then you could make one section of code for both in and out with just one check for humanity .

Or use same script for in and out if thats possible , havent seen the scripts so cant tell but if they are simular you could try that .

Just a suggestion though .

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
  • Advertisement
  • Discord

×
×
  • Create New...