How to give player a custom gun;

Hi folks,
I'm working on my counterstrike mod again, and I need some help.
How might I give a player a custom weapon from within a MenuUIScreenWindow class?
I know how to give the player a weapon from the player class, but I can't within a class that extends MenuUIScreenWindow:
Here is the context of the method;
I'm working on my counterstrike mod again, and I need some help.
How might I give a player a custom weapon from within a MenuUIScreenWindow class?
I know how to give the player a weapon from the player class, but I can't within a class that extends MenuUIScreenWindow:
Here is the context of the method;
- Code: Select all
function ProcessAction(String S)
{
local DeusExPlayer anItem;
Super.ProcessAction(S);
if (S == "DONT BUY")
{
PlayerBuy.ClientSetBuy(-1);
Current.SetText("");
}
else if (S == "BUY") //WHAT DO I DO?????
{
// Items
//anItem = Spawn(class'MP5S.Weaponm16;);
//anItem.Frob(Self,None); //DOESN'T WORK
Player = seal(GetPlayerPawn());
seal.GiveInventory(Player); //DOESN'T WORK
//anItem.GiveInitialInventory();
//actionButtons[2].btn.SetSensitivity(false);
}
}