Jump to content

New Help Gui


Klesh

Recommended Posts

I have this code:

  
addEventHandler("onClientResourceStart",resourceRoot, 
ServerRulesWindow = guiCreateWindow(272,134,521,480,"Server Rules by Klesh",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(52,76,424,339,false,ServerRulesWindow) 
GUIEditor_Tab[1] = guiCreateTab("Information Server",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(18,32,183,23,"CSS Owner :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[1],0,247,255) 
GUIEditor_Label[2] = guiCreateLabel(18,69,114,25,"- Klesh",false,GUIEditor_Tab[1]) 
GUIEditor_Label[3] = guiCreateLabel(18,107,114,25,"CSS Leaders :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[3],0,247,255) 
GUIEditor_Label[4] = guiCreateLabel(19,147,114,25,"- Klesh",false,GUIEditor_Tab[1]) 
GUIEditor_Label[5] = guiCreateLabel(19,180,114,25,"- Pr1v4t3",false,GUIEditor_Tab[1]) 
GUIEditor_Label[6] = guiCreateLabel(19,216,114,25,"Web Site :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[6],0,247,255) 
GUIEditor_Label[7] = guiCreateLabel(114,214,261,20,"\"The Web Site of the Clan is on Construccion.\"",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[7],255,0,0) 
GUIEditor_Label[8] = guiCreateLabel(20,263,375,22,"The join is open, only with an invitation!",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[8],255,0,0) 
GUIEditor_Tab[2] = guiCreateTab("General Rules",GUIEditor_TabPanel[1]) 
GUIEditor_Label[9] = guiCreateLabel(12,18,166,26,"Server Rules",false,GUIEditor_Tab[2]) 
guiLabelSetColor(GUIEditor_Label[9],255,0,0) 
guiSetFont(GUIEditor_Label[9],"default-bold-small") 
GUIEditor_Label[10] = guiCreateLabel(10,56,166,26,"- Respect other players.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[11] = guiCreateLabel(9,91,192,22,"- Don't ask how to be an admin.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[12] = guiCreateLabel(8,124,265,19,"- Only you can enter on the with an invitation.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[13] = guiCreateLabel(9,158,283,19,"- The spam or flood in the chat can get muted.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[14] = guiCreateLabel(9,193,283,19,"- The Cheats are not allowed in this server.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[15] = guiCreateLabel(8,228,283,19,"- Use the report system if you spotted a hacker.",false,GUIEditor_Tab[2]) 
GUIEditor_Tab[3] = guiCreateTab("Commands",GUIEditor_TabPanel[1]) 
GUIEditor_Label[16] = guiCreateLabel(16,22,102,24,"Me Commands :",false,GUIEditor_Tab[3]) 
guiLabelSetColor(GUIEditor_Label[16],0,247,255) 
GUIEditor_Label[17] = guiCreateLabel(16,69,399,20,"- /hi : Hi to Everybody",false,GUIEditor_Tab[3]) 
GUIEditor_Label[18] = guiCreateLabel(14,98,399,20,"- /bb : Bye Bye to Everybody",false,GUIEditor_Tab[3]) 
GUIEditor_Label[19] = guiCreateLabel(13,129,399,20,"- /brb : Will be right Back!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[20] = guiCreateLabel(13,159,399,20,"- /tyt : Thank you too!!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[21] = guiCreateLabel(12,192,399,20,"- /ty : Thanks to you!!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[22] = guiCreateLabel(12,224,399,20,"- /gg : Good Game!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[23] = guiCreateLabel(11,256,399,20,"The constant abuse of the commands can get  ban.",false,GUIEditor_Tab[3]) 
guiLabelSetColor(GUIEditor_Label[23],0,247,255) 
AcceptButtom = guiCreateButton(148,430,224,30,"I Accept with The Rules",false,ServerRulesWindow) 
PlayerNameLabel = guiCreateLabel(143,39,236,18,"Welcome to CSS Window Help.",false,ServerRulesWindow) 
guiLabelSetColor(PlayerNameLabel,0,247,255) 
guiLabelSetHorizontalAlign(PlayerNameLabel,"center",false) 
guiSetFont(PlayerNameLabel,"clear-normal") 
     
function onresourceStart () 
  bindKey ("F9", "down", ServerRulesWindow) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 
  
function ServerRulesWindow () 
getVisible = guiGetVisible (ServerRulesWindow) 
playerName = getPlayerName ( getLocalPlayer() ) 
if (getVisible == true) then 
    guiSetVisible (ServerRulesWindow, false) 
    showCursor (false) 
end 
  
if (getVisible == false) then 
    guiSetVisible (ServerRulesWindow, true) 
    showCursor (true) 
    local playerName = getPlayerName ( getLocalPlayerName() ) 
    guiSetText ( PlayerNameLabel, "Welcome to CSS Window Help: [ " .. playerName .. " ]" ) 
    end 
end 
) 
  

client-side

Why dont open the GUI with f9?

Link to comment

Why dont open the GUI with f9?

function onresourceStart is created in anonymus function that is caled on resource start and "onClientResourceStart" event is triggered only once for the current resource.

conclusion: function onresourceStart is never triggered, and F9 key is never binded...

Link to comment

1)why you define player name twice?

2)handler is not proper, it doesn't have a function.

3)very strange code, duplicated, not needed length, etc.

4)many syntax errors, and 1 typo

addEventHandler("onClientResourceStart",getResourceRootElement(),function() 
ServerRulesWindow = guiCreateWindow(272,134,521,480,"Server Rules by Klesh",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(52,76,424,339,false,ServerRulesWindow) 
GUIEditor_Tab[1] = guiCreateTab("Information Server",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(18,32,183,23,"CSS Owner :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[1],0,247,255) 
GUIEditor_Label[2] = guiCreateLabel(18,69,114,25,"- Klesh",false,GUIEditor_Tab[1]) 
GUIEditor_Label[3] = guiCreateLabel(18,107,114,25,"CSS Leaders :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[3],0,247,255) 
GUIEditor_Label[4] = guiCreateLabel(19,147,114,25,"- Klesh",false,GUIEditor_Tab[1]) 
GUIEditor_Label[5] = guiCreateLabel(19,180,114,25,"- Pr1v4t3",false,GUIEditor_Tab[1]) 
GUIEditor_Label[6] = guiCreateLabel(19,216,114,25,"Web Site :",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[6],0,247,255) 
GUIEditor_Label[7] = guiCreateLabel(114,214,261,20,"\"The Web Site of the Clan is on Construccion.\"",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[7],255,0,0) 
GUIEditor_Label[8] = guiCreateLabel(20,263,375,22,"The join is open, only with an invitation!",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[8],255,0,0) 
GUIEditor_Tab[2] = guiCreateTab("General Rules",GUIEditor_TabPanel[1]) 
GUIEditor_Label[9] = guiCreateLabel(12,18,166,26,"Server Rules",false,GUIEditor_Tab[2]) 
guiLabelSetColor(GUIEditor_Label[9],255,0,0) 
guiSetFont(GUIEditor_Label[9],"default-bold-small") 
GUIEditor_Label[10] = guiCreateLabel(10,56,166,26,"- Respect other players.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[11] = guiCreateLabel(9,91,192,22,"- Don't ask how to be an admin.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[12] = guiCreateLabel(8,124,265,19,"- Only you can enter on the with an invitation.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[13] = guiCreateLabel(9,158,283,19,"- The spam or flood in the chat can get muted.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[14] = guiCreateLabel(9,193,283,19,"- The Cheats are not allowed in this server.",false,GUIEditor_Tab[2]) 
GUIEditor_Label[15] = guiCreateLabel(8,228,283,19,"- Use the report system if you spotted a hacker.",false,GUIEditor_Tab[2]) 
GUIEditor_Tab[3] = guiCreateTab("Commands",GUIEditor_TabPanel[1]) 
GUIEditor_Label[16] = guiCreateLabel(16,22,102,24,"Me Commands :",false,GUIEditor_Tab[3]) 
guiLabelSetColor(GUIEditor_Label[16],0,247,255) 
GUIEditor_Label[17] = guiCreateLabel(16,69,399,20,"- /hi : Hi to Everybody",false,GUIEditor_Tab[3]) 
GUIEditor_Label[18] = guiCreateLabel(14,98,399,20,"- /bb : Bye Bye to Everybody",false,GUIEditor_Tab[3]) 
GUIEditor_Label[19] = guiCreateLabel(13,129,399,20,"- /brb : Will be right Back!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[20] = guiCreateLabel(13,159,399,20,"- /tyt : Thank you too!!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[21] = guiCreateLabel(12,192,399,20,"- /ty : Thanks to you!!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[22] = guiCreateLabel(12,224,399,20,"- /gg : Good Game!",false,GUIEditor_Tab[3]) 
GUIEditor_Label[23] = guiCreateLabel(11,256,399,20,"The constant abuse of the commands can get  ban.",false,GUIEditor_Tab[3]) 
guiLabelSetColor(GUIEditor_Label[23],0,247,255) 
AcceptButtom = guiCreateButton(148,430,224,30,"I Accept with The Rules",false,ServerRulesWindow) 
PlayerNameLabel = guiCreateLabel(143,39,236,18,"Welcome to CSS Window Help.",false,ServerRulesWindow) 
local playerName=getPlayerName(getLocalPlayer()) 
guiSetText( PlayerNameLabel, "Welcome to CSS Window Help: [ " .. playerName .. " ]" ) 
guiLabelSetColor(PlayerNameLabel,0,247,255) 
guiLabelSetHorizontalAlign(PlayerNameLabel,"center",false) 
guiSetFont(PlayerNameLabel,"clear-normal")  
bindKey ("F9", "down", ServerRulesWindow) 
end) 
  
function ServerRulesWindow () 
  getVisible = guiGetVisible (ServerRulesWindow) 
  guiSetVisible(ServerRulesWindow,not getVisible) 
  showCursor(not getVisible) 
end 
  
  

Link to comment

I try to do a new one, but the GUI Not Open.

helpSystemPanelWindow = guiCreateWindow(302,145,397,459,"Help System by Klesh",false) 
UnknowTab = guiCreateTabPanel(27,43,347,368,false,helpSystemPanelWindow) 
ServerInfoTab = guiCreateTab("Server Information",UnknowTab) 
OwnerLabelServerInfo = guiCreateLabel(16,27,169,27,"Owner :",false,ServerInfoTab) 
guiLabelSetColor(OwnerLabelServerInfo,0,247,255) 
KleshLabelServerInfo = guiCreateLabel(16,65,169,27,"- Klesh",false,ServerInfoTab) 
LeadersLabelServerInfo = guiCreateLabel(17,113,169,27,"Leaders :",false,ServerInfoTab) 
localPlayer = getLocalPlayer() 
  
guiLabelSetColor(LeadersLabelServerInfo,0,247,255) 
LeadersKleshLabelServerInfo = guiCreateLabel(17,154,169,27,"- Klesh",false,ServerInfoTab) 
LeadersPr1vat3LabelServerInfo = guiCreateLabel(18,187,169,27,"- Pr1v4t3",false,ServerInfoTab) 
JoinLabelServerInfo = guiCreateLabel(18,226,169,27,"Join by an invitation is open.",false,ServerInfoTab) 
guiLabelSetColor(JoinLabelServerInfo,0,247,255) 
ClanWebLabelServerInfo = guiCreateLabel(18,266,189,25,"Clan Web Site is in construction.",false,ServerInfoTab) 
guiLabelSetColor(ClanWebLabelServerInfo,0,247,255) 
GeneralRulesTab = guiCreateTab("General Rules",UnknowTab) 
RulesLabelGeneralRules = guiCreateLabel(14,21,156,28,"Rules",false,GeneralRulesTab) 
guiLabelSetColor(RulesLabelGeneralRules,0,247,255) 
guiSetFont(RulesLabelGeneralRules,"default-bold-small") 
RespectLabelGeneralRules = guiCreateLabel(15,71,323,21,"- Respect other players.",false,GeneralRulesTab) 
DontLabelGeneralRules = guiCreateLabel(15,106,323,21,"- Don't ask how to be an admin.",false,GeneralRulesTab) 
SpamLabelGeneralRules = guiCreateLabel(16,142,323,21,"- Spam or Flood in the chat can get a mute.",false,GeneralRulesTab) 
CheatLabelGeneralRules = guiCreateLabel(16,176,323,21,"- Cheat is not allowed in this server.",false,GeneralRulesTab) 
UseLabelGeneralRules = guiCreateLabel(16,210,323,21,"- Use the /report system i've you spotted a hacker.",false,GeneralRulesTab) 
OnlyLabelGeneralRules = guiCreateLabel(16,243,323,21,"- Only can enter on the clan with an invitation.",false,GeneralRulesTab) 
CommandsTab = guiCreateTab("Commands",UnknowTab) 
MeCommandsLabel = guiCreateLabel(18,22,131,23,"Me Commands",false,CommandsTab) 
guiLabelSetColor(MeCommandsLabel,0,247,255) 
HiLabelCommands = guiCreateLabel(16,67,303,23,"/hi : Hi to Everyone!",false,CommandsTab) 
ByeLabelCommands = guiCreateLabel(15,105,303,23,"/bb : Bye Bye to Everyone!",false,CommandsTab) 
wbLabelCommands = guiCreateLabel(15,140,303,23,"/wb : Welcome Back!!",false,CommandsTab) 
tytLabelCommands = guiCreateLabel(14,174,303,23,"/tyt : Thank you too!",false,CommandsTab) 
ggLabelCommands = guiCreateLabel(13,212,303,23,"/gg : Good Game!",false,CommandsTab) 
tyLabelCommand = guiCreateLabel(13,248,303,23,"/ty : Thank you!",false,CommandsTab) 
lmLabelCommands = guiCreateLabel(11,284,303,23,"/lm : This will be my last map!",false,CommandsTab) 
AcceptRulesButton = guiCreateButton(95,423,209,24,"I accept with the rules",false,helpSystemPanelWindow) 
  
function onresourceStart () 
  bindKey ("F9", "down", helpSystemPanelWindow) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 
  
function showhelpSystemPanelWindow () 
getVisible = guiGetVisible (helpSystemPanelWindow) 
if (getVisible == true) then 
    guiSetVisible (helpSystemPanelWindow, false) 
    showCursor (false) 
end 
if (getVisible == false) then 
    guiSetVisible (helpSystemPanelWindow, true) 
    showCursor (true) 
end 
  
addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), 
function() 
        addEventHandler("onClientPlayerJoin", getRootElement(), updateplayersList) 
        outputChatBox("Resource Helpgui v0.1 Started! press F9 to use it!",0,255,0) 
        outputChatBox("Author: Klesh",255,255,0) 
    end 
)  
  
  
  

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...