Anyone see a major problem with this?
I'm pretty sure I set it up correctly, but the events are not showing the the menu
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);
}
}
}
}