Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Squirrel
- 23/05/2019
- Use: Is used when the user takes drugs, has 3 diffrent effects dependant on what drug the user has taken
- */
- ['NDCH_Alcohol_Init', {
- player setVariable ["NDCH_Player_Alcohol_Level", 0.00, false];
- player setVariable ["NDCH_Player_Alcohol_Loop_Active", false, false];
- }, false] call Server_Setup_Compile;
- ['NDCH_Alcohol', {
- _LocalAlcholLevel = player getVariable "NDCH_Player_Alcohol_Level";
- _LocalAlcholLevel = _LocalAlcholLevel + 0.02;
- player setVariable ["NDCH_Player_Alcohol_Level", _LocalAlcholLevel, false];
- [] spawn NDCH_Alcohol_Loop
- }, false] call Server_Setup_Compile;
- ['NDCH_Alcohol_Loop', {
- _GetLoopActive = player getVariable "NDCH_Player_Alcohol_Loop_Active";
- if !(_GetLoopActive) then {
- player setVariable ["NDCH_Player_Alcohol_Loop_Active", true, false];
- while {player getVariable "NDCH_Player_Alcohol_Level" > 0.00} do {
- _AlcholLevel = player getVariable "NDCH_Player_Alcohol_Level";
- hint (_AlcholLevel);
- if (_AlcholLevel >= 0.04) then {
- hint ".4";
- };
- if (_AlcholLevel >= 0.06) then {
- hint ".6";
- };
- if (_AlcholLevel >= 0.08) then {
- hint ".8";
- };
- if (_AlcholLevel >= 0.1) then {
- hint ".10";
- };
- if (_AlcholLevel >= 0.12) then {
- hint ".12";
- };
- };
- player setVariable ["NDCH_Player_Alcohol_Loop_Active", false, false];
- };
- }, false] call Server_Setup_Compile;
- [] spawn NDCH_Alcohol_Init;
- [] spawn NDCH_Alcohol;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement