Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. // @file Version: 1.0
  2. // @file Name: playerSelectChange.sqf
  3. // @file Author: [404] Deadbeat
  4. // @file Created: 20/11/2012 05:19
  5. // @file Args:
  6.  
  7. #define groupManagementDialog 55510
  8. #define groupManagementPlayerList 55511
  9. #define groupManagementInviteButton 55514
  10.  
  11. disableSerialization;
  12.  
  13. private["_dialog","_playerListBox","_groupInvite","_target","_index","_playerData","_check","_unitCount"];
  14.  
  15. _dialog = findDisplay groupManagementDialog;
  16. _playerListBox = _dialog displayCtrl groupManagementPlayerList;
  17. _groupInvite = _dialog displayCtrl groupManagementInviteButton;
  18.  
  19. _index = lbCurSel _playerListBox;
  20. _playerData = _playerListBox lbData _index;
  21. _check = 0;
  22.  
  23. {if (str(_x) == _playerData) then {_target = _x;_check = 1;};}forEach playableUnits;
  24. if (_check == 0) exitWith{};
  25.  
  26. _unitCount = count units group _target;
  27.  
  28. if(_unitCount == 1) then
  29. {
  30. if(player == leader group player) then
  31. {
  32. _groupInvite ctrlShow true;
  33. } else {
  34. _groupInvite ctrlShow false;
  35. };
  36. } else {
  37. _groupInvite ctrlShow false;
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement