How can I store variables on client(in some ini) for a mod and access/modify it as and when required?
//=============================================================================
// UShopClientWin.
//=============================================================================
class UShopClientWin expands UWindowDialogClientWindow Config(UShop);
// Configurable weapon list
Var Config Class <Weapon> ShopWeapons[50]; // List of weapons
Var UWindowSmallButton Button_Weapon0;
function Created()
{
ResetConfig(); // Reset ShopWeapons to whatever is in my .ini
Super.Created();
Button_Weapon0 = UWindowSmallButton(CreateWindow(class'UWindowSmallButton', WinWidth/2-122, WinHeight/2-20, 120, 16));
Button_Weapon0.SetText(""$ShopWeapons[0].Name); // Get the name of the first weapon and print the text to the button
Button_Weapon0.Register(Self);
}
function Notify(UWindowDialogControl C, byte E)
{
/* Click types: DE_Created, DE_Change, DE_Click, DE_Enter, DE_Exit, DE_MClick, DE_RClick, DE_EnterPressed, DE_MouseMove,
DE_MouseLeave, DE_LMouseDown, DE_DoubleClick, DE_MouseEnter, DE_HelpChanged, DE_WheelUpPressed, DE_WheelDownPressed. */
if( E==DE_Click && C==Button_Weapon0 )
{
GetPlayerOwner().Summon(""$ShopWeapons[0]); // Summon the first weapon in the list in our .ini
// OwnerWindow.Close();
}
}
[UShop.UShopClientWin]
ShopWeapons[0]=Class'UnrealI.Quadshot'