Advertisement
Veticus

Arma 3* Thirst System [Public]

May 14th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. // Created by νєтι¢υѕ. This is a public source to anyone who wishes to have it.
  2.  
  3. //This is a thirst system. This is basically the same as the hunger script. But have different variables that need to be defined.
  4. //-------------------------------------------------------------------Thirst-----------------------------------------------------------
  5. // Thirst Script "Thirst.sqf"
  6. /*private ["_NamePlayer"];
  7. _NamePlayer = name player;
  8. if (isNil "ThirstLevel") exitWith {};
  9. while {alive player} do {
  10. if (ThirstLevel <= 100) then {
  11. sleep 30;
  12. ThirstLevel = ThirstLevel - 20;
  13. hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  14. };
  15. if (ThirstLevel <= 80) then {
  16. sleep 30;
  17. ThirstLevel = ThirstLevel - 20;
  18. hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  19. };
  20. if (ThirstLevel <= 60) then {
  21. sleep 30;
  22. ThirstLevel = ThirstLevel - 20;
  23. hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  24. };
  25. if (ThirstLevel <= 40) then {
  26. sleep 30;
  27. ThirstLevel = ThirstLevel - 20;
  28. hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  29. };
  30. if (ThirstLevel == 20) then {
  31. sleep 30;
  32. ThirstLevel = ThirstLevel - 20;
  33. hintSilent parseText format ["<t color = '#2E9AFE'>Thirst Level:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  34. } else {
  35. if (ThirstLevel < 20) then {
  36. hintSilent format ["You are about to die %1", _NamePlayer];
  37. player setDamage 1;
  38. };
  39. };
  40. };*/
  41. //-----------------------------------------------------------------------------------------------
  42. //Need to be executed in Init.sqf
  43. //execVM "Thirst.sqf";
  44. // Also needs to be added to Init.sqf
  45. //ThirstLevel = 100;
  46. //-----------------------------------------------------------------Drink-----------------------------------------------------------
  47. // If thirst is applied will decrease thirst amount/required.
  48. // Thirst Function {Basic will have to go into more detail if wanting to use an item} "drink.sqf"
  49. /*if (isNil "Drink") exitWith {};
  50. if (isNil "ThirstLevel") exitWith {};
  51. if (alive player) exitWith {
  52. if (ThirstLevel == 100) then {
  53. ThirstLevel = ThirstLevel + 0;
  54. hintSilent parseText format ["<t color = '#2E9AFE'>You have drinked to much and now need a piss!</t>"];
  55. player setFatigue 1;
  56. sleep 20;
  57. player setFatigue 0;
  58. } else {
  59. ThirstLevel = ThirstLevel + 10;
  60. hintSilent parseText format ["<t color = '#2E9AFE'>You've Drank. Your thirst is:</t><t color = '#FFFFFF'> %1</t>", ThirstLevel];
  61. };
  62. };*/
  63. //-----------------------------------------------------------------------------------------------
  64. // Executed by an addAction due to personal preference {Inside Init.sqf}.
  65. //player addAction ["<t size='1'>[Drink]</t>", "drink.sqf", [], 1, false, true, 'true'];
  66. // Also needs this to be added to the Init.sqf
  67. //drink = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement