-- name: McDonald's Server Commands -- description: Adds /mcdinfo and a completely unrestricted /order command. -- 1. SERVER INFO COMMAND local function on_mcd_info(msg) djui_chat_message_create("--- Welcome to \#ff0000\Domi\#ffbd00\nator's MCD server! ---") djui_chat_message_create("Use /order To Order!") return true end -- 2. FOOD ORDER COMMAND (ANY TEXT ALLOWED) local function on_order_command(msg) -- Get the local player's name local player_name = gNetworkPlayers[0].name -- If they didn't type anything after /order, default to "nothing" if msg == "" or msg == nil then msg = "nothing" end -- Broadcast to the whole server: "PlayerName ordered [text]" djui_chat_message_create("\\#FFCC00\\" .. player_name .. " \\#FFFFFF\\ordered \\#00FF00\\" .. msg) return true end -- Hook the functions to actual chat commands hook_chat_command("mcdinfo", "Displays McDonald's server details", on_mcd_info) hook_chat_command("order", "[anything] Places an order", on_order_command)