lol
Code:
panel pnl_inventory
{
layer = 9; /// still more stuff bmap etc...
}

function fnc_inv_toggle()
{
//if (pnl_inventory.visible == on) { pnl_inventory.visible = off; } else { pnl_inventory.visible = on; } //the readable way
pnl_inventory.visible = (pnl_inventory.visible == off); //the coders way both are usable
}

function main()
{
return;
}

on_i = fnc_inv_toggle;