ACE3/addons/disposable/XEH_postInit.sqf
2016-02-06 16:39:08 -03:00

20 lines
667 B
Plaintext

// by commy2
#include "script_component.hpp"
if (!hasInterface) exitWith {};
["inventoryDisplayLoaded", {
[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)
}] call EFUNC(common,addEventHandler);
["playerInventoryChanged", {
params ["_unit"];
[_unit] call FUNC(takeLoadedATWeapon);
[_unit] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);
// Register fire event handler
// Only for the local player and for AI. Non-local players will handle it themselves
["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);