Jump to content

Kill System


#Paper

Recommended Posts

try this, is not tested.

function onWasted(killer) 
    if getElementType(killer) == "player" then 
        outputChatBox(getPlayerName(killer).. " killed ".. getPlayerName(source) .."!",getRootElement(),255,0,0) 
    end 
end 
addEventHandler("onPlayerWasted",getRootElement(),onWasted) 

Link to comment
try this, is not tested.
function onWasted(killer) 
    if getElementType(killer) == "player" then 
        outputChatBox(getPlayerName(killer).. " killed ".. getPlayerName(source) .."!",getRootElement(),255,0,0) 
    end 
end 
addEventHandler("onPlayerWasted",getRootElement(),onWasted) 

no don't work...

Link to comment

SolidSnake14, the first argument in onPlayerWasted event function is ammo, apparently you forgot this :b

function onWasted(ammo,killer) 
    if getElementType(killer) == "player" and killer ~= source then 
        outputChatBox(getPlayerName(killer).. " killed ".. getPlayerName(source) .."!",getRootElement(),255,0,0) 
    end 
end 
addEventHandler("onPlayerWasted",getRootElement(),onWasted) 

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