abu5lf Posted May 18, 2012 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
Guest Guest4401 Posted May 18, 2012 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 )
Stanley Sathler Posted May 18, 2012 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).
abu5lf Posted May 18, 2012 Author 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
X-SHADOW Posted May 18, 2012 Posted May 18, 2012 why use this ? function (attacker, weapon, bodypart ) if i put this well work ? function (attacker) some one answer me please
Guest Guest4401 Posted May 18, 2012 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.
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