CheiN Posted August 3, 2012 Share Posted August 3, 2012 -- 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
Castillo Posted August 4, 2012 Share Posted August 4, 2012 1: The money should be given server side, as if you give it client side it won't make any effect. 2: By a projectile you mean a rocket fired to your vehicle? if so, then this won't work. Link to comment
Jaysds1 Posted August 4, 2012 Share Posted August 4, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now