Jump to content

Good??


CheiN

Recommended Posts

-- define the event handler function 
function onWasted(killer, weapon, bodypart) 
     givePlayerMoney(killer, 1000) 
end 
  
-- add the event handler 
addEventHandler("onClientPlayerWasted", getRootElement(), onWasted) 

Im good?? The thing is.. If a projectile kill a player u will get money

Link to comment

umm, I don't think that would be enough.

try this:

local projectiles = { 
    [16]=true, 
    [17]=true, 
    [18]=true, 
    [39]=true 
    } 
function onWasted(killer, weapon, bodypart) 
    --First get the weapon type 
    if projectiles[weapon] then --this checks if it's a projectile 
        givePlayerMoney(killer, 1000) --if it is, then give the player the money 
    end 
end 
addEventHandler("onPlayerWasted",root, onWasted) 

Please read more on this page: Weapons

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