Jump to content

Araa

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by Araa

  1. Araa

    unas cosas

    1. outputChatBox ( "#FF0000Hello #00FF00World", getRootElement(), 255, 255, 255, true ) Para usar los codigos HEX, pones true en el ultimo argumento. outputChatBox ( "Hello World", getRootElement(), 255, 0, 0 ) Para usar RGB, este por ejemplo lo hace rojo.
  2. Ah, perfecto muchas gracias. Cuando ejecutas el comando comienza el tick count y se termina cuando lo ejecutas de nuevo, verdad?
  3. Bueno, asi como dice el titulo, les queria preguntar como podria hacer que el jugador solo pueda ejecutar el comando una vez cada diez minutos, y usar getTickCount para esto. function fianza (jugador, comando) if getPlayerWantedLevel(jugador) == 1 then setPlayerWantedLevel (jugador, 0) else outputChatBox ("Solo puedes pagar fianza si tienes una estrella", jugador) end end addCommandHandler ("fianza", fianza) Gracias (:
  4. Si lo haces por separado si, agregale un evento a la funcion de curar, y triggealo en este ^ para que haci cancele el daño y cure. Porque sino no va a hacer nada
  5. function curar (attacker, attackerweapon, bodypart, loss) vida = getElementHealth (source) if (attackerweapon == 41) and (loss > 1) and ( vida < 99 ) then setElementHealth ( source, vida+15 ) end end addEventHandler ("onPlayerDamage", getRootElement(), curar ) Eso.. creo
  6. math.floor , works perfectly.. I'll give you an example. local speed = (sx^2 + sy^2 + sz^2)^(0.5) local kmh = math.floor(speed*180) If the speed is 150.4561324841 Kph, it will only show 150 Kph.
  7. dxDrawText ( toDraw, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) dxDrawText ( toDraw, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) en esa parte.. le cambias las coordenadas.
  8. Araa

    Ayuda :/

    Perdon si estoy haciendo muchas preguntas, pero en fin... Aca tengo un problema, con el script de medico. Este al disparar con el spray cura al otro, pero a la vez lo lastima un poco y hace que se retuersa por el pray en los ojos ._. Si alguien me ayuda a arreglarlo les agradezco function healing (attacker, attackerweapon, bodypart, loss) health = getElementHealth (source) if not skin[getElementModel(attacker)] then return end else if (attackerweapon == 41) and (loss > 1) and ( health < 95 ) then setElementHealth ( source, health+15 ) givePlayerMoney (attacker, 1.7*health) takePlayerMoney (source, 1.9*health) end end end addEventHandler ("onPlayerDamage", getRootElement(), healing ) Gracias
  9. Esto. https://wiki.multitheftauto.com/wiki/DxDrawText
  10. Araa

    Resoluciones?

    Bueno, no era ahi pero quedo mejor Ademas ya entendi como funciona, muchas gracias.
  11. Araa

    Resoluciones?

    Bueno, esto me servira mucho en el futuro y agradeceria mucho si me pudieran ayudar. Aqui cree un texto y me gustaria que se mostrara el la parte inferior de la pantalla, justo arriba de donde dice MTA:SA 1.3, pero que se vea en cualquier resolucion, ya que lo he hecho manualmente y se pierde cuando cambio a una menor resolucion local screenWidth, screenHeight = guiGetScreenSize ( ) function createText ( ) dxDrawText ( "United Gamers Community", duda, screenHeight - 37, screenWidth, duda, tocolor ( 50, 50, 50, 250 ), 1, "arial" ) end Gracias desde ya.
  12. Capaz pusiste un espacio en el nombre del resource (mapa), o algun caracter no permitido.
  13. Araa

    Entire value?

    Woah, got it, thanks. /lock please
  14. Araa

    Entire value?

    Well, this might sound noob but.. I would like to know how to show ONLY the entire value in this script. function vehiclestatus ( ) local car = getPedOccupiedVehicle (localPlayer) local sx, sy, sz = getElementVelocity (car) local speed = (sx^2 + sy^2 + sz^2)^(0.5) local kmh = speed*180 local health = getElementHealth (car) local currenthealth = health/10 dxDrawText ( "Speed: "..tostring(kmh).."Kph", 1000, screenHeight - 37, screenWidth, screenHeight, tocolor ( 220, 220, 220, 200 ), 1.5, "default" ) dxDrawText ( "Health: "..tostring(currenthealth).."%", 1000, screenHeight - 55, screenWidth, screenHeight, tocolor ( 220, 220, 220, 200 ), 1.5, "default" ) end function HandleTheRender ( ) addEventHandler ( "onClientRender", root, vehiclestatus ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRender ) E.g: If the health is in 86.11585335685 % I would like to make it show ONLY 86% Thanks since now
×
×
  • Create New...