kamikaz333 11 Posted September 30, 2013 (edited) Hi! The problem I have is, that the eventHandler is not firing for the player on a dedicated server. The AI unit handles work, I can see them in the server log, but I can't see any log in my client's logfile. If I understand it correctly, then the player's handle should fire on the client, but it doesn't. Below is the code I'm trying to use in a test mission. init.sqf if (isServer) then { { if (_x isKindOf "CAManBase" && !isPlayer _x) then { _x call compile 'handledamage.sqf';}; } foreach allUnits; } else { player call compile 'handledamage.sqf'; }; handledamage.sqf fnc_HandleDamageEH = { diag_log format["HANDLEDAMAGE: %1", _this]; _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; //_projectile = _this select 4; _damage; }; _unit = _this; waitUntil{alive _unit}; handleDamageEH = _unit addEventHandler ["HandleDamage", { if (local (_this select 0)) then { _this call fnc_HandleDamageEH; } }]; SOLUTION: Found the problem. The mod @DevCon has a "feature" that makes the admin invincible by the "handleDamage" event. I've searched to disable it, but haven't found anything, so just removed the mod and that solved it. If you want debugging tools just add this "enableDebugConsole = 1;" line in description.ext, so you can use the ingame BIS tool. Edited October 1, 2013 by kamikaz333 SOLVED Share this post Link to post Share on other sites
chaoticgood 11 Posted September 30, 2013 Have you tried addMPEventHandler instead of addEventHandler? Share this post Link to post Share on other sites
kamikaz333 11 Posted September 30, 2013 Have you tried addMPEventHandler instead of addEventHandler? It doesn't work. It's only for "MPHit" and "MPKilled" events. Share this post Link to post Share on other sites
kylania 568 Posted September 30, 2013 _damage[s];[/s] Leave off the ; after the function return. Share this post Link to post Share on other sites
kamikaz333 11 Posted October 1, 2013 Found the problem. The mod @DevCon has a "feature" that makes the admin invincible by the "handleDamage" event. I've searched to disable it, but haven't found anything, so just removed the mod and that solved it. If you want debugging tools just add this "enableDebugConsole = 1;" line in description.ext, so you can use the ingame BIS tool. Share this post Link to post Share on other sites