Jump to content

Dx join/login messages


Lucario

Recommended Posts

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) 

Link to comment

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 :|

Link to comment

-- # 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 
) 
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...