Jump to content

fire


freakk

Recommended Posts

Hello i want to know if anyone can help me set fire to zombies unlimited

because the fire is extinguished

I can not and nobody could help

addEvent("onZombieCreated",true) 
addEventHandler("onZombieCreated",root, 
function () 
   if  (getElementModel (source)  ==  68) then 
       setPedOnFire(source, true) 
       SetTimer(setPedOnFire,1000, 0) 
   end 
end) 

Link to comment
addEvent("onZombieCreated",true) 
addEventHandler("onZombieCreated",root, 
function () 
   if  (getElementModel (source)  ==  68) then 
       setPedOnFire(source, true) 
       SetTimer(function() 
setPedOnFire(source, false) 
,1000, 0) 
   end 
end) 

Link to comment
  • Moderators
addEvent("onZombieCreated",true) 
addEventHandler("onZombieCreated",root, 
function () 
   if  (getElementModel (source)  ==  68) then 
       setPedOnFire(source, true) 
       SetTimer(function() 
setPedOnFire(source, false) 
,1000, 0) 
   end 
end) 

Lua is case sensitive.

Edited by Guest
Link to comment
addEvent ( "onZombieCreated", true ) 
addEventHandler ( "onZombieCreated", root, 
    function ( ) 
        if  ( getElementModel ( source ) == 68 ) then 
            setPedOnFire ( source, true ) 
            setTimer ( 
                function ( thePed ) 
                    if ( thePed and isElement ( thePed ) ) then 
                        setPedOnFire ( thePed, true ) 
                    end 
                end 
                ,1000, 0, source 
            ) 
        end 
    end 
) 

Link to comment

yes!!! this works! thank you very much!!

Now one last question please: i have a problem with the zombies onfire...these die alone. but i try this:

addEventHandler("onClientPedDamage",root,function(attacker,weapon,bodypart,damage) 
        local skin = getElementModel(source) 
        if skin == 68 and weapon == 37 then 
                cancelEvent() 
        end  
end) 

and this:

function stopDamage( thePed, attacker, weapon, bodypart) 
 if  ( getElementModel ( source ) == 92 = 37 ) 
            cancelEvent() 
end 

not works tell me what is wrong please

Link to comment

@DNL291: If you cancel ALL the ped's damage, then how are the players going to kill the zombies?

addEventHandler ( "onClientPedDamage", root, 
    function ( attacker, weapon, bodypart, damage ) 
        local skin = getElementModel ( source ) 
        if ( skin == 68 and isPedOnFire ( source ) ) then 
            cancelEvent ( ) 
        end 
    end 
) 

Link to comment
addEventHandler ( "onClientPedDamage", root, 
    function ( attacker, weapon, bodypart, damage ) 
        local skin = getElementModel ( source ) 
        if ( skin == 68 and isPedOnFire ( source ) ) then 
            cancelEvent ( ) 
        end 
    end 
) 

this does not work solid

Link to comment
Cop&Paste the one off solidsnake, btw, the code that DNL291 typed is wrong. this is needed:
addEventHandler("onClientPedDamage", root, cancelEvent() ) 

() was missing.

That's not required, if you add it, then it won't work.

@freakk: You've set that script as client side, right? the script should check if the ped is on fire, if so, cancel the event.

Link to comment
  • Moderators
addEventHandler("onClientPedDamage", root, cancelEvent) 

didn't works :(

worked for me. anyway that's not what you want.

Cop&Paste the one off solidsnake

not copied from anyone.

the code that DNL291 typed is wrong. this is needed:[/i]

addEventHandler("onClientPedDamage", root, cancelEvent() ) 

() was missing.

That's not required, if you add it, then it won't work.

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...