Maruchan Posted May 3, 2021 Share Posted May 3, 2021 People the messages are not displayed ... what is wrong ?, I need your help to fix it. local Fade = true local Pulso = 0 Textos = {} function startRollMessage(text,r,g,b) mensaje = true table.insert(Textos,{text,r,g,b}) checkTimers() if #Textos == 2 then table.remove(Textos,1) end end addEvent("onRollMessageStart",true) addEventHandler("onRollMessageStart",getLocalPlayer(),startRollMessage) function startRollMessage2(head,text,r,g,b) mensaje = true table.insert(Textos,{text,r,g,b}) checkTimers() if #Textos == 2 then table.remove(Textos,1) end end addEvent("Información", true) addEventHandler("Información",getLocalPlayer(),startRollMessage2) destruir = false function DestruirTexto () destruir = true end TiempoDelTexto = {} function checkTimers() if isTimer(TiempoDelTexto["destroy"]) then killTimer(TiempoDelTexto["destroy"]) end TiempoDelTexto["destroy"] = setTimer(DestruirTexto,5000,1) end SIDE = 50 toYpos = 0 function MensajesDx() if Fade then Pulso = Pulso - 20 if (Pulso <= 0) then Pulso = 0 playerBlipFade = false end else Pulso = Pulso + 20 if (Pulso >= 255) then Pulso = 255 Fade = true end end Textos = {} -- AGREGADO if mensaje == true then x,y = guiGetScreenSize() for i,data in next,(Textos) do length = dxGetTextWidth(data[1],1.0,"default-bold") dxDrawRectangle(x*0.450-length/2,y*0.000-SIDE+toYpos,x*0.100+length,y*0.010,tocolor(255, 0, 0, Pulso)) dxDrawRectangle(x*0.450-length/2,y*0.010-SIDE+toYpos,x*0.100+length,y*0.025,tocolor(0, 0, 0)) dxDrawText(data[1],x*0.900,y*0.014-SIDE+toYpos,x*0.100,y*0.100,tocolor(255, 255, 255, math.random(200,255)),1,"default-bold","center") if destruir == false then for to = 1,10 do toYpos = toYpos + 0.50 if toYpos >= 60 then toYpos = 60 end end end -- if destruir == true then for to = 1,10 do toYpos = toYpos - 0.50 if toYpos <= 0 then toYpos = 0 mensaje = false destruir = false end end end -- end end end addEventHandler("onClientRender",getRootElement(),MensajesDx) if fileExists("Barra-cliente.lua") == true then fileDelete("Barra-cliente.lua") end 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