Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. private ["_unit","_item"];
  2.  
  3. if (isdedicated) exitwith {};
  4.  
  5. handle = [] spawn {
  6. fnc_dbl = {
  7. _idc = ctrlIDC (_this select 0);
  8. _selectedIndex = _this select 1;
  9. _unit = player;
  10. _item = lbData [_idc, _selectedIndex];
  11.  
  12. //quel item à été fdouble clique et on lui assigne une action
  13. if (_item == "ItemMap") then {[_unit,_item] spawn life_thirst = 100;};
  14.  
  15. false
  16. };
  17.  
  18.  
  19. while {true} do {
  20.  
  21. waituntil {!(isnull (finddisplay 602))};
  22.  
  23. ((findDisplay 602) displayCtrl 638) ctrlSetEventHandler ["LBDblClick", "_this call fnc_dbl"];
  24. ((findDisplay 602) displayCtrl 633) ctrlSetEventHandler ["LBDblClick", " _this call fnc_dbl"];
  25. ((findDisplay 602) displayCtrl 619) ctrlSetEventHandler ["LBDblClick", "_this call fnc_dbl"];
  26.  
  27. waituntil {isnull (finddisplay 602)};
  28. };
  29.  
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement