CapY Posted September 3, 2011 Share Posted September 3, 2011 Client : GUIEditor_Label = {} function lol () GUIEditor_Label[1] = guiCreateLabel(0.4063,0.3779,0.1531,0.209,"Welcome to our server ! Server is under construction at the moment , but feel free to play on it , expect more gamemodes from us , more features and much , much more ...",true) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",true) guiSetFont(GUIEditor_Label[1],"clear-normal") fadeCamera(false,10.0) setTimer( fadeCamera, 10000,1,true) setTimer ( guiSetVisible, 10000, 1, GUIEditor_Label[1], false) triggerServerEvent(source"blurFade",source) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),lol) GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent(source,"rulesOnJoin", source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showRulePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) removeEventHandler("onClientGUIClick",GUIEditor_Button[1],showRulePanel) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showRulePanel) end end Server : function fade() fadeCamera(true,10.0) triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler(source,"blurFade",source) function OnjoinRules() triggerClientEvent("blabla",getRootElement(), source) end addEvent("rulesOnJoin",true) addEventHandler("rulesOnJoin",getRootElement(),OnjoinRules) Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 My code? -__- WTF is: addEventHandler(source,"blurFade",source) WTF is that, and you say my code. Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 Can i seperate first and second part in 2 different folders ? Edit: I really dont get what is wrong here ... Client: GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent(source,"rulesOnJoin",source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showNamePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showNamePanel) triggerServerEvent(source,"namePanelServer",source) end end addEvent("namePanel",true) addEventHandler("namePanel",getRootElement(),showNamePanel) Server: function OnjoinRules() triggerClientEvent(source,"blabla",source) end addEvent("rulesOnJoin",true) addEventHandler("rulesOnJoin",getRootElement(),OnjoinRules) addEventHandler("onPlayerJoin",getRootElement(),OnjoinRules) function serverRules() triggerClientEvent(source,"namePanel",source) end addEvent("namePanelServer",true) addEventHandler("namePanelServer",getRootElement(),serverRules) When i click accept , window doesnt want to dissapear. -.- Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showNamePanel) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent(source,"rulesOnJoin",source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showNamePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) triggerServerEvent(source,"namePanelServer",source) end end addEvent("namePanel",true) addEventHandler("namePanel",getRootElement(),showNamePanel) Link to comment
CapY Posted September 5, 2011 Share Posted September 5, 2011 This is the whole script and something is not good inside .. it seems we are messed 2 scripts in one . Client : GUIEditor_Label = {} function lol () GUIEditor_Label[1] = guiCreateLabel(0.4063,0.3779,0.1531,0.209,"Welcome to our server ! Server is under construction at the moment , but feel free to play on it , expect more gamemodes from us , more features and much , much more ...",true) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",true) guiSetFont(GUIEditor_Label[1],"clear-normal") fadeCamera(false,10.0) setTimer( fadeCamera, 10000,1,true) setTimer ( guiSetVisible, 10000, 1, GUIEditor_Label[1], false) triggerServerEvent(source,"blurFade",source) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) addEventHandler("onClientResourceStart",getRootElement(),lol) GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showNamePanel) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent(source,"rulesOnJoin",source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showNamePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) triggerServerEvent(source,"namePanelServer",source) end end addEvent("namePanel",true) addEventHandler("namePanel",getRootElement(),showNamePanel) GUI Label is okay, but rules window is not displayed after label. And server : function fade() fadeCamera(true,10.0) triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler(source,"blurFade",source) function rulesS() triggerClientEvent(source,"namePanel",source) end addEvent("namePanelServer",true) addEventHandler("namePanelServer",getRootElement(),rulesS) Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 triggerServerEvent(source,"namePanelServer",source) That's wrong. triggerServerEvent("namePanelServer",source) Link to comment
CapY Posted September 5, 2011 Share Posted September 5, 2011 Doesnt work. Client: GUIEditor_Label = {} function lol () GUIEditor_Label[1] = guiCreateLabel(0.4063,0.3779,0.1531,0.209,"Welcome to our server ! Server is under construction at the moment , but feel free to play on it , expect more gamemodes from us , more features and much , much more ...",true) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",true) guiSetFont(GUIEditor_Label[1],"clear-normal") fadeCamera(false,10.0) setTimer( fadeCamera, 10000,1,true) setTimer ( guiSetVisible, 10000, 1, GUIEditor_Label[1], false) triggerServerEvent(source,"blurFade",source) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),lol) GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showNamePanel) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent(source,"rulesOnJoin",source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showNamePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) triggerServerEvent("namePanelServer",source) end end addEvent("namePanel",true) addEventHandler("namePanel",getRootElement(),showNamePanel) Server: function fade() fadeCamera(true,10.0) triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) function rulesS() triggerClientEvent(source,"namePanel",source) end addEvent("namePanelServer",true) addEventHandler("namePanelServer",getRootElement(),rulesS) No errors in debug . Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 GUIEditor_Label = {} function lol () GUIEditor_Label[1] = guiCreateLabel(0.4063,0.3779,0.1531,0.209,"Welcome to our server ! Server is under construction at the moment , but feel free to play on it , expect more gamemodes from us , more features and much , much more ...",true) guiLabelSetColor(GUIEditor_Label[1],0,255,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",true) guiSetFont(GUIEditor_Label[1],"clear-normal") fadeCamera(false,10.0) setTimer( fadeCamera, 10000,1,true) setTimer ( guiSetVisible, 10000, 1, GUIEditor_Label[1], false) triggerServerEvent("blurFade",source) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),lol) GUIEditor_Button = {} GUIEditor_Window = {} GUIEditor_Memo = {} function loled() GUIEditor_Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(GUIEditor_Window[1],0.80000001192093) GUIEditor_Memo[1] = guiCreateMemo(16,38,501,490," Here is a list of our rules, respect them.\n\n\n1. Do NOT use any kinds of hacks and cheats. \n\n2. Do NOT argue with staff, our is last word.\n\n3. Respect other players , especially members.\n\n4. Dont fight with others.\n\n5. Dont use any outgame modified handlings ( use handling editor for that, more info on F9 ) \n\n6. Never ask for membership, we will ask you .\n\n7. Dont bother staff .\n\n8. Have a bit of experience .\n\n9. If something is not understand to you , just read help on F9 .\n\n10. Dont spam vehicles , dont RAM others.\n\n\nAbove all , have fun !\n\n\n\n\nNote: Every rule break can result as kick / ban or permaban.",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",GUIEditor_Button[1],showNamePanel) setTimer ( guiSetEnabled, 10000, 2, GUIEditor_Window[1], true) triggerServerEvent("rulesOnJoin",source) showCursor(true) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) function showNamePanel () local playerName = getPlayerName ( getLocalPlayer() ) if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor (false) else guiSetVisible (GUIEditor_Window[1], true) showCursor (true) triggerServerEvent("namePanelServer",source) end end addEvent("namePanel",true) addEventHandler("namePanel",getRootElement(),showNamePanel) Read the WIKI, triggerServerEvent is not like triggerClientEvent. Link to comment
CapY Posted September 5, 2011 Share Posted September 5, 2011 Still fails i tried to replace guiSetEnabled with guiSetVisible , but still doesnt works Link to comment
CapY Posted September 6, 2011 Share Posted September 6, 2011 Something is wrong with the function , because i know the GUI works(i tested it ) , but it's not displayed (visible), i just want GUI to be visible after 10 seconds. Link to comment
CapY Posted September 9, 2011 Share Posted September 9, 2011 Is it possible to create it in client side a display it after 10 secs ? Link to comment
Cadu12 Posted September 10, 2011 Share Posted September 10, 2011 Why you didnt create your own, its realy easy 25 lines... Use dxDrawColorText... I have made toady it Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now