-
Posts
80 -
Joined
-
Last visited
Everything posted by #DaMiAnO
-
Working, thanks! Topic can be closed.
-
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)
-
Topic can be closed. Thanks Orange!
-
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.
-
Ye, when I'll have 10 HP or less,I want stop the sound.
-
For example, I had 5 HP. When sound is gone, It isn't repeated.
-
Oh thanks, but Can be done so, that the sound will be repeated, until death player?
-
Can be done even as so, That when I lose more of 10 HP, it will not sound to me play 2 times?
-
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?
-
For everyone, but i have that and it only hide radio station name, default radio is working.
-
Hi! I want disable default San Andreas radio. How to do, may be a function?
-
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).
-
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.
-
Hi! When i Connect to my localhost server, i have seen lots of errors, with download custom sounds. How to fix that ?
-
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 )
