Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Let's start with the easy, most comman mode of deaths/kills - Weapon kills by other players.
- -- First get the root element, on damage of the player.
- rootElement = getRootElement()
- addCommandHandler("lastkilledby",
- -- once typed /lastkilledby, the player will be able to see who last damaged him, or if the knob damaged himself.
- if rootElement == player then
- function whoDamagedMe (thePlayer)
- local playerName = getPlayerName(thePlayer)
- -- now we know who damaged him, now output it.
- outputChatbox(playerName.." has damaged you!")
- end
- end
- addEventHandler("onClientPlayerDamage", rootElement, whoDamagedMe)
- else
- outputChatbox("You're a knob who just damaged himself.")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement