Castillo Posted September 1, 2011 Share Posted September 1, 2011 I don't know what's that, but is wrong. function fade() fadeCamera(source,false,10.0) end addEventHandler("onPlayerJoin",getRootElement(),fade) Link to comment
CapY Posted September 1, 2011 Share Posted September 1, 2011 lool i triggered Client to a client Link to comment
CapY Posted September 1, 2011 Share Posted September 1, 2011 Bump * Label doesnt remove after 10 seconds and fadeCamera starts to remove from first second and my FPS goes from 35 to 20 . 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("blurFade",getRootElement(),fade) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) Server: function fade() fadeCamera(source,true,10.0) triggerClientEvent("fadeNew",getRootElement(),lol) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) EDIT: FIXED Link to comment
JR10 Posted September 1, 2011 Share Posted September 1, 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("blurFade",getLocalPlayer()) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) server: function fade() triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) triggerServer/ClientEvent doesn't have an argument for the function, it's already triggered as soon as the event is triggered. It's fading because you added "fadeCamera" in "fade" function, seriously, it's like you are not the one who made it. Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 Doesnt works Jacob . 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("blurFade",getLocalPlayer()) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) Server: function fade() fadeCamera(source,true,10.0) triggerClientEvent(source , "fadeNew", getRootElement(),lol) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) My fps goes low and black screen dissapears on join and it must dissapear when label dissapears too , and yep my screen starts to bliping and shaking. Link to comment
JR10 Posted September 2, 2011 Share Posted September 2, 2011 You didn't take the server side. Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 Jacob that doesnt work too . Screen is still shaking and blipping . Server: function fade() triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) 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("blurFade",getLocalPlayer()) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) Link to comment
JR10 Posted September 2, 2011 Share Posted September 2, 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) setTimer(function() triggerServerEvent("blurFade",getLocalPlayer()) end, 10000, 1 ) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 Wtf , did you tested this , because i dont know how to explain you what happens . Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 Bump* Okay i've been fixed it , but one more problem , when some player joins on the server , everybody get's black screen . Here: 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("blurFade",getLocalPlayer(),fade) end addEvent("fadeNew",true) addEventHandler("fadeNew",getRootElement(),lol) Server: function fade() fadeCamera(true,10.0) triggerClientEvent("fadeNew",getRootElement(),lol) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getLocalPlayer(),fade) Link to comment
JR10 Posted September 2, 2011 Share Posted September 2, 2011 OMG, dude, what's wrong with you, do you take my code? Or just ignore it function fade() triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 I did take your code 3 times , but i removed it because it didnt worked and i backed my old one code ! EDIT: Jacob my PC literally freezes with your server code . Link to comment
JR10 Posted September 2, 2011 Share Posted September 2, 2011 Freezes your PC? function fade() fadeCamera(true,10.0) triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) All I did, was specifying triggerFor in triggerClientEvent. Link to comment
CapY Posted September 2, 2011 Share Posted September 2, 2011 Oh thank you so much ! Is it possible to display rules window after that 10 seconds ? Link to comment
JR10 Posted September 2, 2011 Share Posted September 2, 2011 guiSetVisible setTimer ?? Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 I scripted rules window totally wrong .. Server : function fade() fadeCamera(true,10.0) triggerClientEvent(source , "fadeNew", source) end addEventHandler("onPlayerJoin",getRootElement(),fade) addEvent( "blurFade",true ) addEventHandler("blurFade",getRootElement(),fade) function OnjoinRules() triggerClientEvent(source,"blabla", source) end addEventHandler("onPlayerJoin",getRootElement(),OnjoinRules) addEvent("rulesOnJoin",true) addEventHandler("rulesOnJoin",getRootElement(),OnjoinRules) 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 = {} function loled() Window[1] = guiCreateWindow(0.2805,0.2139,0.4172,0.5713,"Rules ",true) guiSetAlpha(Window[1],0.80000001192093) RulesMemo[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,Window[1]) GUIEditor_Button[1] = guiCreateButton(211,547,128,29,"Accept !",false,Window[1]) setTimer ( guiSetVisible, 30000, 2, Window[1], false) triggerServerEvent(source,"rulesOnJoin", source) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) addEventHandler("onClientGUIClick",getRootElement(),GUIEditor_Button[1]) Memo is not displayed, button too . Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 Bump * Okay .. client is fixed now , but rules and welcome label shows up in the same time , how to fix it ? 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) end addEvent("blabla",true) addEventHandler("blabla",getRootElement(), loled) addEventHandler("onClientGUIClick",getRootElement(),GUIEditor_Button[1]) Link to comment
triplesnake Posted September 3, 2011 Share Posted September 3, 2011 (edited) nvm i didnt notice sth Edited September 3, 2011 by Guest Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 That's because you are attaching both onPlayerJoin. Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 and for one it will be like this : addEventHandler("onPlayerJoin",getRootElement(),OnjoinRules,fade) ?? Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 You can't do that, you will have to make another addEventHandler. When you are done fading, trigger an event which will show the GUI, try something yourself. Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 Events are already trigered . Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 I'm talking about, when fading ends, start showing the GUI. Link to comment
CapY Posted September 3, 2011 Share Posted September 3, 2011 And see your work errors. blurgui\server.lua:7: Bad argument @ 'addEventHandler' [Expected string at argument 1, got nil] client.lua:12: attempt to call global 'source' ( a usedata value ) 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