xRGamingx Posted December 23, 2017 Share Posted December 23, 2017 addEventHandler("onClientRender", root, function() local screenW,screenH = guiGetScreenSize() -- The variables local SonR = getElementData(localPlayer, "SonidoNotiReproducido") if SonR == "Si" then playSound("files/noti.ogg") setElementData (localPlayer, "SonidoNotiReproducido", "No") end local NumNoti = getElementData(localPlayer, "CuantaNotificacion") if NumNoti == 1 then dxDrawRectangle(screenW * 0.0578, screenH * 0.9333, screenW * 0.1578, screenH * 0.0574, tocolor(1, 0, 0, 110), false) dxDrawImage(screenW * 0.0578, screenH * 0.9333, screenW * 0.0354, screenH * 0.0574, "Images/Noti.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(""..NumNoti.." Notificación", (screenW * 0.0932) - 1, (screenH * 0.9333) - 1, (screenW * 0.2156) - 1, (screenH * 0.9907) - 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificación", (screenW * 0.0932) + 1, (screenH * 0.9333) - 1, (screenW * 0.2156) + 1, (screenH * 0.9907) - 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificación", (screenW * 0.0932) - 1, (screenH * 0.9333) + 1, (screenW * 0.2156) - 1, (screenH * 0.9907) + 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificación", (screenW * 0.0932) + 1, (screenH * 0.9333) + 1, (screenW * 0.2156) + 1, (screenH * 0.9907) + 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificación", screenW * 0.0932, screenH * 0.9333, screenW * 0.2156, screenH * 0.9907, tocolor(255, 255, 255, 255), 1.10, "sans", "center", "center", false, false, false, false, false) end if NumNoti >= 2 and NumNoti <= 99999 then ----------------Line 647 dxDrawRectangle(screenW * 0.0578, screenH * 0.9333, screenW * 0.1578, screenH * 0.0574, tocolor(1, 0, 0, 110), false) dxDrawImage(screenW * 0.0578, screenH * 0.9333, screenW * 0.0354, screenH * 0.0574, "Images/Noti.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(""..NumNoti.." Notificaciones", (screenW * 0.0932) - 1, (screenH * 0.9333) - 1, (screenW * 0.2156) - 1, (screenH * 0.9907) - 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificaciones", (screenW * 0.0932) + 1, (screenH * 0.9333) - 1, (screenW * 0.2156) + 1, (screenH * 0.9907) - 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificaciones", (screenW * 0.0932) - 1, (screenH * 0.9333) + 1, (screenW * 0.2156) - 1, (screenH * 0.9907) + 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificaciones", (screenW * 0.0932) + 1, (screenH * 0.9333) + 1, (screenW * 0.2156) + 1, (screenH * 0.9907) + 1, tocolor(0, 0, 0, 255), 1.10, "sans", "center", "center", false, false, false, false, false) dxDrawText(""..NumNoti.." Notificaciones", screenW * 0.0932, screenH * 0.9333, screenW * 0.2156, screenH * 0.9907, tocolor(255, 255, 255, 255), 1.10, "sans", "center", "center", false, false, false, false, false) end local cantidadnew = getElementData(localPlayer, "NotificacionNews") if cantidadnew == 0 then guiSetVisible(notificacion1, false) end if cantidadnew >= 1 and cantidadnew <= 100 then guiSetVisible(notificacion1, true) end end ) ERROR: PANEL\C_Panel.lua:647 attemp to compare number with bolean ----Helps Please 2 Link to comment
Slim Posted December 26, 2017 Share Posted December 26, 2017 (edited) Quote onClientRender Clientside event This event is triggered every time GTA renders a new frame. It is required for the DirectX drawing functions, and also useful for other clientside operations that have to be applied repeatedly with very short time differences between them. Probably not efficient for what you're trying to do. But I'm not much of a scripter. Edited December 26, 2017 by Justin|X5| 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