Jump to content

Help in give gun and msg ![Please]


E-mail

Recommended Posts

Hi all

i have made a script if player kill enmey give him m4 with 20 ammo

function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( source, 31, 20 ) 
    outputChatBox("You Have got M4 For Kill The Noob!!",killer,255,255,0) 
    end 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

how to add msg for all players

Warning player Name have got M4 For Kill a Noop !

:mrgreen:

Link to comment
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( killer, 31, 20 ) 
    outputChatBox(killer.." Have got M4 For Kill The Noob!!") 
    end 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

Edited by Guest
Link to comment
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( killer, 31, 20, true ) -- source is the person who died, killer is the one who killed him. 
    outputChatBox("You Have got M4 For Kill The Noob!!", killer) 
    end 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

Link to comment
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( killer, 31, 20, true ) 
    outputChatBox(getPlayerName(killer) .." has now a M4, watch out!", getRootElement(), 255, 0, 0) 
    end 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

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