the simplest of answers is:
Code:
PANEL* pnl_inventory
{
layer 1; //etc.... etc... and stuff...
}

function fnc_inv_toggle()
{
toggle(pnl_inventory,VISIBLE);
}

void main()
{
on_i = fnc_inv_toggle;
}


whether that's all you want tho I'm not sure smirk