Jump to content

lose money


Recommended Posts

اسلام عليكم

شبااب انا بدي لو واحد قتل فريقة ينقص فلوسة

هذا الكود

function rewardOnWasted ( ammo, killer, killerweapon, bodypart ) 
  
    if ( killer ) and ( killer ~= source ) then 
        givePlayerMoney ( killer, 1000 ) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted ) 

وشكرا

Link to comment

جرب كذا,

addEventHandler('onPlayerWasted',root,function(_,killer) 
    if killer and killer ~= source and getElementType(killer) == 'player' then 
        if getTeamName(getPlayerTeam(killer)) == getTeamName(getPlayerTeam(source)) then 
            givePlayerMoney(killer,getPlayerMoney(killer) - 100) 
            end 
        end 
    end 
) 
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...