mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
BecomeLeader - Don't create new group
This commit is contained in:
21
addons/interaction/functions/fnc_canBecomeLeader.sqf
Normal file
21
addons/interaction/functions/fnc_canBecomeLeader.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Test if can Become Leader of group
|
||||
*
|
||||
* Arguments:
|
||||
* 0: target <OBJECT>
|
||||
* 1: player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, player] call ace_interaction_fnc_canBecomeLeader
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_target,_player);
|
||||
|
||||
(count (units group _player) > 1) && {leader group _player != _player}
|
21
addons/interaction/functions/fnc_doBecomeLeader.sqf
Normal file
21
addons/interaction/functions/fnc_doBecomeLeader.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Become Leader of group
|
||||
*
|
||||
* Arguments:
|
||||
* 0: target <OBJECT>
|
||||
* 1: player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, player] call ace_interaction_fnc_doBecomeLeader
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_target,_player);
|
||||
|
||||
[QGVAR(selectLeader), (units group _player), [(group _player), _player]] call EFUNC(common,targetEvent);
|
Reference in New Issue
Block a user