Jump to content

#DaMiAnO

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by #DaMiAnO

  1. Working, thanks! Topic can be closed.
  2. Hi, i have this code, but not working. /debugscript 3 show no errors and warnings. local screenWidth, screenHeight = guiGetScreenSize() function repairVehicle() local theVehicle = getPedOccupiedVehicle(source) if(theVehicle) then fixVehicle(theVehicle) repair = dxDrawText("Pojazd zostal naprawiony! (Koszt: $2500)", screenWidth*0.5, screenHeight*0.1, screenWidth*0.5, screenHeight*0.5, tocolor(255,0,0,210), 1.0, "bankgothic", "center", "center", false, false, false) setTimer(RemoveDrawText, 3000, 1, repair) else repair2 = dxDrawText("Musisz znajdowac sie w pojezdzie!", screenWidth*0.5, screenHeight*0.1, screenWidth*0.5, screenHeight*0.5, tocolor(255,0,0,210), 1.0, "bankgothic", "center", "center", false, false, false) setTimer(RemoveDrawText, 3000, 1, repair2) end end function RemoveDrawText(repair, repair2) destroyElement(repair) destroyElement(repair2) end function bindKeyForRepair(source) bindKey(source, "2", "down", repairVehicle) end addCommandHandler("repair", bindKeyForRepair)
  3. #DaMiAnO

    Heartbeat

    Topic can be closed. Thanks Orange!
  4. #DaMiAnO

    Heartbeat

    When I have 10 HP or less, I want start the sound (when sound is end, i want repeat this sound until i die), and when I die I want stop the sound. But I have 10 HP or less, sound is ending, and it isn't repeated.
  5. #DaMiAnO

    Heartbeat

    Ye, when I'll have 10 HP or less,I want stop the sound.
  6. #DaMiAnO

    Heartbeat

    For example, I had 5 HP. When sound is gone, It isn't repeated.
  7. #DaMiAnO

    Heartbeat

    Oh thanks, but Can be done so, that the sound will be repeated, until death player?
  8. #DaMiAnO

    Heartbeat

    Can be done even as so, That when I lose more of 10 HP, it will not sound to me play 2 times?
  9. #DaMiAnO

    Heartbeat

    Hi! I have this: function lowHealth() local playerHealth = getElementHealth ( getLocalPlayer() ) if playerHealth <= 10 then local sound = playSound("sounds/heart.mp3") else stopSound( "sounds/heart.mp3" ) end end addEventHandler ( "onPlayerDamage", getRootElement(), lowHealth ) But, when I have less of 10 HP (or equivalent), i can't hear sound. How to fix that?
  10. #DaMiAnO

    Breath

    Hi! Does mta have a functions for get breath (like a: GetPedArmor)?
  11. Thank you. Close topic.
  12. For everyone, but i have that and it only hide radio station name, default radio is working.
  13. Hi! I want disable default San Andreas radio. How to do, may be a function?
  14. When my ped is holding sd pistol in hand, i move camera at the car (not aiming), i will see outputchatbox. I want see outputchatbox when my ped is aiming to car, not when ped see car (with holding sd).
  15. Hi! I have this: function excelToDriver ( target ) if ( target ) then if getElementType(target) == "vehicle" then if getPedWeapon(source) == 23 then speedx, speedy, speedz = getElementVelocity ( target ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = actualspeed * 180 outputChatBox("* Prędkość namierzonego pojazdu wynosi: "..math.floor(tonumber(kmh)).. " KM/h.", getRootElement(), 255, 255, 255, true) end end end end addEventHandler ( "onClientPlayerTarget", getRootElement(), excelToDriver) , but i want target with aiming to vehicle, not when my ped is looking to vehicle when he had sd pistol in hand.
  16. #DaMiAnO

    Tonumber.

    What to use "math.floor"? Wiki doesn't have infs for math.floor.
  17. #DaMiAnO

    Tonumber.

    Hello! I want "cut" the number in "tonumber". I have this code: tonumber(kmh) , but KM/h is displays, for example: 3.444444545488784848. I want only 3.44 KM/h. It's possible to do that?
  18. #DaMiAnO

    Sounds.

    Thanks, I'm fuc*** moron.
  19. #DaMiAnO

    Sounds.

    Hi! When i Connect to my localhost server, i have seen lots of errors, with download custom sounds. How to fix that ?
  20. Working, but when I add that to resource, /me command again can be used. -- Wylaczanie domylnej komendy /me. addEventHandler('onPlayerChat', root, function(message, type) if type == 1 then cancelEvent() end end) -- Wylaczanie mapy spod F11. function disableMap ( ) toggleControl("radar", false) end addEventHandler ( "onClientResourceStart", resourceRoot, disableMap )
×
×
  • Create New...