SHARE
TWEET

Untitled

a guest Sep 5th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  private _fnc_action = "
  2.     if((count _this) isEqualTo 0) exitWith {true};
  3.  
  4.     private _action = toLower(_this select 3);
  5.  
  6.     switch (_action) do {
  7.         case ('getout');
  8.  
  9.         case ('eject'): {
  10.             if (player getVariable['zero_var_restrained',false] && {isNil 'zero_var_remoteAction'}) exitWith {
  11.                 'Du kannst nicht aussteigen wenn du gefesselt bist!' call zero_fnc_msg;
  12.  
  13.                 true;
  14.  
  15.             };
  16.  
  17.            if(toLower((assignedVehicleRole player) select 0) == 'driver' && {local (vehicle player)} ||
  18.                ((vehicle player) isKindOf 'Air' && {toLower(assignedVehicleRole(player) select 0) find 'turret' != -1}
  19.                && {(assignedVehicleRole(player) select 1) isEqualTo [0]} && {count(crew(vehicle player)) isEqualTo 1})) then {
  20.                vehicle player engineOn false;
  21.  
  22.            };
  23.  
  24.             zero_var_lastVehicle = nil;
  25.  
  26.         };
  27.  
  28.         case ('movetocargo');
  29.  
  30.         case ('movetocommander');
  31.  
  32.         case ('movetodriver');
  33.  
  34.         case ('movetogunner');
  35.  
  36.         case ('movetopilot');
  37.  
  38.         case ('movetoturret'): {
  39.             'Bitte steige aus, um dich auf einen anderen Platz zu setzen!' call zero_fnc_msg;
  40.  
  41.             true;
  42.  
  43.         };
  44.  
  45.         case ('getindriver');
  46.  
  47.         case ('getincargo');
  48.  
  49.         case ('getinturret');
  50.  
  51.         case ('getinpilot');
  52.  
  53.         case ('moveincargo');
  54.  
  55.         case ('getin'): {
  56.             zero_var_lastVehicle = (_this select 0);
  57.  
  58.             (_this select 0) removeAllEventHandlers 'HandleDamage';
  59.  
  60.             (_this select 0) addEventHandler['HandleDamage',{_this call zero_fnc_handleDamageVehicle;
  61. }];
  62.  
  63.             (_this select 0) removeAllEventHandlers 'Engine';
  64.  
  65.             (_this select 0) addEventHandler['Engine',{_this call zero_fnc_engineHandler;
  66. }];
  67.  
  68.             if (zero_var_is_arrested && {zero_var_jail_stones < zero_var_jail_stones_needed}) exitWith {
  69.                 'Du bist im Gefängnis und kannst nicht in das Fahrzeug einsteigen!' call zero_fnc_msg;
  70.  
  71.                 true;
  72.  
  73.             };
  74.  
  75.             if (player getVariable['zero_var_restrained',false]) then {
  76.                'Du kannst in kein Fahrzeug einsteigen wenn du gefesselt bist!' call zero_fnc_msg;
  77.  
  78.                true;
  79.  
  80.            };
  81.  
  82.         };
  83.  
  84.         default {};
  85.  
  86.     };
  87.  
  88. ";
  89.  
  90. inGameUISetEventHandler ["Action", _fnc_action];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top