Jump to content

Aumentare potenza armi!!!


Recommended Posts

  
--ecco un esempio 
  
function superTanaka ( attacker, weapon, bodypart ) 
    if ( weapon == 8 ) then --se la tanaka colpisce 
         setElementHealth  ( source, 0) 
    end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), superTanaka ) 
  

prova client side

Edited by Guest
Link to comment

Ok

Apri il file zombie_client.lua ed aggiungi alla fine questa funzione :

  
function zombiedamagedKatana ( attacker, weapon, bodypart ) 
    if getElementType ( source ) == "ped" then 
        if (getElementData (source, "zombie") == true) then 
            if ( weapon == 8 ) then 
                helmeted = "no" 
                local zskin = getElementModel ( source ) 
                for k, skin in pairs( helmetzombies ) do 
                    if skin == zskin then 
                        helmeted = "yes" 
                    end 
                end 
                if helmeted == "no" then 
                    triggerServerEvent ("superKatana", source, source, attacker, weapon, bodypart ) 
                end 
            end 
        end 
    end 
end 
addEventHandler ( "onClientPedDamage", getRootElement(), zombiedamagedKatana ) 
  

Apri il file zombie_server.lua ed aggiungi sempre alla fine :

  
addEvent( "superKatana", true ) 
function katanaOneShot ( ped,attacker, weapon, bodypart) 
    if (getElementData (ped, "zombie") == true) then 
        killPed ( ped, attacker, weapon, bodypart ) 
        setPedHeadless  ( ped, true ) 
    end 
end 
addEventHandler( "superKatana", getRootElement(), katanaOneShot ) 
  

L'ho testato funziona :lol:

Link to comment
  • 1 month later...

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