Jump to content

تعديل


Recommended Posts

ما يشتغل

انا بدي اذا كان جوا المي يموت و اذا كان معاة سيارة تسنحب و يموت

setTimer ( function () 
     if isElementInWater( localPlayer ) then 
       setElementHealth(localPlayer,0) 
       destroyElement ( getPedOccupiedVehicle( localPlayer)  )  
         end  
       end 
end, 1000, 0 ) 

Link to comment
setTimer ( function () 
    if isElementInWater( localPlayer ) then 
    setElementHealth(localPlayer,0) 
        if isElementInWater( localPlayer ) and getPedOccupiedVehicle(source) then 
        destroyElement ( getPedOccupiedVehicle(source)  ) 
       end 
    end 
end, 1000, 0 ) 

Link to comment

ججرب #

setTimer ( function () 
    if isElementInWater( localPlayer ) then 
        setElementHealth(localPlayer,0) 
        local myCar = getPedOccupiedVehicle(localPlayer) 
        if ( myCar ) then  
            destroyElement ( myCar  ) 
        end 
    end 
end, 1000, 0 ) 

  • Like 1
Link to comment

شوف سويتلك كذا بـ الطريقة هاذي

-# Client

setTimer ( function () 
            triggerServerEvent('des',localPlayer) 
    end, 800, 0 ) 

-#Server

addEvent('des',true) 
addEventHandler('des',root, 
function ()  
    for _, theCar in pairs ( getElementsByType 'vehicle' ) do 
        if isElement(theCar) and isElementInWater(theCar) then 
            destroyElement(theCar) 
        end 
    end 
    if isElementInWater(source) then 
        killPed(source) 
    end 
end) 

Brb.

  • Like 1
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...