Custom Death Messages

Place to get help with not working mods / modding interface.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Custom Death Messages

Post by NoPantsMcDance »

Currently I'm working on something to add a bit of flavor when a player dies than just the "player was killed"

The problem I'm having at the moment is I can't figure out how to get this to work correctly in multiplayer, It works fine in singleplayer. So any help would be appreciated thanks. http://pastebin.com/ebdZi5Gy
Looking for a multiplayer server? Check out my servers Vanilla Server
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Custom Death Messages

Post by DaveMcW »

Code: Select all

local death = math.random(1,14)
for o,observer in pairs(game.players) do
  if observer.connected then
    observer.print(dmessage[death])
  end
end
Post Reply

Return to “Modding help”