Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Created by νєтι¢υѕ. This is a public source to anyone who wishes to have it.
- //This is a thirst system. This is basically the same as the hunger script. But have different variables that need to be defined.
- //-------------------------------------------------------------------Thirst-----------------------------------------------------------
- // Thirst Script "Thirst.sqf"
- /*private ["_NamePlayer"];
- _NamePlayer = name player;
- if (isNil "ThirstLevel") exitWith {};
- while {alive player} do {
- if (ThirstLevel <= 100) then {
- sleep 30;
- ThirstLevel = ThirstLevel - 20;
- hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- };
- if (ThirstLevel <= 80) then {
- sleep 30;
- ThirstLevel = ThirstLevel - 20;
- hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- };
- if (ThirstLevel <= 60) then {
- sleep 30;
- ThirstLevel = ThirstLevel - 20;
- hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- };
- if (ThirstLevel <= 40) then {
- sleep 30;
- ThirstLevel = ThirstLevel - 20;
- hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- };
- if (ThirstLevel == 20) then {
- sleep 30;
- ThirstLevel = ThirstLevel - 20;
- hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- } else {
- if (ThirstLevel < 20) then {
- hintSilent format ["You are about to die %1", _NamePlayer];
- player setDamage 1;
- };
- };
- };*/
- //-----------------------------------------------------------------------------------------------
- //Need to be executed in Init.sqf
- //execVM "Thirst.sqf";
- // Also needs to be added to Init.sqf
- //ThirstLevel = 100;
- //-----------------------------------------------------------------Drink-----------------------------------------------------------
- // If thirst is applied will decrease thirst amount/required.
- // Thirst Function {Basic will have to go into more detail if wanting to use an item} "drink.sqf"
- /*if (isNil "Drink") exitWith {};
- if (isNil "ThirstLevel") exitWith {};
- if (alive player) exitWith {
- if (ThirstLevel == 100) then {
- ThirstLevel = ThirstLevel + 0;
- hintSilent parseText format ["<t color = '#2E9AFE'>You have drinked to much and now need a piss!</t>"];
- player setFatigue 1;
- sleep 20;
- player setFatigue 0;
- } else {
- ThirstLevel = ThirstLevel + 10;
- hintSilent parseText format ["<t color = '#2E9AFE'>You've Drank. Your thirst is:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
- };
- };*/
- //-----------------------------------------------------------------------------------------------
- // Executed by an addAction due to personal preference {Inside Init.sqf}.
- //player addAction ["<t size='1'>[Drink]</t>", "drink.sqf", [], 1, false, true, 'true'];
- // Also needs this to be added to the Init.sqf
- //drink = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement