Skip to Content
Game guides

An SA-MP and open.mp site from scratch

From an installed Flute to an SA-MP or open.mp site that knows players by nickname, bans on the server, takes reports and sells in-game money and VIP that your gamemode hands out.

By the end you will have an SA-MP or open.mp site with the live player count, bans by nickname, reports from the game, the site menu in dialogs and a shop: a player buys $10,000 in the game or VIP for 30 days, and your gamemode hands them out. SA-MP has no Steam, so the site knows a player by nickname, and some site features do not work with that. Which ones is covered in What does not work with nicknames.

What you need

  • An installed Flute and a session as the owner, see installation.
  • A connected Flute key: without it the marketplace installs no modules, see Flute key.
  • An SA-MP 0.3.7, 0.3.DL or open.mp server with access to its files and console.
  • The source of your gamemode: money, groups and password login reach the site only through it.
  • A sign-in method without Steam, for example Discord or Telegram, see Sign-in methods.

The installer has no SA-MP template of its own. If you picked "Universal", the site has draft pages "Home", "Rules", "Servers" and "Contacts" without module blocks. The blocks arrive in The home page in Studio.

The server and the filterscript

The FluteSampConnect filterscript calls the site over HTTPS, so you open no ports on the server. Install the SampKit module first: without it the site drops every player the filterscript sends and does not offer the mode you need.

Install SampKit

Open AdminExtensionsModules and click "Install" on SampKit. The module has no settings; the "Community setup" list gains the "Connect your SA-MP server to the site" step.

Add the server

Open AdminServers and click "Add server". At the "Game" step pick SAMP and put the IP and port into "Server address", for example 203.0.113.10:7777. Click "Check connection", then "Save server". Details are in Connect a game server.

Install the filterscript

Open the server, go to the "Plugins" tab and expand "How to install GameLink". Download flute-samp-filterscript-<VERSION>.zip and unpack it into the server folder. Use the requests.so from the archive: the stock pawn-requests crashes the server on the first failed request. Load the plugin and the filterscript and restart the server.

server.cfg
plugins requests.so
filterscripts flute_link
The Plugins tab with the How to install GameLink instructions

Connect the server to the site

Click "Issue token" and run the command from the window in the server console or over RCON, while nobody in the game is logged in as an RCON admin:

flute_setup https://<YOUR_DOMAIN> <SERVER_TOKEN>

The console shows [Flute] Connected to https://<YOUR_DOMAIN> (server #N)., and the status on the "Plugins" tab turns to "Connected".

Pick the player authentication

Expand "For power users: security, command queue, in-game menu" and set "Player authentication" under "Security". If your gamemode asks for a password on join, pick "Offline with a password login", otherwise "Offline". In the default "Licensed" mode the site refuses nicknames.

The Security block with the player authentication choice

On the site open Profile → Settings → Linked accounts and click "Get code". Join the server, type /link CODE and confirm the link on the site. Your players go the same way.

The server sent players its player check turns away

"Player authentication" is still at "Licensed". Pick "Offline" or "Offline with a password login". If the list shows "With and without Steam" instead, SampKit is off or the server has another game set.

What does not work with nicknames

A server cannot prove a nickname belongs to a person: anyone can join under a free one. So SampKit registers nicknames as unverified game accounts, and the site trusts them less than a SteamID.

Feature"Offline""Offline with a password login"
linking the nickname, bans, reports, online players, delivery of purchases made on the siteworksworks
signing in to the site from the game with /sitelogin, paying with the balance in the menu, the menu acting as the accountnoworks when the gamemode reports the login
the Stats leaderboardnoworks
kills and playtime in questsnono

The password mode decides whether a nickname may act as a site account. In that mode the nickname also counts on the /stats board, while in "Offline" the board stays empty for an SA-MP server. Quests do not count nicknames in any mode. A player who renames is a new player for the site, and a nickname shorter than 3 or longer than 24 characters is refused: the player sees "The site does not accept this nickname, so site features are off for you."

Modules

ModuleWhat it adds to an SA-MP site
SampKitplayers by nickname. Without it the site sees nobody
Monitoringa servers page with the live player count and the "Servers" block
Sentinelbans and chat blocks by nickname, the public /bans list
Reports/report from the game with the last chat lines
Rewardsdelivery of rewards to the server and the log of every grant. GiveCore and Shop require it
GiveCoregroups with a term, if the gamemode declared group.add
Shopproducts sold for the site balance

Install them from AdminExtensionsModules with "Install"; the admin panel offers the dependencies itself. Dependencies and ionCube are covered in Installing modules.

Gamemode integration

The filterscript gives out no money and no groups itself: it passes the site's command to the gamemode, and the site sells only what the gamemode declared. Include include/flute_link.inc in the gamemode and declare the actions in FluteLink_OnReady:

gamemode.pwn
#include <flute_link>

public FluteLink_OnReady()
{
    FluteLink_UseLogin();
    FluteLink_DeclareAction("economy.deposit");
    FluteLink_DeclareAction("group.add");
    return 1;
}

Carry them out in FluteLink_OnAction and return FLUTE_DONE. Keep the FluteLink_UseLogin() line only if the gamemode asks for a password: then call FluteLink_PlayerLoggedIn(playerid) after the password check, and "Offline with a password login" opens sign-in and the balance to the player. The full example and every answer code are in Gamemode integration. After the gamemode restarts, the Actions from the gamemode line of flute_status lists the declared actions.

Punishments

Add a ban reason in AdminPunishmentsPunishment reasons. To ban a player, open them in AdminPlayers, go to the "Punishments" tab and click "Punish". The filterscript keeps its own ban list by nickname and checks it on join; the player sees "You are banned on this server until … Reason: …".

The Punish window with the What will happen block

If your admin system in the gamemode bans and mutes by itself, report that to the site with FluteLink_ReportSanction. There is no voice mute unless the gamemode declares one.

Shop and privileges

Products are sold for the site balance, so connect a payment system first, as described in Accept payments. The player pays on the site, so purchases work in "Offline" mode too: they need no balance charge in the game.

Create the money product

Open AdminShopProducts and click "New product". In "What the buyer gets" pick "Server credits" and enter 10000 as the "Quantity". The gamemode receives the economy.deposit action with that amount. In "Terms and prices" choose "Permanent", fill in "Price", turn on "On sale" and save.

Create VIP

Open AdminPrivileges, click "Create a privilege", enter VIP as the "Name" and vip in "What the player gets" of the server row. On the privilege page click "Sell in the shop", put a "Price" into the 30-day row, turn on "On sale" and save. The gamemode receives group.add with the vip group.

Give the product to yourself

Open your account in AdminPlayers, choose "Give a product", then "Product and term" and "Server". The order gets the "Given by hand" status.

If the player is offline, the gamemode gets playerid as INVALID_PLAYER_ID and decides itself: credit the account right away, or return FLUTE_DEFER_OFFLINE so the command waits until the player joins. Grants that did not get through are collected in AdminRewardsGrants.

The home page in Studio

There is no SA-MP template, so module blocks go on the pages by hand.

Open the home page in Studio

Open Studio from AdminSite design and go to the "Home" page.

Add module blocks

Add "Servers", "Latest punishments", "Shop: products" and, with the Rules module installed, "Rules in short". Adding and setting up a block is covered in Studio blocks.

Publish

Click "Publish", as described in Studio. Colours and fonts are set in the site style.

Check

By now the "Community setup" list on the admin home page ticks "Add a game server", "Link the server to the site", "Connect your SA-MP server to the site", "Turn on a login provider", "Connect payments" and "Style the site in Studio", see first steps. The rest is checked in the game and on the site, with the nickname you linked.

  • flute_status in the console shows the last sync without an error, and Actions from the gamemode lists economy.deposit and group.add.
  • /site opens the site menu in a dialog.
  • The money from the test order reached your game account.
  • The home page shows the server with its player count, and /bans shows the test ban.
  • /report on another player creates a new report on the site.

If something does not add up, start with the troubleshooting table on the SA-MP and open.mp page.

More

On this page