-
Posts
321 -
Joined
-
Last visited
Everything posted by Flipi
-
así? local Color = "#0080FF" dxDrawText(get(Color)..theText, theText, leftB, topB, left, top, tocolor(255,255,255,255), 3, "default-bold", "left", "top", false, true, true,true) end
-
Los códigos de color comienzan con un '#'. si le puse el "#" al código, pero aún así no pasa nada..
-
funciona, pero al cambiar el color del setting no pasa nada, solo se mantiene el color por defecto. alguna idea?
-
would have to create a client?, because this is server-side.
-
funciona, pero al cambiar el color del setting no pasa nada, solo se mantiene el color por defecto.
-
no me funciona (server-side no tiene nada que ver cierto?) Client... local sx, sy = guiGetScreenSize() local sx = sx / 2 local sy = sy / 2 function drawText() local width = dxGetTextWidth(theText, 3, "default") local height = dxGetFontHeight(3, "default") local leftB = sx - width / 2 local topB = sy - (height + 5) local left = sx - width / 2 local top = sy - height local Color = 0080FF dxDrawText(theText, leftB+2, topB+2, left, top, tocolor(0, 0, 0, 255), 3, "default-bold", "left", "top", false, true, true) dxDrawText(Color..theText, theText, leftB, topB, left, top, tocolor(255,255,255,255), 3, "default-bold", "left", "top", false, true, true,true) end draw = false function drawShout(text) if not draw then theText = text addEventHandler("onClientRender", root, drawText) draw = true setTimer(function() draw = false removeEventHandler("onClientRender", root, drawText) end, 5000, 1) end end addEvent("onShouts", true) addEventHandler("onShouts", root, drawShout) meta setting... name="*Colortexto" value="#0080FF" />
-
but that's with outputchatbox?
-
+ dxDrawText need event onClientRender. + A mess here: local text = source, "#FFFFFF" ..join.. " #0080FFis logged!" but, then how can it be?... is server-side
-
ERROR: resource\resource.lua:4: attempt to call global 'tocolor' (a nil value)
-
algo asi? local Color = 0080FF dxDrawText(theText, leftB+2, topB+2, left, top, tocolor(0, 0, 0, 255), 3, "default-bold", "left", "top", false, true, true) dxDrawText(..Color, theText, leftB, topB, left, top, tocolor(255,255,255,255), 3, "default-bold", "left", "top", false, true, true,true)
-
whats is the problem ? I throws an error function player () local join = getPlayerName ( source ) local text = source, "#FFFFFF" ..join.. " #0080FFis logged!" dxDrawText( text, 25,166.09, screenWidth, screenHeight, tocolor(0,0,0), 1.2, "default-bold","left") dxDrawText( text, 24,166.09, screenWidth, screenHeight, tocolor(0,128,255), 1.2, "default-bold","left") end addEventHandler ( "onPlayerLogin", getRootElement(), player )
-
Hola, como puedo hacer un setting que cumpla la función de cambiar el color del texto para un shout de admin.... (nunca eh realizado un script con setting) Client.... local sx, sy = guiGetScreenSize() local sx = sx / 2 local sy = sy / 2 function drawText() local width = dxGetTextWidth(theText, 3, "default") local height = dxGetFontHeight(3, "default") local leftB = sx - width / 2 local topB = sy - (height + 5) local left = sx - width / 2 local top = sy - height dxDrawText(theText, leftB+2, topB+2, left, top, tocolor(0, 0, 0, 255), 3, "default-bold", "left", "top", false, true, true) dxDrawText(theText, leftB, topB, left, top, [[EN ESTA PARTE?]], 3, "default-bold", "left", "top", false, true, true) end draw = false function drawShout(text) if not draw then theText = text addEventHandler("onClientRender", root, drawText) draw = true setTimer(function() draw = false removeEventHandler("onClientRender", root, drawText) end, 5000, 1) end end addEvent("onShouts", true) addEventHandler("onShouts", root, drawShout) Meta.... name="*Colortexto" value="#0080FF" />
-
I know what that means, just I never make a script with setting...... you understand?
-
give me an example of how it should be?
-
but local r,g,b or function RGBColor? help me, it's my first script with setting u.u
-
In this way can it be?? local sx, sy = guiGetScreenSize() local sx = sx / 2 local sy = sy / 2 function drawText() local r,g,b = tocolor(0,128,255) local width = dxGetTextWidth(theText, 3, "default") local height = dxGetFontHeight(3, "default") local leftB = sx - width / 2 local topB = sy - (height + 5) local left = sx - width / 2 local top = sy - height dxDrawText(theText, leftB+2, topB+2, left, top, tocolor(0, 0, 0, 255), 3, "default-bold", "left", "top", false, true, true) dxDrawText(theText, leftB, topB, left, top, RGBColor(r,g,b), 3, "default-bold", "left", "top", false, true, true) end draw = false function drawShout(text) if not draw then theText = text addEventHandler("onClientRender", root, drawText) draw = true setTimer(function() draw = false removeEventHandler("onClientRender", root, drawText) end, 5000, 1) end end addEvent("onShouts", true) addEventHandler("onShouts", root, drawShout) function RGBColor(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return end
-
I want to able change the text color shout through the setting of resources. (is server-side) any help??
-
yes, you understand what I mean?
-
Hi, How I can do to make the text color can be changed with setting? this is a shout admin.... Script.... local sx, sy = guiGetScreenSize() local sx = sx / 2 local sy = sy / 2 function drawText() local r,g,b = (0,128,255) local width = dxGetTextWidth(theText, 3, "default") local height = dxGetFontHeight(3, "default") local leftB = sx - width / 2 local topB = sy - (height + 5) local left = sx - width / 2 local top = sy - height dxDrawText(theText, leftB+2, topB+2, left, top, tocolor(0, 0, 0, 255), 3, "default-bold", "left", "top", false, true, true) dxDrawText(theText, leftB, topB, left, top, RGBColor(r,g,b), 3, "default-bold", "left", "top", false, true, true) end draw = false function drawShout(text) if not draw then theText = text addEventHandler("onClientRender", root, drawText) draw = true setTimer(function() draw = false removeEventHandler("onClientRender", root, drawText) end, 5000, 1) end end addEvent("onShouts", true) addEventHandler("onShouts", root, drawShout) function RGBColor(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return end Meta setting.... name="*Color de texto" value="#0080FF" />
-
the problem is that now appears twice image: http://img96.imageshack.us/img96/1648/84ke.png