Page 1 of 1

[Mod Request] Know when someone dies

PostPosted: Tue Jul 17, 2012 18:07
by InfinityProject
I don't know if this has already been made or not but could someone make a mod that when someone dies it says something like: InfinityProject has died

Maybe it could say if someone killed you.
Mayajazz killed InfinityProject

PostPosted: Tue Jul 17, 2012 20:59
by cosarara97
The "player1 killed player2" would be more difficult to do, because it depends on how the player died, and you'll have to modify the functions which "kill" the player, I think. But for the "player1 died", this should work:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_dieplayer(function(player)
    minetest.chat_send_all(player:get_player_name() .. " has died.")
    return true
end)