Jump to content

Recommended Posts

hhhh 8alta matba3iya xD

@wassamas, e5dm b:

"onVehicleDamage" 
cancelEvent -- bech mat5alich el karhba temchi 
getElementHealth -- par exemple, wa9teli el karhba yousel damha 20% twa9ef'ha w tekriti fiha enar 
createFire 
attachElementToElement 
triggerClientEvent -- bech ta3ml trigger el client bech tekriti el fire, ala5ater createFire client side only 

Link to comment

Server

addEventHandler("onVehicleDamage", root, 
function() 
if (getElementHealth(source) == 20) then 
cancelEvent() 
triggerClientEvent("cha3lelha", getRootElement()) 
end 
end) 

Client

addEvent("cha3lelha", true) 
addEventHandler("cha3lelha", root, 
function() 
local x, y, z = getElementPosition(getLocalPlayer()) 
createFire(x, y, z, 1.9) 
end) 

Link to comment
Server
addEventHandler("onVehicleDamage", root, 
function() 
if (getElementHealth(source) == 20) then 
cancelEvent() 
triggerClientEvent("cha3lelha", getRootElement()) 
end 
end) 

Client

addEvent("cha3lelha", true) 
addEventHandler("cha3lelha", root, 
function() 
local x, y, z = getElementPosition(getLocalPlayer()) 
createFire(x, y, z, 1.9) 
end) 

chay

rani n7abo yo5rjo zou niran fil 3ajali tilalin kima fil taswira

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