Jump to content

blip zombie


manawydan

Recommended Posts

Posted
addEvent("onZombieSpawned",true) 
addEventHandler("onZombieSpawned",root, 
function ( ) 
local myBlip = createBlipAttachedTo ( source, 0 ) 
end) 

560x95_FFFFFF_09FF00_050505_000000.png

"Querer não é poder, mas tentar é avançar"!

Posted

That's because that event is not triggered by zombies, try with: "onZombieSpawn" instead.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEvent("onZombieSpawn",true) 
addEventHandler("onZombieSpawn",root, 
function ( ) 
local myBlip = createBlipAttachedTo ( source, 0 ) 
end) 

no work

560x95_FFFFFF_09FF00_050505_000000.png

"Querer não é poder, mas tentar é avançar"!

Posted

You set it as server side, right?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

And no blip is attached? are you sure that it has no errors?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

try

server side

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

I'll help When I Can.

Posted
addEvent ( "onZombieSpawn", true ) 
addEventHandler ( "onZombieSpawn", root, 
    function ( ) 
        outputChatBox ( "Element type: ".. tostring ( getElementType ( source ) ) ) 
        createBlipAttachedTo ( source, 0 ) 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 
) 

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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