function onActionServerside() { if (params[0] == "addflags") serverr.(@params[1]) = params[2]; } //#CLIENTSIDE function onCreated() { creategui(); getflags(); } //--------------------Creation GUI----------------------- function addrowsys_Button1.onAction() { new GuiWindowCtrl("Extent_Window1") { profile = GuiBlueWindowProfile; clientrelative = true; clientextent = "176,118"; canmaximize = false; canminimize = false; canmove = true; canresize = true; closequery = false; destroyonhide = true; text = "Add a flag"; x = 517; y = 209; new GuiTextEditCtrl("Extent_TextEdit1") { profile = GuiBlueTextEditProfile; height = 20; width = 80; x = 7; y = 19; } new GuiTextEditCtrl("Extent_TextEdit2") { profile = GuiBlueTextEditProfile; height = 20; width = 80; x = 7; y = 59; } new GuiTextCtrl("Extent_Text1") { profile = GuiBlueTextProfile; height = 20; text = "Flag Content"; width = 73; x = 92; y = 58; } new GuiTextCtrl("Extent_Text2") { profile = GuiBlueTextProfile; height = 20; text = "Title / Name"; width = 69; x = 93; y = 18; } new GuiButtonCtrl("Extent_Button1") { profile = GuiBlueButtonProfile; height = 22; text = "Add Flag"; width = 164; x = 6; y = 90; } } } //-----------------------Main GUI------------------------ function CreateGui() { new GuiWindowCtrl("addrowsys_Window1") { profile = GuiBlueWindowProfile; clientrelative = true; clientextent = "367,238"; isexternal = false; canmaximize = false; canminimize = false; canmove = true; canresize = false; closequery = false; destroyonhide = true; text = "Server Flag Editor"; x = 480; y = 84; new GuiControl("Border1") { useownprofile = true; profile.border = 0; profile.opaque = true; profile.fillColor = { 163, 194, 212, 120 }; width = 367; height = 238; x = 0; y = 0; } new GuiButtonCtrl("addrowsys_Button1") { profile = GuiBlueButtonProfile; height = 24; text = "+"; width = 24; x = 335; y = 3; hint = "Add flag"; } new GuiButtonCtrl("addrowsys_Button3") { profile = GuiBlueButtonProfile; height = 24; text = "?"; width = 24; x = 285; y = 3; hint = "help"; } new GuiButtonCtrl("addrowsys_Button4") { profile = GuiBlueButtonProfile; height = 24; text = "^"; width = 24; x = 310; y = 3; hint = "Update"; } new GuiScrollCtrl("addrowsys_TextList1_Scroll") { profile = GuiBlueScrollProfile; hscrollbar = "alwaysOff"; vscrollbar = "dynamic"; width = 354; x = 6; y = 32; new GuiTextListCtrl("addrowsys_TextList1") { profile = GuiBlueTextListProfile; height = 34; horizsizing = "width"; sortcolumn = 167550464; width = 350; } } new GuiTextCtrl("addrowsys_Text1") { profile = GuiBlueTextProfile; height = 20; text = "Server Flag Adder."; width = 305; x = 9; y = 6; } } } //------------------Button Actions-------------------- function addrowsys_Button4.onAction() { getflags(); } function Extent_Button1.onAction() { addflags(); } function addrowsys_Button3.onAction() { say2("You can add rows#bto the GUI by pressing#bthe + button.#bYou can update the flag#bscreen by pressing the ^ button."); } //------------------functions----------------------- function GetFlags() { addrowsys_TextList1.clearrows(); for (temp.flag: serverr.getdynamicvarnames()) { addrowsys_TextList1.addrow(temp.count, temp.flag, temp.value = serverr.(@temp.flag)); temp.count++; } } function AddFlags() { triggerserver("gui", this.name, "addflags", Extent_TextEdit1.text, Extent_TextEdit2.text); getflags(); } function OpenGui() { creategui(); addflags(); } //----------------------Other--------------------------- function onPlayerChats() { if (player.chat == "/flagadder") { OpenGui(); //Opens the GUI. } }