Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created August 16, 2011 06:37
Show Gist options
  • Save rramsden/1148542 to your computer and use it in GitHub Desktop.
Save rramsden/1148542 to your computer and use it in GitHub Desktop.
def on_enable
# Tell everyone in players world that they have joined
event(:player_join) do |e|
e.player.world.players.each do |p|
p.send_message "Player #{e.player.name} has joined"
end
end
# Tell everyone in players world that they have quit
event(:player_quit) do |e|
e.player.world.players.each do |p|
p.send_message "Player #{e.player.name} has quit"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment