I'm pretty sure I did this somewhat correctly, more than likely not though.
Anyone see any major issues as to why the events don't show up in the event list, because it shows up on the addon list
registerOutputEvent(fxDtsBrick, "checkMask", "", 1);
registerInputEvent(fxDtsBrick, "onMaskTrue", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
registerInputEvent(fxDtsBrick, "onMaskFalse", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
function fxDTSBrick::onMaskTrue(%this, %obj, %client)
{
$inputTarget_self = %this;
$inputTarget_client = %client;
$inputTarget_player = %client.player;
$inputTarget_miniGame = getMiniGameFromObject(%this);
%this.processInputEvent("VariableTrue", %client);
}
function fxDTSBrick::onMaskFalse(%this, %obj, %client)
{
$inputTarget_self = %this;
$inputTarget_client = %client;
$inputTarget_player = %client.player;
$inputTarget_miniGame = getMiniGameFromObject(%this);
%this.processInputEvent("VariableFalse", %client);
}
function fxDTSBrick::checkMask(%this, %obj, %client)
{
if(%obj.client.Gasmask == 0)
{
if(%obj.getType() & $TypeMasks::PlayerObjectType && %obj.getState() !$= "Dead")
{
%db = %obj.getDatablock();
if(!%obj.isPlayer)
{
%this.onMaskFalse(%client);
else
%this.onMaskTrue(%client);
}
}
}
}