Jump to content

blip zombie


manawydan

Recommended Posts

Try this and see if it says something on chat.

addEvent ( "onZombieSpawn", true ) 
addEventHandler ( "onZombieSpawn", root, 
    function ( ) 
        outputChatBox ( "A ZOMBIE HAS JUST SPAWNED!" ) 
        createBlipAttachedTo ( source, 0 ) 
    end 
) 

Link to comment
addEvent ( "onZombieSpawn", true ) 
addEventHandler ( "onZombieSpawn", root, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "ped" ) ) do 
            if getElementData ( v, "zombie" ) then 
                createBlipAttachedTo ( v, 0 ) 
            end 
        end 
    end 
) 

Link to comment
addEvent ( "onZombieSpawn", true ) 
addEventHandler ( "onZombieSpawn", root, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "ped" ) ) do 
            if getElementData ( v, "zombie" ) then 
                createBlipAttachedTo ( v, 0 ) 
            end 
        end 
    end 
) 

This will create more than one blip for zombie I think.

Link to comment
blips = { } 
  
addEvent ( "onZombieSpawn", true ) 
addEventHandler ( "onZombieSpawn", root, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "ped" ) ) do 
            if getElementData ( v, "zombie" ) then 
                if ( not blips [ v ] ) then 
                    blips [ v ] = createBlipAttachedTo ( v, 0 ) 
                end 
            end 
        end 
    end 
) 
  
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
    function ( ) 
        if ( isElement ( blips [ source ] ) ) then 
            destroyElement ( blips [ source ] ) 
        end 
    end 
) 

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