Jump to content

Functions


-.Paradox.-

Recommended Posts

Posted

Hello, I need some functions to create a script like example if player hit another player with vehicle he instantly die like real life :3 thanks for helping

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

If the player is in vehicle and he hit another player in foot he die instantly that what I'm trying to make

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted (edited)
addEventHandler("onClientVehicleCollision", getRootElement(),  
function(hitElement) 
    if getElementType(hitElement)=="ped" then 
        theKiller = getVehicleController(source) 
        setElementHealth(theKiller, 0) 
    end 
end 
) 

Something like that perhaps?

Edited by Guest

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

OH, you want the ped's health to be set to 0? That makes more sense :lol:

in that case:

    addEventHandler("onClientVehicleCollision", getRootElement(), 
    function(hitElement) 
        if getElementType(hitElement)=="ped" then 
            setElementHealth(hitElement, 0) 
        end 
    end 
    ) 

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

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