Jump to content

Search the Community

Showing results for tags 'dxdrawtext'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 14 results

  1. Hello! I ran into some problems while coding: Server: function VoteSystem(title) outputChatBox ("Your Vote Title: " .. title, client) end addEvent("VoteConnection", true) addEventHandler("VoteConnection", resourceRoot, VoteSystem) Client: sx, sy = guiGetScreenSize() ClientGUI = {} function VoteCommand (commandName, ...) local title = table.concat ( { ... }," " ) TextDraw = tostring(title) triggerServerEvent ( "VoteConnection", resourceRoot, tostring(title) ) outputChatBox(title) end addCommandHandler ( "vote", VoteCommand ) --ClientGUI[3] = guiCreateStaticImage( sx*0.03, sy*0.03, sx*0.5, sy*0.5, "/files/BG.png", false ) guiMoveToBack(ClientGUI[3]) addEventHandler("onClientRender", root, function() ClientGUI[2] = dxDrawRectangle(sx*0.2, sy*0.3, sx*0.6, sy*0.5, tocolor(0,0,0,150)) ClientGUI[1] = dxDrawText(TextDraw, sx*0.21, sy*0.31, sx, sy, tocolor(255,0,0,255), 2) end) After running the code and entering /debugscript 3, the following error appears: WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x213] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x214] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x215] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x213] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x212] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x79] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x71] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] [DUP x87] WARNING: vote\votes_c.lua:17: Bad argument @'dxDrawText' [Expected string at argument 1, got nil] But the code works and by writing /vote [text], the text [text] is entered into dxDrawText How do I fix the error? The second problem: In the client file: sx, sy = guiGetScreenSize() ClientGUI = {} --General function VoteCommand (commandName, ...) local title = table.concat ( { ... }," " ) TextDraw = tostring(title) triggerServerEvent ( "VoteConnection", resourceRoot, tostring(title) ) outputChatBox(title) end addCommandHandler ( "vote", VoteCommand ) ClientGUI[3] = guiCreateStaticImage( sx*0.03, sy*0.03, sx*0.5, sy*0.5, "/files/BG.png", false ) -- Image Background guiMoveToBack(ClientGUI[3]) addEventHandler("onClientRender", root, function() ClientGUI[2] = dxDrawRectangle(sx*0.2, sy*0.3, sx*0.6, sy*0.5, tocolor(0,0,0,150)) ClientGUI[1] = dxDrawText(TextDraw, sx*0.21, sy*0.31, sx, sy, tocolor(255,0,0,255), 2) -- Title end) --General ENDho How do I put " ClientGUI[3] = guiCreateStaticImage( sx*0.03, sy*0.03, sx*0.5, sy*0.5, "/files/BG.png", false )" under "ClientGUI[1] = dxDrawText(TextDraw, sx*0.21, sy*0.31, sx, sy, tocolor(255,0,0,255), 2)" ?
  2. local isWindowShowing = false --عشان نعرف الزر ظاهر او لا false متغير بالقيمة local screenW, screenH = guiGetScreenSize() --ذي عشان تجيب احدثيات شاشتك function renderDx() dxDrawRectangle(screenW * 0.2844, screenH * 0.4644, screenW * 0.0919, screenH * 0.0378, tocolor(0, 0, 0, 100), false) --مربع علي شكل زر dxDrawText("تجربة", screenW * 0.2844, screenH * 0.4644, screenW * 0.3762, screenH * 0.5022, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) --داخل المربع كلام end --نقفل الفنكشن function onKey() if isWindowShowing == false then --بمعنى الزر حالياً مخفي false لو المتغير قيمته showCursor(true) --اظهار الماوس isWindowShowing = true --بمعنى الزر ظاهر حالياً true نعطي المتغير قيمه addEventHandler("onClientRender", getRootElement(), renderDx) --نظهر الزر الآن elseif isWindowShowing == true then --بمعنى الزر ظاهر حالياً true لو المتغير قيمته showCursor(false) --نخفى الماوس isWindowShowing = false --بمعنى الزر انحذف الآن false نعطى المتغير قيمه removeEventHandler("onClientRender", getRootElement(), renderDx) --نحذف الزر الآن end --نقفل التحقق end --نقفل الفنكشن bindKey("F9", "down", onKey) --ذا ايفنت من اللعبة انه لما يضغط اف 9 يحصل شئ --// لما يضغط على المربع (الزر) function onClick(theButton, theState) --بين القوسين أحدثيات الرستنقل (المربع) وليس التيكست (الكلام اللى جوا المربع) isMouseInPosition ملاحظه: بتحط تحت فالكود if theButton == "left" and theState == "down" and isWindowShowing == true and isMouseInPosition(screenW * 0.2844, screenH * 0.4644, screenW * 0.0919, screenH * 0.0378) then --لو ضغط كلك يسار فى الماوس واللوحة ظاهره حالياً (بنعرف عن طريق المتغير) والماوس على المربع اللي هو الزر (بنعرف عن طريق احدثيات الشاشة) outputChatBox("تجربة") --نظهر فى الشات تجربة end --نقفل التحقق end --نقفل الفنكشن addEventHandler("onClientClick", getRootElement(), onClick) --ذا ايفنت من اللعبة ان لما الاعب يضغط بالماوس علي الشاشة --// ذا كود جاهز يتحقق من احدثيات الشاشة عشان لما نضغط على المربع (الزر) function isMouseInPosition(x, y, width, height) if not isCursorShowing() then return false end local sx, sy = guiGetScreenSize() local cx, cy = getCursorPosition() local cx, cy = cx * sx, cy * sy if (cx >= x and cx <= x + width) and (cy >= y and cy <= y + height) then return true else return false end end اتمنى الشرح واضح وبسيط للناس الجدد فى برمجة اللغة، يمكنك ايضاً تغيير اظهار فى الشات تجربة إلى اشياء اخرى كثيرة https://wiki.multitheftauto.com/wiki/Main_Page :يمكنك الاطلاع على جميع الفنكشنات حق اللعبة من هنا
  3. Olá senhores, eu gostaria de saber como eu posso criar um texto em cima de um marcador, pesquisei mas nao achei nenhum do tipo que eu queria. Tipo desta imagem. Obrigado a quem puder me ajudar.
  4. Estou usando onClientRender para aparecer um dxDrawText em meu painel , pois ele mostra um valor do server-side. Com isto , ao abrir o painel , esse texto não para de piscar(trazendo o valor varias vezes), mas se eu usar addCommandHandler ele aparece apenas um vez. Gostaria de manter o texto em meu painel , apenas removendo ele ao utilizar removeEventHandler para fechar o painel.
  5. Bom dia! Tô com esse problema de não aparecer os escritos dos layouts, estava fazendo testes e encontrei algo sobre "DxCreateFont" ao tentar criar a fonte, e o meu pode estar dando falhas e por isso algumas DX não aparecem... Alguém já passou por isso? Este problema é em todos servidores que tento jogar e tenha que baixa/criar alguma fonte! (o que eu notei) Segundo a wiki, diz que pode ser problema de alguma limitação de hardware ou memoria. Quando um servidor utiliza DxCreateFont para criar uma nova fonte em um painel, e acaba que o PC não carrega essa fonte, e por este motivo acaba não aparecendo dxDrawText que utilizam esta nova fonte, porquê da erro ao carregar... Alguma solução pra isso? https://ibb.co/qmrGvQB https://ibb.co/2q7BBPM
  6. Sooo, how can I use (I think for you well known) dxDrawTextOnElement() (client-side function, MTA Wiki site: [click]) in server-side scripts? I tried to export, plus this code: addEventHandler("onPlayerChat", resourceRoot, function(message, type_) if(type_ == 0) then call(resourceRoot, "dxDrawTextOnElement", source, message, 1, 20, 255, 255, 255, 255, 1, "default-bold") end end) (export in meta.xml for proof): <meta> <info author="VaporZ" name="VaporZ's utility [PL]" description="(desc)" type="script" version="1.0.1"/> <script src="cars.Lua" type="server"/> <script src="bank.Lua" type="server"/> <script src="utility.Lua" type="server"/> <script src="utility-c.Lua" type="client"/> <script src="testy.Lua" type="server"/> <file src="bank/accounts.xml"/> <file src="bank/atms.xml"/> <file src="cars/saved.xml"/> <file src="cars/shops.xml"/> <export function="dxDrawTextOnElement" type="client"/> </meta> But this don't work. Any ideas? Okay, I got further, but still it's not good. Look at this one (console error): ERROR: systems\utility.Lua:108: call: failed to call 'systems:dxDrawTextOnElement'
  7. Galera, estou aprendendo a fazer scripts, e editei um script que achei na Internet de uma forma que ele pudesse ter quantos markers eu quisesse, no caso de um trabalho, porém, gostaria de saber se existe alguma forma de eu deixa-lo mais otimizado, usando loops ou algo do tipo, eu evitaria de ter que escrever quase a mesma coisa para cada Marker? Eu estou querendo fazer um trabalho de Sedex, e peguei de outro script que eu achei, uma barra que carrega na tela, então usei setElementFrozen para congelar o veículo, então a barrinha aparece e carrega, quando ela termina de carregar, o veículo é descongelado, até ai tudo bem, porém, estou usando um script que faz com que uma mensagem apareça no topo da tela, "Parabéns, você entregou uma encomenda (1/10), então tentei fazer com que primeiro aparecesse "Entregando encomenda", e após os 5 segundos do setElementFrozen, aparecesse a mensagem que entregou. Mas não estou conseguindo fazer. Então tentei fazer junto a barra de carregamento, para aparecer o ENTREGANDO ENCOMENDA, mas também não consegui. Vou deixar apenas os 2 primeiros markers, para vocês verem sobre o que eu falei de Loops, se há alguma forma de utilizar nesse código, peço desculpas se estiver mal identado, ainda sou iniciante em programação. Peço que ninguém pegue esses códigos para si, pois é um script que editei totalmente para o meu servidor, e não ficaria feliz se fosse roubado!!! ----------------------- Server-Side ----------------------- --Markers Minicio = createMarker (1222.713, -1799.09, 16.555 -1, "cylinder", 1.5, 255 ,255 ,0, 130) mk01 = createMarker ( 1261.461, -1831.496, 13.385 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk02 = createMarker ( 1426.6989746094,-961.05804443359,36.34884262085 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk03 = createMarker ( 2175.4973144531,1122.1480712891,12.679032325745 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk04 = createMarker ( 2079.6228027344,1444.5053710938,10.8203125 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk05 = createMarker ( 2170.8229980469,1678.8610839844,10.8203125 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk06 = createMarker ( 2102.5812988281,2217.4921875,10.8203125 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk07 = createMarker ( 2031.4614257813,1923.1041259766,12.294158935547 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk08 = createMarker ( 1697.4500732422,1451.1950683594,10.763988494873 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk09 = createMarker ( 1561.4448242188,1078.6629638672,10.8203125 -1, "checkpoint", 3, 255 ,255 ,0, 130) mk10 = createMarker ( 954.54888916016,-922.796875,44.080444335938 -1, "checkpoint", 3, 255 ,255 ,0, 130) --1066.3614501953,-1341.8918457031,13.3828125 -1 --Blips Attached Binicio = createBlipAttachedTo (Minicio, 42) B01 = createBlipAttachedTo ( mk01, 19 ) B02 = createBlipAttachedTo ( mk02, 19 ) B03 = createBlipAttachedTo (mk03, 19) B04 = createBlipAttachedTo (mk04, 19) B05 = createBlipAttachedTo (mk05, 19) B06 = createBlipAttachedTo (mk06, 19) B07 = createBlipAttachedTo (mk07, 19) B08 = createBlipAttachedTo (mk08, 19) B09 = createBlipAttachedTo (mk09, 19) B10 = createBlipAttachedTo ( mk10, 19 ) --Markers Visibilidade setElementVisibleTo (Minicio, root, true) setElementVisibleTo (mk01, root, false) setElementVisibleTo (mk02, root, false) setElementVisibleTo (mk03, root, false) setElementVisibleTo (mk04, root, false) setElementVisibleTo (mk05, root, false) setElementVisibleTo (mk06, root, false) setElementVisibleTo (mk07, root, false) setElementVisibleTo (mk08, root, false) setElementVisibleTo (mk09, root, false) setElementVisibleTo (mk10, root, false) --Blips Visibilidade setElementVisibleTo (Binicio, root, false) setElementVisibleTo (B01, root, false) setElementVisibleTo (B02, root, false) setElementVisibleTo (B03, root, false) setElementVisibleTo (B04, root, false) setElementVisibleTo (B05, root, false) setElementVisibleTo (B06, root, false) setElementVisibleTo (B07, root, false) setElementVisibleTo (B08, root, false) setElementVisibleTo (B09, root, false) setElementVisibleTo (B10, root, false) veh = {} function inicio (source) if isElementWithinMarker(source, Minicio) and veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) veh[source] = createVehicle(413, 1239.748, -1829.575, 13.404, -0, 0, 274.52) warpPedIntoVehicle ( source, veh[source] ) setCameraTarget (source) setElementData ( source, "inicio", true ) --Aqui ele torna a Data Inicio verdadeira, registrando que o player passou pela marker inicio. setElementVisibleTo ( B01, source, true ) --Torna visivel o Blip 1 setElementVisibleTo ( mk01, source, true) --Torna visivel o Marker 1 exports.Scripts_Dxmessages:outputDx(source, "Entregue as encomendas nos pontos marcados em seu GPS", "info") --outputChatBox ("#ffcc00[ #ffffffSedex #ffcc00] #ffffffEntregue as encomendas nos pontos marcados em seu GPS.",source,0,0,0,true ) end addEventHandler( "onMarkerHit", Minicio, inicio ) function mk1 (source) if isElementWithinMarker(source, mk01) and veh[source] and isElement(veh[source]) then --Checa se o elemento que está na marker 1 é o source, com o veículo source. if getElementData(source, "inicio", true) then --Ele verifica se o jogador passou pela Marker para iniciar o serviço, antes de poder pegar a Marker 1 setElementFrozen(veh[source], true) --Freeza o veículo. triggerClientEvent(source, "doShowProgressBar", source) --Barra que mostra o processo da entrega da encomenda. givePlayerMoney(source,300) setElementVisibleTo ( B01, source, false ) --Ao pegar o Marker 1, ele torna o Marker 1 invisivel. setElementVisibleTo (mk01, source, false) --Ao pegar o Blip 1, ele torna o Marker 1 invisivel. --outputChatBox("#ffcc00[ #ffffffSedex #ffcc00] #ffffffVocê entregou uma encomenda! #ffcc00(#ffffff01/10#ffcc00)",source,0,0,0,true) setElementVisibleTo ( B02, source, true ) --Aqui ele torna visivel o Marker 2, para o player continuar a entrega. setElementVisibleTo (mk02, source, true) --Aqui ele torna visivel o Blip 2, para o player continuar a entrega. setTimer(setElementFrozen, 5000,1, veh[source], false) --Depois de 5 segundos o veículo é descongelado msg = setTimer(exports.Scripts_Dxmessages:outputDx(source, "Entregando encomenda", "info"), 5000, 1) --Tentativa da mensagem de entregando encomenda if isTimer(msg) == false then exports.Scripts_Dxmessages:outputDx(source, "Você entregou uma encomenda! #ffcc00(#ffffff01/10#ffcc00)", "success") --Aqui era para quando o timer se tornasse falso, ou seja, não existisse mais aparecia a mensagem de entregue. setElementData ( source, "Marker01", true ) --Aqui ele registra que o player passou pela primeira marca. setTimer ( setElementData, 50, 1, source, "inicio", false ) --Aqui ele registra o inicio como false, para o player não poder pegar mais de uma vez a mesma marca. end end end end addEventHandler("onMarkerHit",mk01 ,mk1) --Depois disso, ele repete tudo de novo. function mk2 (source) if isElementWithinMarker(source, mk02) and veh[source] and isElement(veh[source]) then --Checa se o elemento que está na marker 2 é o source, com o veículo source. if getElementData(source, "Marker01", true) then --Checa se passou pela Marker 1, e assim vai... setElementFrozen(veh[source], true) triggerClientEvent(source, "doShowProgressBar", source) givePlayerMoney(source,300) setElementVisibleTo ( B02, source, false ) setElementVisibleTo (mk02, source, false) outputChatBox("#ffcc00[ #ffffffSedex #ffcc00] #ffffffVocê entregou uma encomenda! #ffcc00(#ffffff02/10#ffcc00)",source,0,0,0,true) setElementVisibleTo ( B03, source, true ) setElementVisibleTo (mk03, source, true) setTimer(setElementFrozen, 5000,1, veh[source], false) msg = setTimer(exports.Scripts_Dxmessages:outputDx(source, "Você entregou uma encomenda! #ffcc00(#ffffff01/10#ffcc00)", "success"), 5000, 1) if isTimer(msg) then exports.Scripts_Dxmessages:outputDx(source, "Você entregou uma encomenda! #ffcc00(#ffffff01/10#ffcc00)", "success") setElementData ( source, "Marker02", true ) setTimer ( setElementData, 50, 1, source, "Marker01", false ) end end end end addEventHandler("onMarkerHit",mk02 ,mk2) ----------------------- Client-Side ----------------------- --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==Ajustar Posição da Tela--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- local screenW,screenH = guiGetScreenSize() -- Função de Reposicionar Largura e altura da tela local resW, resH = 1280, 720 local x, y = (resW/screenW),(resH/screenH) -- juntar dois elementos em x, y --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==Ajustar Posição da Tela--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==Barra de Carregamento--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- local tempo, valor = 1000, 4 -- Tempo de carregamento local startTick local pBarCurWidth, pBarWidth = 0, 700 -- largura e altura do dx addEvent("doShowProgressBar", true) -- Ativar um evento personalizado addEventHandler("doShowProgressBar", root, function() startTick = getTickCount() -- Começar contagem if addEventHandler("onClientRender", root, renderDXProgressBar) then -- se executar essa função fara alguma coisa, no caso n tera nada caso queira usar para desbugar script end end ) function renderDXProgressBar() local now = getTickCount() if (now + startTick) >= tempo then -- Aumentar a largura da barra pBarCurWidth = pBarCurWidth + valor startTick = getTickCount() if pBarCurWidth > pBarWidth then -- Barra de progresso cheia pBarCurWidth = pBarWidth pBarCurWidth = 0 removeEventHandler("onClientRender", root, renderDXProgressBar) startTick = nil end end dxDrawRectangle(x*358, y*316, pBarWidth, 30, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*358, y*316, pBarCurWidth, 30, tocolor(255, 255, 0, 200), false) dxDrawText( tostring( math.ceil((pBarCurWidth * 100) / pBarWidth) ).." %", x*358, y*316, (x*358) + pBarWidth, (y*316) + 29, tocolor(255,255,255), 2) dxDrawText("ENTREGANDO ENCOMENDA", x*358, y*316, tocolor(255,255,255,255),2, "roboto") --Onde tentei colocar o texto para aparecer na tela. end --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==Barra de Carregamento--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-
  8. Hello Community! Due to the development of SUI's memobox, I've been asking myself what's the space that wordBreak generates between dxDrawText's lines. So if anyone knows that information, let me know please. Thanks, Simple01.
  9. Helló nekem az lenne a problémám hogy egy dxDrawTextet létrehozok és úgymond a keretén kívülre nyúlik a szöveg, aminek nem igazán kéne megtörténnie van erre valami megoldás? Előre is köszi a segítséget!
  10. Авто находится на серверной части, как прикрепить к нему текст? Знаю что используют эту функцию dxDrawText, но она для клиенской части, помогите разобраться.
  11. Anyone help me ? My code; local minX = 2 tex = dxCreateTexture("texture.png") function test3DGUI() minX = getElementBoundingBox(localPlayer) x,y,z,lx,ly,lz,x2,y2,z2 = getPositionFromElementOffset(minX-1,0,minX+0.5,1) dxDrawMaterialLine3D(x2,y2,z2+0.5,x,y,z+0.5, tex, 1, tocolor(0,0,0,150),lx,ly,lz) dxDrawMaterialLine3D(x2,y2,z2+0.5,x,y,z2+0.32, tex, 1, tocolor(255,0,29,255),lx,ly,lz) local sx,sy = getScreenFromWorldPosition ( x2,y2,z2, 0 ) dxDrawText ( "3D text", sx, sy - 30, sx, sy - 30, tocolor(255,255,255,255), 1, "bankgothic", "center", "bottom", false, false, false ) end addEventHandler("onClientRender", root, test3DGUI) function getPositionFromElementOffset(offX,offY,offX2,offY2) local offZ = -0.5 local m = getElementMatrix ( localPlayer ) local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] local x2 = offX2 * m[1][1] + offY2 * m[2][1] + offZ * m[3][1] + m[4][1] local y2 = offX2 * m[1][2] + offY2 * m[2][2] + offZ * m[3][2] + m[4][2] local z2 = offX2 * m[1][3] + offY2 * m[2][3] + offZ * m[3][3] + m[4][3] offZ = 0.5 local x3 = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y3 = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z3 = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z, x2, y2, z2, x3, y3, z3 end
  12. i want edit the " Vote for next map starts in: 5 " dxtext, but i can not find it in race gamemode lua files. which file included this?
  13. I need some help on: dxDrawText Code: local screenWidth, screenHeight = guiGetScreenSize () local playerRadioChannel = getRadioChannelName(getRadioChannel()) function stationDraw(station) dxDrawText ( playerRadioChannel, screenWidth, screenHeight - 155, screenWidth - 66, screenHeight, tocolor ( 135, 96, 45, 255 ), 1.5, "bankgothic", "right" ) end addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(), stationDraw) I want the text having border, and staying uppercase, how? I do not know. How can I make it stay on screen for a few seconds and then disappear? I think we should use this: setTimer Thanks for everything!
  14. The text appears succesfully but i cant make it disappear:/ Pls help! [lua] function fadeDX() startTick = getTickCount() addEventHandler("onClientRender",root,text) end function text() local currentTick = getTickCount() local progress = (currentTick-startTick)/duration local alpha = interpolateBetween(0,0,0,255,0,0,progress,"InOutQuad") dxDrawText ( "D-Day", x/2.05, y/3, x, y, tocolor(255, 255, 255, alpha), 3) setTimer ( function() startTick = nil,nil removeEventHandler("onClientRender",root,text) local currentTick = getTickCount() local progress = (currentTick+startTick)/duration local alpha = interpolateBetween(0,0,0,255,0,0,progress,"InOutQuad") dxDrawText ( "D-Day", x/2.05, y/3, x, y, tocolor(255, 255, 255, alpha), 3) end, 8000, 1 ) end [/lua]
×
×
  • Create New...