Jump to content

Ayudita


0xCiBeR

Recommended Posts

  • MTA Team

Hola como podria hacer para que cuando 1 zombie gordo(que tenga skin de gordo), ya se bombero o alguno otro, al morir, que explote..??? Esto es lo que hize...Aunque no crea la explosion??...

addEventHandler("onZombieWasted",root, 
function (source) 
local posX,posY,posY = getElementPosition( source ) 
if ( getElementModel ( source ) == 22 ) then 
  
  
createExplosion ( posX, posY, posZ, 10 ) 
end 
end) 

Link to comment
  • MTA Team

Puse asi y sigue sin crearse la explosion?..

addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted",root, 
function () 
local posX,posY,posY = getElementPosition( source ) 
if ( getElementModel ( source ) == 22 ) then 
  
  
createExplosion ( posX, posY, posZ, 10 ) 
end 
end) 
  

Link to comment

Probalo asi haber

function ( zombie ) 
if getElementType ( zombie ) == "ped" and getElementModel ( zombie ) == 22  then 
local x,y,z = getElementPosition ( zombie ) 
createExplosion ( x, y, z, 10 ) 
end 
end 
addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted", getRootElement(), ) 
Link to comment
ok, Saca esos eventos y prueva con este: onPedWasted

¿Prueva?

Prueba*

    addEvent ( "onZombieWasted", true ) 
    addEventHandler ( "onZombieWasted", root, 
        function ( killer ) 
            if ( killer and getElementType ( killer ) == "player" ) then 
                local zombieSkin = getElementModel(source) 
               if (zombieSkin == 22) then 
                 createExplosion(x, y, z, 10) 
                 end 
         end 
end 
) 

Link to comment
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
    function ( ) 
        local posX, posY, posZ = getElementPosition ( source ) 
        if ( getElementModel ( source ) == 22 ) then 
            createExplosion ( posX, posY, posZ, 10 ) 
        end 
    end 
) 

Link to comment
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
    function ( ) 
       local pX, pY, pZ = getElementPosition ( source ) 
        if ( getElementModel ( source ) == 22 ) then 
            createExplosion ( pX, pY, pZ, 10, source ) 
        end 
    end 
) 

Link to comment
  • Recently Browsing   0 members

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