x[Dev-PoinT]x Posted July 15, 2011 Share Posted July 15, 2011 Hi i want Make Anti-Fist i did make it but its Not Work Player Damge on Fist hit Fix Bug Please function xx ( attacker, weapon, bodypart ) if ( weapon == 0 ) then cancelEvent() end end addEventHandler ( "onPlayerDamage", getLocalPlayer(), xx ) Link to comment
JR10 Posted July 15, 2011 Share Posted July 15, 2011 --ClientSide addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) if weapon == 0 then cancelEvent() end end) Link to comment
gokalpfirat Posted July 15, 2011 Share Posted July 15, 2011 JR10, why dont he use if (weapon == 0) then Link to comment
JR10 Posted July 15, 2011 Share Posted July 15, 2011 hmm?, that's what i posted: --ClientSide addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) if weapon == 0 then cancelEvent() end end) if weapon == 0 then Link to comment
x[Dev-PoinT]x Posted July 15, 2011 Author Share Posted July 15, 2011 Jr10 You Are The Best i put 3 scrptis in 1 file fix Please messages = { "هههه مسوي برو ق1", "لول نوب انت؟؟", "خخخخ انت ولعبك المنوب", "ههه انا لله وانا اليه راجعون" } function wastedMessage ( killer, weapon, bodypart ) local randomID = math.random ( 1, #messages ) local randomMessage = messages[randomID] outputChatBox ( randomMessage, 255, 0, 0 ) end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), wastedMessage ) outputChatBox("Wasted_System_v2.0",255,255,0) outputChatBox("AnTi-Fist_v1.0",0,255,255) end function wasted (killer, weapon, bodypart) local sound = playSound("sounds/wasted.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) end 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) setCameraTarget (source) fxAddBlood (x,y,z+0.8,0,0,0,500) setPedHeadless (source,true) setElementHealth (source,0) setTimer (setGameSpeed,2000,1,1) end end end addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) if weapon == 0 then cancelEvent() end end) Love You JR10 Link to comment
Aibo Posted July 15, 2011 Share Posted July 15, 2011 messages = { "هههه مسوي برو ق1", "لول نوب انت؟؟", "خخخخ انت ولعبك المنوب", "ههه انا لله وانا اليه راجعون" } outputChatBox("Wasted_System_v2.0",255,255,0) outputChatBox("AnTi-Fist_v1.0",0,255,255) function wasted (killer, weapon, bodypart) outputChatBox ( messages[math.random(1,#messages)], 255, 0, 0 ) local sound = playSound("sounds/wasted.mp3") setSoundVolume(sound, 0.5) end addEventHandler ("onClientPlayerWasted", getLocalPlayer(), wasted) addEventHandler ("onClientPlayerDamage", root, function (attacker,weapon,bodypart) if weapon == 0 then cancelEvent() elseif weapon == 24 or weapon == 31 or weapon == 34 then if bodypart == 9 then local x,y,z = getElementPosition(source) local sound = playSound ("sounds/headshot.mp3",false) setSoundVolume (sound,4) setGameSpeed (0.25) setCameraTarget (source) fxAddBlood (x,y,z+0.8,0,0,0,500) setPedHeadless (source,true) setElementHealth (source,0) setTimer (setGameSpeed,2000,1,1) end end end) Link to comment
x[Dev-PoinT]x Posted July 15, 2011 Author Share Posted July 15, 2011 Back!! i uplode Pic see The Bug http://www.gmrup.com/d1/up13107671371.png The Head dont Back !!! and Anti-Fist dont work Link to comment
x[Dev-PoinT]x Posted July 16, 2011 Author Share Posted July 16, 2011 ..... Please see The Pic and tell me what is the bug in script Link to comment
TAPL Posted July 17, 2011 Share Posted July 17, 2011 try with this messages = { "هههه مسوي برو ق1", "لول نوب انت؟؟", "خخخخ انت ولعبك المنوب", "ههه انا لله وانا اليه راجعون" } outputChatBox("Wasted_System_v2.0",255,255,0) outputChatBox("AnTi-Fist_v1.0",0,255,255) function wasted (killer, weapon, bodypart) outputChatBox ( messages[math.random(1,#messages)], 255, 0, 0 ) local sound = playSound("sounds/wasted.mp3") setSoundVolume(sound, 0.5) end addEventHandler ("onClientPlayerWasted", getLocalPlayer(), wasted) addEventHandler ("onClientPlayerDamage", root, function (attacker,weapon,bodypart) if weapon == 0 then cancelEvent() elseif weapon == 24 or weapon == 31 or weapon == 34 then if bodypart == 9 then local x,y,z = getElementPosition(source) local sound = playSound ("sounds/headshot.mp3",false) setSoundVolume (sound,4) setGameSpeed (0.25) setCameraTarget (source) fxAddBlood (x,y,z+0.8,0,0,0,500) setPedHeadless (source,true) setElementHealth (source,0) setTimer (setGameSpeed,2000,1,1) setTimer (setPedHeadless,2000,1,source,false) end end end) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now