Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.35 KB | None | 0 0
  1. span class="re5"> DA3F_fnc_captureDouane = {
  2. // By Aroun
  3. // Normalement cette fonction est un fichier
  4.  
  5.     private _DA3F_Unit = _this param[1];
  6.     private _DA3F_radius = 5;
  7.     private _DA3F_Marker = "marker_9";
  8.     private _DA3F_LvlGain = 0;
  9.     private _DA3F_MaxLvl = 5;
  10.     private _DA3F_GainInit = 100;
  11.     private _DA3F_Counter = 0;
  12.     private _DA3F_ACAB = false;
  13.     private _DA3F_TimeIntervalPaye = 5; // temps entre chaque palier de capture
  14.     private _DA3F_NrbPoulet = 1; // Nombre de flics devant être présent dans la zone pour stopper la capture du joueur
  15.     while {((_DA3F_Unit distance getMarkerPos _DA3F_Marker) < _DA3F_radius)} do {
  16.         _DA3F_Counter = _DA3F_Counter + 1;
  17.         if ((({_x isEqualTo west && _x distance getMarkerPos _DA3F_Marker < _DA3F_radius} count playableUnits)) > 0) exitWith {
  18.             hint "La police est dans la zone !";
  19.             _DA3F_ACAB = true;
  20.         };
  21.         if (_DA3F_Counter >= _DA3F_TimeIntervalPaye) then {
  22.             life_cash = life_cash + (_DA3F_GainInit * _DA3F_LvlGain);
  23.             if (_DA3F_LvlGain < _DA3F_MaxLvl ) then {
  24.                 _DA3F_LvlGain =  _DA3F_LvlGain + 1;
  25.             };
  26.             _DA3F_Counter = 0;
  27.             hintSilent format ["votre cash est de :\n %1", life_cash];
  28.         };
  29.         sleep 1;
  30.     };
  31.     if (_DA3F_ACAB) exitWith {};
  32.     hint "Capture annulé, vous êtes sortie de la zone";
  33. }; // Fin de la fnc
  34.  
  35. this addAction ["Capturer la douane", DA3F_fnc_captureDouane, [], 1, true, true, "", "", 5, false];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement