Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function printUsage()
- print("Usage: " .. shell.getRunningProgram() .. " <player> <join:leave>")
- end
- tArgs = { ... }
- if #tArgs == 2 then
- if tArgs[2] == "join" then
- commands.exec('tellraw @p ["",{"text":"' ..tArgs[1] .. ' joined the game","color":"yellow"}]')
- elseif tArgs[2] == "leave" then
- commands.exec('tellraw @p ["",{"text":"' ..tArgs[1] .. ' left the game","color":"yellow"}]')
- else
- printUsage()
- end
- else
- printUsage()
- end
Advertisement
Add Comment
Please, Sign In to add comment