Just a question...
doesn't the first line override the "addItem" event?
registerOutputEvent("Player", "AddItem", "datablock ItemData", "Money" 1);
function Player::addItem(%player,%image,%client)
{
for(%i = 0; %i < %player.getDatablock().maxTools; %i++)
{
%tool = %player.tool[%i];
if(%tool == 0)
{
if(%client.money = "Money")
{
%player.tool[%i] = %image;
%player.weaponCount++;
messageClient(%client,'MsgItemPickup','',%i,%image);
break;
}
else
return;
}
}
}
function fxDtsBrick::ifMoneyValid(%brick,%client)
{
$inputTarget_Self = %brick;
$inputTarget_Player = %client.player;
$inputTarget_Bot = %brick.vehicle;
$inputTarget_Client = %client;
$inputTarget_Minigame = getMinigameFromObject(%client);
if(%client.money >= "Money");
%brick.processInputEvent("ifMoneyValid",%client);
}
function fxDtsBrick::ifMoneyInvalid(%brick,%client)
{
$inputTarget_Self = %brick;
$inputTarget_Player = %client.player;
$inputTarget_Bot = %brick.vehicle;
$inputTarget_Client = %client;
$inputTarget_Minigame = getMinigameFromObject(%client);
if(%client.money < "Money");
%brick.processInputEvent("ifMoneyValid",%client);
}
Cleaned up the code a bit and fixed a few things, it doesn't do what you want it to do though... or work.
It would be much easier with VCE.