abu5lf Posted May 18, 2012 Share Posted May 18, 2012 (edited) addEventHandler( "onBotWasted", getRootElement(), function (attacker, weapon, bodypart ) if ( attacker ) and ( attacker ~= source ) then givePlayerMoney ( attacker, 1000 ) end end ) Edited December 25, 2012 by Guest Link to comment
Guest Guest4401 Posted May 18, 2012 Share Posted May 18, 2012 addEvent("onBotWasted",true) addEventHandler( "onBotWasted", getRootElement(), function (attacker, weapon, bodypart ) if ( attacker ) and ( attacker ~= source ) then givePlayerMoney ( attacker, 1000 ) end end ) Link to comment
Stanley Sathler Posted May 18, 2012 Share Posted May 18, 2012 It's for what? Give 1.000 dollars to who shot a Bot? If yes, can you use "onClientPedDamage"? If not, so can use the Karthik code. Seems right (make sure of "source" variable). Link to comment
abu5lf Posted May 18, 2012 Author Share Posted May 18, 2012 addEvent("onBotWasted",true) addEventHandler( "onBotWasted", getRootElement(), function (attacker, weapon, bodypart ) if ( attacker ) and ( attacker ~= source ) then givePlayerMoney ( attacker, 1000 ) end end ) Thanks Link to comment
X-SHADOW Posted May 18, 2012 Share Posted May 18, 2012 why use this ? function (attacker, weapon, bodypart ) if i put this well work ? function (attacker) some one answer me please Link to comment
Guest Guest4401 Posted May 18, 2012 Share Posted May 18, 2012 why use this ?function (attacker, weapon, bodypart ) if i put this well work ? function (attacker) some one answer me please Yes, in this case it will work because the weapon and bodypart doesn't matter (in this case). In some cases they are necessary. 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