Jump to content

Problem onBotWasted


abu5lf

Recommended Posts

Posted (edited)
addEventHandler( "onBotWasted", getRootElement(), 
function (attacker, weapon, bodypart ) 
    if ( attacker ) and ( attacker ~= source ) then  
        givePlayerMoney ( attacker, 1000 )  
    end 
end ) 
  

Edited by Guest
Guest Guest4401
Posted
addEvent("onBotWasted",true) 
addEventHandler( "onBotWasted", getRootElement(), 
function (attacker, weapon, bodypart ) 
    if ( attacker ) and ( attacker ~= source ) then 
        givePlayerMoney ( attacker, 1000 ) 
    end 
end ) 

Posted

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

Posted
addEvent("onBotWasted",true) 
addEventHandler( "onBotWasted", getRootElement(), 
function (attacker, weapon, bodypart ) 
    if ( attacker ) and ( attacker ~= source ) then 
        givePlayerMoney ( attacker, 1000 ) 
    end 
end ) 

Thanks

Guest Guest4401
Posted
why use this ?

function (attacker, weapon, bodypart )

if i put this well work ?

function (attacker)

some one answer me please :D

Yes, in this case it will work because the weapon and bodypart doesn't matter (in this case). In some cases they are necessary.

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