Jump to content

Damange Parts do veiculo


Recommended Posts

Bom Dia,

 

Eu estou tentando fazer um sistema de dano, quando o jogador a parte do carro quebra o motor, o pneu etc.. Eu tenho um sistema desse, mais eu comprei ja faz 3 anos e resolvi fazer eu mesmo, pois ele ta bugado e sou muito curioso de aprender isso, alem do cara que me vendeu não me responder mais.

ai queria saber eu preciso usar o

onClientVehicleCollision


ou o 


onClientVehicleDamage
 eu tava fazendo assim para identificar as partes do carro

ESSE AQUI EU TAVA VENDO SE TAVA DANDO A COLISÃO CERTA
 

addEventHandler("onClientVehicleCollision", root, function (attacker, force, part, X, Y, Z, NX, NY, NZ, HitElementForce, model) 
    -- if force then	
    if part == 3 then 
        outputChatBox("MOTOR")
    end   
    if part == 13 or part == 14 or part == 15 or part == 16 then 
        outputChatBox("TIRES")
    end   
    if part == 2 or part == 7 or part == 8 then 
        outputChatBox("PARTS")
    end   
end) 


ESSA AQUI EU PEGUEI NO FORUM
 

addEventHandler("onClientVehicleCollision", root,  
function(element, force, part) 
    if element then 
        if getElementByType("vehicle") then 
            outputChatBox("Body part was "..part) 
        end 
    end 
end 
) 

 

EU SO PRECISO DE UMA LUZ PARA SABER O QUE DEVO USAR E ESSE DANO TEM QUE FUNCIONAR PARA TIROS QUANDO ACERTA O VEICULO TAMBÉM É POSSÍVEL?

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