mosco131

fichier modifier pour le script

Jan 12th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. #include "..\script_macros.hpp"
  2. /*
  3. File: configuration.sqf
  4. Author:
  5.  
  6. Description:
  7. Master Life Configuration File
  8. This file is to setup variables for the client, there are still other configuration files in the system
  9.  
  10. *****************************
  11. ****** Backend Variables *****
  12. *****************************
  13. */
  14. life_query_time = time;
  15. life_action_delay = time;
  16. life_trunk_vehicle = objNull;
  17. life_session_completed = false;
  18. life_garage_store = false;
  19. life_session_tries = 0;
  20. life_net_dropped = false;
  21. life_siren_active = false;
  22. life_clothing_filter = 0;
  23. life_clothing_uniform = -1;
  24. life_redgull_effect = time;
  25. life_is_processing = false;
  26. life_bail_paid = false;
  27. life_impound_inuse = false;
  28. life_action_inUse = false;
  29. life_spikestrip = objNull;
  30. life_knockout = false;
  31. life_interrupted = false;
  32. life_respawned = false;
  33. life_removeWanted = false;
  34. life_action_gathering = false;
  35. tawvd_addon_disable = true;
  36. life_god = false;
  37. life_frozen = false;
  38. life_save_gear = [];
  39. life_container_activeObj = objNull;
  40. life_disable_getIn = false;
  41. life_disable_getOut = false;
  42. life_admin_debug = false;
  43. life_preview_3D_vehicle_cam = objNull;
  44. life_preview_3D_vehicle_object = objNull;
  45. life_preview_light = objNull;
  46. life_pos_exist = false;
  47. life_pos_attach = [];
  48. life_civ_position = [];
  49. life_markers = false;
  50. life_canpay_bail = true;
  51. life_fadeSound = false; <------- ici
  52. life_seatbelt = false; <-------- ici
  53.  
  54.  
  55.  
  56.  
  57. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  58.  
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  62. NOM DU FICHIER : fn_fadeSound
  63. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  64.  
  65. #include "..\..\script_macros.hpp"
  66. life_fadeSound = !life_fadeSound;
  67.  
  68. if (life_fadeSound) then
  69. {
  70. 1 fadeSound 0.1;
  71. call life_fnc_hudUpdate;
  72. } else {
  73. 1 fadeSound 1;
  74. call life_fnc_hudUpdate;
  75. };
  76.  
  77.  
  78. fichier rajouté dans core/functions
  79.  
  80. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  81.  
  82. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  83. NOM DU FICHIER : fn_hudSetup
  84. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  85.  
  86. #include "..\..\script_macros.hpp"
  87.  
  88. disableSerialization;
  89.  
  90. 2 cutRsc ["playerHUD","PLAIN"];
  91. [] call life_fnc_hudUpdate;
  92.  
  93. [] spawn
  94. {
  95. private["_dam"];
  96. while {true} do
  97. {
  98. _dam = damage player;
  99. waitUntil {(damage player) != _dam};
  100. [] call life_fnc_hudUpdate;
  101. };
  102. };
  103.  
  104.  
  105.  
  106. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  107.  
  108.  
  109.  
  110. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  111. NOM DU FICHIER : fn_hudUpdate
  112. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  113.  
  114. #include "..\..\script_macros.hpp"
  115.  
  116. //---------------------------------
  117. //By Repentz
  118. //---------------------------------
  119.  
  120. #define INFINITE 1e+1000
  121. #define IDC_LIFE_BAR_FOOD 2200
  122. #define IDC_LIFE_BAR_FOOD_RING 3200
  123. #define IDC_LIFE_BAR_WATER 2201
  124. #define IDC_LIFE_BAR_WATER_RING 3201
  125. #define IDC_LIFE_BAR_HEALTH 2202
  126. #define IDC_LIFE_BAR_HEALTH_RING 3202
  127. #define IDC_LIFE_BAR_Speaker 3007
  128. #define IDC_LIFE_BAR_SeatBelt 4203
  129.  
  130. disableSerialization;
  131. if(isNull LIFEdisplay) then {[] call life_fnc_hudSetup;};
  132.  
  133. //[LIFE_ID_PlayerTags,"onEachFrame"] call BIS_fnc_removeStackedEventHandler;
  134. LIFE_ID_PlayerTags = ["LIFE_PlayerTags","onEachFrame","life_fnc_playerTags"] call BIS_fnc_addStackedEventHandler;
  135.  
  136. if(!isNil "life_seatbelt") then {
  137. if ( vehicle player != player ) then {
  138. if(life_seatbelt) then {
  139. LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "VindicateAssets\images\textures\HUD\seatbeltOn.paa";
  140. } else {
  141. LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "VindicateAssets\images\textures\HUD\seatbeltOff.paa";
  142. };
  143. } else {
  144. LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "";
  145. };
  146. };
  147.  
  148. if(!isNil "life_fadeSound") then
  149. {
  150. if(life_fadeSound) then
  151. {
  152. LIFEctrl(IDC_LIFE_BAR_Speaker) ctrlSetText "VindicateAssets\images\textures\HUD\earplugsY.paa";
  153. } else {
  154. LIFEctrl(IDC_LIFE_BAR_Speaker) ctrlSetText "VindicateAssets\images\textures\HUD\earplugsN.paa";
  155. };
  156. };
  157.  
  158. if(!isNil "life_thirst") then
  159. {
  160. if (life_thirst <= 100) then
  161. {
  162. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water0.paa";
  163. };
  164.  
  165. if (life_thirst <= 90) then
  166. {
  167. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water1.paa";
  168. };
  169.  
  170. if (life_thirst <= 80) then
  171. {
  172. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water2.paa";
  173. };
  174.  
  175. if (life_thirst <= 70) then
  176. {
  177. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water3.paa";
  178. };
  179.  
  180. if (life_thirst <= 60) then
  181. {
  182. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water4.paa";
  183. };
  184.  
  185. if (life_thirst <= 50) then
  186. {
  187. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water5.paa";
  188. };
  189.  
  190. if (life_thirst <= 40) then
  191. {
  192. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water6.paa";
  193. };
  194.  
  195. if (life_thirst <= 30) then
  196. {
  197. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water7.paa";
  198. };
  199.  
  200. if (life_thirst <= 20) then
  201. {
  202. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water8.paa";
  203. };
  204.  
  205. if (life_thirst <= 10) then
  206. {
  207. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water9.paa";
  208. };
  209.  
  210. if (life_thirst <= 0) then
  211. {
  212. LIFEctrl(IDC_LIFE_BAR_WATER_RING) ctrlSetText "VindicateAssets\images\textures\HUD\water10.paa";
  213. };
  214. };
  215.  
  216. if (damage player >= 0) then
  217. {
  218. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health0.paa";
  219. };
  220.  
  221. if (damage player >= 0.01) then
  222. {
  223. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health1.paa";
  224. };
  225.  
  226. if (damage player >= 0.02) then
  227. {
  228. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health2.paa";
  229. };
  230.  
  231. if (damage player >= 0.03) then
  232. {
  233. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health3.paa";
  234. };
  235.  
  236. if (damage player >= 0.07) then
  237. {
  238. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health4.paa";
  239. };
  240.  
  241. if (damage player >= 0.13) then
  242. {
  243. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health5.paa";
  244. };
  245.  
  246. if (damage player >= 0.2) then
  247. {
  248. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health6.paa";
  249. };
  250.  
  251. if (damage player >= 0.3) then
  252. {
  253. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health7.paa";
  254. };
  255.  
  256. if (damage player >= 0.4) then
  257. {
  258. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health8.paa";
  259. };
  260.  
  261. if (damage player >= 0.7) then
  262. {
  263. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health9.paa";
  264. };
  265.  
  266. if (damage player >= 1) then
  267. {
  268. LIFEctrl(IDC_LIFE_BAR_HEALTH_RING) ctrlSetText "VindicateAssets\images\textures\HUD\health10.paa";
  269. };
  270.  
  271. if(!isNil "life_hunger") then
  272. {
  273. if (life_hunger <= 100) then
  274. {
  275. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food0.paa";
  276. };
  277.  
  278. if (life_hunger <= 90) then
  279. {
  280. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food1.paa";
  281. };
  282.  
  283. if (life_hunger <= 80) then
  284. {
  285. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food2.paa";
  286. };
  287.  
  288. if (life_hunger <= 70) then
  289. {
  290. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food3.paa";
  291. };
  292.  
  293. if (life_hunger <= 60) then
  294. {
  295. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food4.paa";
  296. };
  297.  
  298. if (life_hunger <= 50) then
  299. {
  300. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food5.paa";
  301. };
  302.  
  303. if (life_hunger <= 40) then
  304. {
  305. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food6.paa";
  306. };
  307.  
  308. if (life_hunger <= 30) then
  309. {
  310. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food7.paa";
  311. };
  312.  
  313. if (life_hunger <= 20) then
  314. {
  315. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food8.paa";
  316. };
  317.  
  318. if (life_hunger <= 10) then
  319. {
  320. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food9.paa";
  321. };
  322.  
  323. if (life_hunger <= 0) then
  324. {
  325. LIFEctrl(IDC_LIFE_BAR_FOOD_RING) ctrlSetText "VindicateAssets\images\textures\HUD\food1.paa";
  326. };
  327. };
Add Comment
Please, Sign In to add comment