Jump to content

Help with Wasted_System v2


Recommended Posts

Hi all i have Bug with My Wasted_System v2

See The Script and Fix Please

function wasted (killer, weapon, bodypart)  
    local sound = playSound("sounds/wasted.mp3")  
    setSoundVolume(sound, 0.5)  
end 
  
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted)  

and This

addEventHandler ("onClientPlayerDamage",getRootElement(), 
function (attacker,weapon,bodypart) 
 if bodypart == 9 then  
   if weapon == 24 or weapon == 31 or weapon == 34 then 
    local x,y,z = getElementPosition(source) 
    local sound = playSound ("sounds/headshot.mp3",false) 
    setSoundVolume (sound,4) 
    setGameSpeed (0.25) 
    fxAddBlood (x,y,z+0.8,0,0,0,500) 
    setPedHeadless (source,true) 
    function giveBackHead(thePlayer) 
    setPedHeadless(thePlayer, false) 
    setElementHealth (source,0) 
    setTimer (setGameSpeed,2000,1,1) 
   end 
 end 
end 
addCommandHandler("headmeup", giveBackHead) 

Link to comment

try

addEventHandler ("onClientPlayerDamage",getRootElement(), 
function (attacker,weapon,bodypart) 
 if bodypart == 9 then 
   if weapon == 24 or weapon == 31 or weapon == 34 then 
    local x,y,z = getElementPosition(source) 
    local sound = playSound ("sounds/headshot.mp3",false) 
    setSoundVolume (sound,4) 
    setGameSpeed (0.25) 
    fxAddBlood (x,y,z+0.8,0,0,0,500) 
    setPedHeadless (source,true) 
    function giveBackHead(thePlayer) 
    setPedHeadless(thePlayer, false) 
    setElementHealth (source,0) 
    setTimer (setGameSpeed,2000,1,1) 
   end 
 end 
end) 
addCommandHandler("headmeup", giveBackHead) 

Link to comment
addEventHandler ("onClientPlayerDamage",getRootElement(), 
function (attacker,weapon,bodypart) 
 if bodypart == 9 then 
   if weapon == 24 or weapon == 31 or weapon == 34 then 
    local x,y,z = getElementPosition(source) 
    local sound = playSound ("sounds/headshot.mp3",false) 
    setSoundVolume (sound,4) 
    setGameSpeed (0.25) 
    fxAddBlood (x,y,z+0.8,0,0,0,500) 
    setPedHeadless (source,true) 
   end 
 end 
end) 
  
   function giveBackHead() 
    setPedHeadless(getLocalPlayer(), false) 
    setElementHealth (getLocalPlayer(),0) 
    setTimer (setGameSpeed,2000,1,1) 
   end 
addCommandHandler("headmeup", giveBackHead) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...