Blockland Forums > Modification Help

How do you show a variable?

Pages: (1/1)

Kiwi:

I want to make VCE Prints show the current ammo amount of the CnS weapons.

--- Code: ---registerOutputEvent("Player", "ACRRefillAmmo");

function Player::ACRRefillAmmo(%obj, %client)
{
    %obj.toolAmmo[%obj.currTool] = 30;
    %obj.client.quantity["ReloadAmmo"] = 60;
    %obj.client.quantity["ReloadCount"] = 0;
%obj.playThread(2, plant);
    commandToClient(%obj.client,'centerPrint',"<just:right>\c6ACR Ammo Refilled!", 1, 2, 3, 4);  
}
--- End code ---


--- Code: ---registerSpecialVar(Player, "Ammo", "%client.player.toolAmmo[%client.player.currTool]");
--- End code ---
The code above works perfectly but the one below doesn't show up.

--- Code: ---registerSpecialVar(Client, "AmmoReload", "%client.quantity[ReloadAmmo]");
--- End code ---

[ReloadAmmo] is a variable that is generated by the CnS weapons.
How do I make this variable show up in VCE Prints?

Kiwi:

unbump: I worked it out myself. (Where is this damn delete topic button)

Pages: (1/1)

Go to full version