Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. I don't know if you are just kidding here, but this isn't even worth five bucks.
  2. Castillo

    Bot Problem

    if (source == botTable[Girl]) then Where is 'Girl' defined? Also, try adding this before addEventHandler: addEvent ( "onBotWasted", true )
  3. The problem seems to be with triggerEvent, this code worked for me: addEventHandler ( "onPlayerDamage", getRootElement(), function ( attacker, weapon, bodypart, loss ) if ( bodypart == 9 and weapon == 34 ) then killPed ( source, attacker, weapon, bodypart ) end end )
  4. Are you sure you copied it right? and that you don't have another script causing it?
  5. local lastDamaged = 0 -- Define variable with default value '0' addEventHandler ( "onClientPlayerDamage", localPlayer, function ( ) lastDamaged = getTickCount ( ) -- Update the variable using getTickCount, which returns an integer containing the number of milliseconds since the system the server is running on started. end ) setTimer ( function ( ) if ( ( getTickCount ( ) - lastDamaged ) >= 5000 ) then -- If 5 seconds passed since last time the player got damaged.. setElementHealth ( localPlayer, ( getElementHealth ( localPlayer ) + 15 ) ) -- Increase the player health by 15% end end ,5000, 0 )
  6. addEvent "onPlayerHeadshot" addEventHandler ( "onPlayerDamage", getRootElement(), function ( attacker, weapon, bodypart, loss ) if ( bodypart == 9 and weapon == 34 ) then -- If the bodypart is the head and the weapon is the sniper.. local result = triggerEvent ( "onPlayerHeadshot", source, attacker, weapon, loss ) if ( result == true ) then killPed ( source, attacker, weapon, bodypart ) end end end )
  7. I added you on skype, if it's not too hard, I do it for free. Edit: Forget it, I been told you're using a pirated version of DayZ.
  8. Pero con está animación no podes caminar.
  9. Castillo

    I need help

    For what I can see, you are mixing client and server side functions, that will never work.
  10. Castillo

    help

    That's because you put it to only draw one of them depending on the speed. local sw, sh = guiGetScreenSize ( ) function reddotTest ( ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then local speedx, speedy, speedz = getElementVelocity ( theVehicle ) local actualspeed = ( speedx ^ 2 + speedy ^ 2 + speedz ^ 2 ) ^ ( 0.5 ) local kmh = ( actualspeed * 180 ) dxDrawImage ( sw / 2, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.80, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.60, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.40, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.20, sh / 2, 32, 32, "files/blackdot.png" ) --dxDrawImage(sw/2,sh/2,32,32,"files/reddot.png") dxDrawText ( math.floor ( kmh + 0.5 ) .. " km/h", sw / 2, sh / 1.80, sw / 2, sh / 1.80, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) if ( kmh > 50 ) then dxDrawImage ( sw / 2, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "50 or more" ) end if ( kmh >= 100 ) then dxDrawImage ( sw / 1.80, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "100 or more" ) end if ( kmh >= 150 ) then dxDrawImage ( sw / 1.60, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "150 or more" ) end if ( kmh >= 200 ) then dxDrawImage ( sw / 1.40, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "200 or more" ) end if ( kmh >= 250 ) then dxDrawImage ( sw / 1.20, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "250 or more" ) end end end Try it.
  11. Castillo

    help

    You mean that when you are going 100 KMH/MPH, it should draw the image from 50 KMH/MPH aswell?
  12. You have a problem with the ACL.xml, post it here.
  13. You could define a variable which would contain the last time you got damaged. You can do this using onClientPlayerDamage and getTickCount.
  14. Estas seguro? intente poner una animacion y luego usar setControlState para que camine y no funciona.
  15. Yo lo probe y no me da ningun error.
  16. 1: Si no me equivoco, no hay manera. 2: No se pueden poner animaciones personalizadas.
  17. Tenes que crear tu propia funcion de getPlayerFromName. https://wiki.multitheftauto.com/wiki/Ge ... omNamePart Proba esa, acordate de copiar el codigo de la fucion, ya que no es nativa del MTA.
  18. We don't give support with leaked scripts. Topic locked.
  19. I think you didn't really understand what is this about. Is not a resource, is the implementation of browser functions into MTA.
×
×
  • Create New...