lucho Posted June 18, 2016 Report Share Posted June 18, 2016 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 More sharing options...
0 creativv Posted June 18, 2016 Report Share Posted June 18, 2016 ((player getVariable"humanity") >= 5000) juandayz 1 Link to comment Share on other sites More sharing options...
0 lucho Posted June 18, 2016 Author Report Share Posted June 18, 2016 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 More sharing options...
0 juandayz Posted June 18, 2016 Report Share Posted June 18, 2016 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; }; Linux 1 Link to comment Share on other sites More sharing options...
0 Shawn Posted June 18, 2016 Report Share Posted June 18, 2016 Perhaps something like this? _humanityrequired = 5000; if ((player getVariable "humanity") < 5000) && ( cursorTarget isKindOf "Infostand_1_EP1" ) exitWith { cutText [format["You need atleast %1 humanity to access this trader",_humanityrequired], "PLAIN DOWN"]; }; juandayz and AxeMan123 2 Link to comment Share on other sites More sharing options...
0 Shawn Posted June 18, 2016 Report Share Posted June 18, 2016 @juandayz That way can work too :D Link to comment Share on other sites More sharing options...
0 juandayz Posted June 18, 2016 Report Share Posted June 18, 2016 i hope @Shawn, cuz dont know if my way works :D Link to comment Share on other sites More sharing options...
0 creativv Posted June 18, 2016 Report Share Posted June 18, 2016 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 More sharing options...
Question
lucho
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now