SHARE
TWEET

Untitled

a guest May 24th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3. Squirrel
  4. 23/05/2019
  5. Use: Is used when the user takes drugs, has 3 diffrent effects dependant on what drug the user has taken
  6.  
  7. */
  8.  
  9.  
  10. ['NDCH_Alcohol_Init', {
  11.    
  12.     player setVariable ["NDCH_Player_Alcohol_Level", 0.00, false];
  13.     player setVariable ["NDCH_Player_Alcohol_Loop_Active", false, false];
  14.  
  15. }, false] call Server_Setup_Compile;
  16.  
  17. ['NDCH_Alcohol', {
  18.  
  19.     _LocalAlcholLevel = player getVariable "NDCH_Player_Alcohol_Level";
  20.     _LocalAlcholLevel = _LocalAlcholLevel + 0.02;
  21.     player setVariable ["NDCH_Player_Alcohol_Level", _LocalAlcholLevel, false];
  22.  
  23.     [] spawn NDCH_Alcohol_Loop
  24.  
  25.  
  26. }, false] call Server_Setup_Compile;
  27.  
  28.  
  29.  
  30.  
  31.  
  32. ['NDCH_Alcohol_Loop', {
  33.    
  34.     _GetLoopActive = player getVariable "NDCH_Player_Alcohol_Loop_Active";
  35.     if !(_GetLoopActive) then {
  36.  
  37.         player setVariable ["NDCH_Player_Alcohol_Loop_Active", true, false];
  38.  
  39.         while {player getVariable "NDCH_Player_Alcohol_Level" > 0.00} do {
  40.  
  41.             _AlcholLevel = player getVariable "NDCH_Player_Alcohol_Level";
  42.  
  43.             hint (_AlcholLevel);
  44.  
  45.             if (_AlcholLevel >= 0.04) then {
  46.                 hint ".4";
  47.             };
  48.  
  49.             if (_AlcholLevel >= 0.06) then {
  50.                 hint ".6";
  51.             };
  52.  
  53.             if (_AlcholLevel >= 0.08) then {
  54.                 hint ".8";
  55.             };
  56.  
  57.             if (_AlcholLevel >= 0.1) then {
  58.                 hint ".10";
  59.             };
  60.  
  61.             if (_AlcholLevel >= 0.12) then {
  62.                 hint ".12";
  63.             };
  64.         };
  65.  
  66.         player setVariable ["NDCH_Player_Alcohol_Loop_Active", false, false];
  67.     };
  68.  
  69.  
  70. }, false] call Server_Setup_Compile;
  71.  
  72.  
  73. [] spawn NDCH_Alcohol_Init;
  74. [] spawn NDCH_Alcohol;
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