Jump to content

MaurO^

Members
  • Posts

    45
  • Joined

  • Last visited

About MaurO^

  • Birthday 08/12/1999

Details

  • Gang
    Scripting MTA:SA

Recent Profile Visitors

1,570 profile views

MaurO^'s Achievements

Rat

Rat (9/54)

3

Reputation

  1. MaurO^

    Help DxText

    thank you, it worked
  2. MaurO^

    Help DxText

    Hello, I have my messaging system that at the moment of appearing this same begins to disappear with a fading of 5 seconds, my problem is that when this message is disappearing and another appears, both are with an alpha of 255, and disappear at the Same time, how do I solve this? https://imgur.com/PQad4jb https://imgur.com/tkrEe2j https://imgur.com/HsVn6gg Client.lua: local sx, sy = guiGetScreenSize() Messages = {} function getProgress( addtick ) local now = getTickCount() local elapsedTime = now - tick local duration = tick+addtick - tick local progress = elapsedTime / duration return progress end function createMessage(texto, r, g, b) if texto and type(texto) == "string" and string.len(texto) > 1 then tick = getTickCount() local tableMessages = {texto, r, g, b} table.insert(Messages, tableMessages) if(#Messages == 1) then addEventHandler("onClientRender", getRootElement(), dxText) end end end addEvent("onCreateTextMessage", true) addEventHandler("onCreateTextMessage", getRootElement(), createMessage) function dxText() for i,v in ipairs(Messages) do if(i >= 6) then return end local alp = interpolateBetween(255, 0, 0, 0, 0, 0, getProgress(5000), "Linear") dxDrawOutlinedText(tocolor(0, 0, 0, alp), ""..v[1], sx*(3/1024), sy*(310/768) + i*25, sx*(478/1024), sy*(329/768), tocolor(v[2], v[3], v[4], alp), 1.00, "default-bold", "left", "top", false, false, false, false, false) if alp < 20 then table.remove(Messages, i) end end end function dxDrawOutlinedText(outlineColour, theText, posX, posY, sizeX, sizeY, fillColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos) dxDrawText(theText, posX+1, posY+1, sizeX+1, sizeY+1, outlineColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos); dxDrawText(theText, posX+1, posY-1, sizeX+1, sizeY-1, outlineColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos); dxDrawText(theText, posX-1, posY+1, sizeX-1, sizeY+1, outlineColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos); dxDrawText(theText, posX-1, posY-1, sizeX-1, sizeY-1, outlineColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos); dxDrawText(theText, posX, posY, sizeX, sizeY, fillColour, textSize, theFont, horizontalAlign, verticalAlign, clippingBool, wordBreaking, postGUI, colourCoded, pixelPos); end
  3. Is there any way to run my resources on my friend's server? Without having to share the files? some way of working as a team
  4. Tengo un problema cargando la animación personalizada, cuando escribo /anim dance1 la animación no comienza, si lo hago solo desde el lado del cliente, sin usar triggers esto si funciona ¿Es posible que no se pueda usar con triggers? Client.lua: local name = "bailes_fornite" local IFP = engineLoadIFP( "bailes.ifp", name) if not IFP then outputChatBox( "Fallo al cargar el archivo 'bailes.ifp'" ) end function setAnimation(_, animationName) if IFP then --setPedAnimation(localPlayer, name, anim ) triggerServerEvent("onAnim", localPlayer, name, animationName) end end addCommandHandler("anim", setAnimation) Server.lua: function animar(name, animationName) setPedAnimation(source, name, animationName) end addEvent("onAnim", true) addEventHandler("onAnim", root, animar)
  5. I have a problem loading the custom animation, when I write / anim dance1 the animation does not start, if I do it only from the client side it works. Is it possible to do this with triggers? Cliente.lua: local name = "bailes_fornite" local IFP = engineLoadIFP( "bailes.ifp", name) if not IFP then outputChatBox( "Fallo al cargar el archivo 'bailes.ifp'" ) end function setAnimation(_, animationName) if IFP then --setPedAnimation(localPlayer, name, anim ) triggerServerEvent("onAnim", localPlayer, name, animationName) end end addCommandHandler("anim", setAnimation) Server.lua: function animar(name, animationName) setPedAnimation(source, name, animationName) end addEvent("onAnim", true) addEventHandler("onAnim", root, animar)
  6. what I want is to draw something around that area for example: https://imgur.com/a/Ccsp2Ps
  7. I created a radar area that shrinks type pubg but I do not know how to show the drawing that highlights the area, what is the function that I should use for that? Thank you.
  8. Hola, podrias crear una condición para que directamente tu no aparezcas en dicha gridlist aca de dejo un ejemplo: for i, players in ipairs(getElementsByType("player")) do if(players ~= localPlayer) then row = guiGridListAddRow( gridlist ) --guiGridListSetItemText(...) end end
  9. MaurO^

    help

    thanks, it worked for me
  10. MaurO^

    help

    Hello, how can I detect when a player loses or receives money? I want to create a dxRectangle that appears when a player loses or recives money
  11. objects = { {1264, -2168.7001953125,1879.7998046875,-69.199996948242}, {926, -2198.599609375,1853.400390625,-57.599998474121}, {1356, -2156.6796875,1838.1103515625,-65.067947387695} } function createRandomObject() if isElement(object) then destroyElement(object) end if isElement(blip) then destroyElement(blip) end randomObject = math.random(#objects) id, x, y, z = unpack(objects[randomObject]) object = createObject(id, x, y, z) blip = createBlipAttachedTo(object, 0) end addCommandHandler("create", createRandomObject) with this example, write /create will create a random object.
  12. MaurO^

    Timer

    htt marker = createMarker(1.00, 1.00, 1.00, "cylinder", 0, 0, 0, 0, 0) time = 0 function teleport(player) local x, y, z = getElementPosition(player) local rotZ = getElementRotation ( player ) local aa = {} if getTickCount() - time >= 30000 then -- 30 seg if (source == marker and getElementType(player) == "player") then setElementPosition(player, 1.00, 1.00, 1.00) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) time = getTickCount() end else outputChatBox("You must wait 30 seconds to use this.", player, 255, 0, 0) end end addEventHandler("onMarkerHit", root, teleport)
  13. function ccv (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then setTimer(function() ve1 = createVehicle ( 535, -2220.98706, -129.69173, 35.32031 ) ma1 = createMarker ( -2221.09668, -129.61031, 33.88103, "cylinder", 7.5, 255, 255, 0, 5 ) addEventHandler( "onMarkerHit", ma1, marker1) end, 1000, 1) end end addCommandHandler("ccvp", ccv) function marker1( hitElement ) if(getElementType(hitElement) == "player") then if isElement(ve1) then destroyElement(ve1) end if isElement(ma1) then destroyElement(ma1) end end end try this.
  14. MaurO^

    Help me

    7/5000 Thank you Sugerir un cambio Thank you!
×
×
  • Create New...