Lucario Posted May 26, 2013 Posted May 26, 2013 Hi, i have a little problem with the dx login/join messages, i want when a player join the server and the download is in progress, show the second dx message, and when a player click register show the first dx message, using onplayerlogin and onplayerjoin: function dxLoginMessage() dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 337, 1139, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 335, 1139, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 337, 1137, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 335, 1137, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 239, 336, 1138, 375, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) setTimer(dxLoginMessage, 6000, 1) end addEventHandler("onPlayerLogin", root, dxLoginMessage) function dxJoinMessage() dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 316, 1012, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 314, 1012, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 316, 1010, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 314, 1010, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 247, 315, 1011, 455, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onPlayerJoin", root, dxJoinMessage) removeEventHandler("onPlayerLogin", root, dxJoinMessage) removeEventHandler("onPlayerRegister", root, dxJoinMessage)
iPrestege Posted May 26, 2013 Posted May 26, 2013 You are not make a much sense with your script are u sure there's event called onPlayerRegister ? And dx text use ( onClientRender ) Event to draw it .
Jaysds1 Posted May 26, 2013 Posted May 26, 2013 ok, there is multiple of things you need done. Here's a list of all the things that you need: Client-side: dxDrawText onClientRender or onClientPreRender Server-side: triggerClientEvent onPlayerJoin onPlayerLogin And onPlayerRegister doesn't exist, you could make one up your self.
Lucario Posted May 26, 2013 Author Posted May 26, 2013 Made Client side: function dxLoginMessage() dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 337, 1139, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 335, 1139, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 337, 1137, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 335, 1137, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 239, 336, 1138, 375, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientPreRender", root, dxLoginMessage) addEvent("onClientPreRender", true) function dxJoinMessage() dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 316, 1012, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 314, 1012, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 316, 1010, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 314, 1010, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 247, 315, 1011, 455, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, dxJoinMessage) addEvent("onClientRender", true) Server side: function dxJoinFunction () triggerClientEvent("onClientRender", getRootElement()) end addEventHandler("onPlayerJoin", root, dxJoinFunction) function dxLoginFunction () triggerClientEvent("onClientPreRender", getRootElement()) setTimer(dxLoginFunction, 6000, 1) end addEventHandler("onPlayerLogin", root, dxLoginFunction) removeEventHandler("onPlayerJoin", root, dxLoginFunction) Now the 2 messages appear in 1 time
iPrestege Posted May 26, 2013 Posted May 26, 2013 -- # Server Side Here : function dxJoinFunction ( ) triggerClientEvent(source,"JoinDx",source) end addEventHandler("onPlayerJoin", root, dxJoinFunction) function dxLoginFunction ( ) triggerClientEvent(source,"LoginDx",source) end addEventHandler("onPlayerLogin", root, dxLoginFunction) -- # Client Side Here : function dxLoginMessage() dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 337, 1139, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 240, 335, 1139, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 337, 1137, 376, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 238, 335, 1137, 374, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Recordatorio: Apreta F4 Para Abrir/Cerrar el Panel de Ayuda", 239, 336, 1138, 375, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) end function dxJoinMessage() dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 316, 1012, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 248, 314, 1012, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 316, 1010, 456, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 246, 314, 1010, 454, tocolor(0, 0, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Espera Mientras Cargue el Servidor, \nNo Tardara Mucho, y Te Sumergiras al Mejor Servidor \nde Mta San Andreas. \nEn Total Tenemos 2 Servidores, Juramento Freeroam \ny Juramento Zombie Roleplay", 247, 315, 1011, 455, tocolor(0, 255, 0, 255), 0.85, "bankgothic", "left", "top", false, false, true, false, false) end addEvent("JoinDx",true) addEventHandler("JoinDx",root, function ( ) addEventHandler("onClientRender",root,dxJoinMessage) end ) addEvent("LoginDx",true) addEventHandler("LoginDx",root, function ( ) removeEventHandler("onClientRender",root,dxJoinMessage) addEventHandler("onClientRender",root,dxLoginMessage) setTimer ( function ( ) removeEventHandler("onClientRender",root,dxLoginMessage) end,6000,1 ) end )
Lucario Posted May 26, 2013 Author Posted May 26, 2013 OFF: Can you help me with the last post please?
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