Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: headshot
1. Headshot
Witam posiadam skrypt na headshot (dzwiek) jest on jednak podpisany pod zombie a chcialbym aby bylo to na graczy :/

plik lua:
local sounds = {"sounds/headshot1.mp3","sounds/headshot2.mp3","sounds/headshot3.mp3",}
headshot = true
function Sound(killer,_,bodypart)
    if 
not headshot then
        headshot 
= nil
    
else
        if 
bodypart == 9 and getElementData(source,"zombie") and localPlayer == killer then -- aca comprueba que la muerte sea por headshot , que el ped sea un zombies y que el que mato al ped sea el jugador local
            sound 
= sounds[math.random(1, #sounds)] -- aca se escoje el sonido al azar de todas las opciones del inicio
            
soundvolume = playSound(sound) setSoundVolume(soundvolume,0.5)
        
end
    end    
end
addEventHandler
("onClientPedWasted",root, Sound)

function 
ActivarDesactivar()
    if 
not headshot then
        headshot 
= true
        outputChatBox
("Sonidos del Headshot activados.", 0, 255, 0)
        else
        
headshot = nil
        outputChatBox
("Sonidos del Headshot desactivados.", 255, 0, 0)
    
end
end
addCommandHandler
("headshot",ActivarDesactivar)
-- 
Hacer una funcion con un if de /headshot | para desactivarlo y activarlo
2. Headshot
Witam, jest jaki? skrypt, ?e jednym strza?em w g?ow? od razu zabijamy przeciwnika?
Czy trzeba to jako? ustawi? w configu? Prosi?bym o pomoc, wyt?umaczenie