Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Simpsons Hit & Run Multiplayer Server
  • Tutorials

Creating Your First Server Mod

This guide will walk you through creating a simple server-side mod that welcomes players when they join.

Prerequisites

Step 1: Create a Mod Folder

Inside the ServerMods folder (located next to your server executable), create a new folder for your mod. The folder name should match your mod's internal name.

ServerMods/
└── MyFirstMod/

Step 2: Create Mod.yaml

Inside your mod folder, create a Mod.yaml file. This file describes your mod to the server.

internalName: MyFirstMod
title: My First Mod
description: A simple welcome message mod.
version: 1.0.0
entryPoint: Main.lua
Field Description
internalName A unique identifier for your mod. Should match the folder name.
title The display name of your mod.
description A short description of what your mod does.
version The version of your mod.
entryPoint The Lua script that the server will run when loading your mod.

Step 3: Create the Entry Point Script

Create a Main.lua file inside your mod folder. This is the script that runs when your mod is loaded.

Server.AddEventListener("PlayerJoined", function(e)
    local player = e.Client

    player:SendGameChatMessage("Welcome to " .. Server.Config.ServerName .. ", " .. player.Name .. "!")
end)

This script listens for the PlayerJoined event and sends a welcome message in the in-game chat to each player when they connect.

Your mod folder should now look like this:

ServerMods/
└── MyFirstMod/
    ├── Mod.yaml
    └── Main.lua

Step 4: Start the Server

Start (or restart) your server. The server will automatically discover and load your mod from the ServerMods folder.

Next Steps

  • See Lua Scripting for a full reference of all tables and functions available in server mods.
  • See Events for a full list of events you can listen for.