Official Documentation
Verify SA-MP
Welcome to the official documentation of Verify SA-MP. Here you will learn how to integrate your SA:MP, MTA:SA, or FiveM server with Discord using a fully automated whitelist system.
- • The player completes the whitelist on Discord
- • Staff approves or denies the request
- • The server checks the API before allowing entry
Administrative Commands
/announcewl
Sends an announcement that the whitelist is open.
/approve
Approve a user on the whitelist.
/deny
Reject a user from the whitelist.
/dashboard
Shows the bot configuration dashboard.
/set-addquestions
Add a multiple-choice whitelist question.
/set-questions
Set the open-answer whitelist questions.
/getkey
Generate or retrieve your API key.
/profile set avatar
Change the bot avatar.
/profile set banner
Change the bot banner.
/profile set bio
Change the bot bio.
General Commands
/help
Shows all available bot commands.
/botinfo
Verify SA-MP — Bot Information
/online
Shows list of online players in an SA:MP server.
/support
Shows the official support server information.
/whitelist
Starts the whitelist process.
How the API works
- The player completes the whitelist on Discord
- Staff approves or denies
- Status is stored in the API
- The server periodically queries the API
- Only approved players can join
How to obtain the API Key
Use the command below on Discord:
/obterkey /getkey
Authentication
Authorization: Bearer API_KEY
Endpoint
GET https://verifyservers.discloud.app/api/whitelist/my
API Response
{
"success": true,
"count": 3,
"whitelists": [
{
"identifier": "JoaoRP",
"status": "approved"
},
{
"identifier": "MariaRP",
"status": "denied"
},
{
"identifier": "Noobzinho",
"status": "pending"
}
]
}SA:MP Integration (Pawn)
#include <a_samp>
#include <a_https>
#include <DOF2>
#define API_URL "https://verifyservers.discloud.app/api/whitelist/my"
#define API_KEY "YOUR_API_KEY" // <-- change here
#define WL_DIR "/whitelistsverify" // Caminho desejado
new WL_DirAvailable = 0; // Indica se o diretório existe (avaliado em OnGameModeInit)
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("
--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------
");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("
----------------------------------");
print(" === TESTE: O GM INICIOU");
print("----------------------------------
");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
SetTimer("ProcessHTTPSQueue", 100, true);
SetTimer("CheckWhitelistTimer", 15000, true);
// checa diretório e marca WL_DirAvailable
WL_DirAvailable = EnsureWhitelistDirectory();
if (!WL_DirAvailable)
{
printf("[WHITELIST] Pasta '%s' NÃO encontrada ou inacessível.", WL_DIR);
printf("[WHITELIST] Crie a pasta manualmente e dê permissão de escrita ao usuário do servidor.");
printf("[WHITELIST] No Windows (cmd): mkdir "%s"", WL_DIR);
printf("[WHITELIST] No Linux: mkdir -p "%s" && chown <user> "%s"", WL_DIR, WL_DIR);
printf("[WHITELIST] Vou usar fallback para a pasta DOF2 padrão (Users/...).");
}
else
{
printf("[WHITELIST] Pasta '%s' disponível — arquivos serão salvos nela.", WL_DIR);
}
return 1;
}
public OnGameModeExit()
{
DOF2::WriteFile();
DOF2_Exit();
return 1;
}
public CheckWhitelistTimer()
{
https_set_header("Authorization", "Bearer " API_KEY);
https(0, HTTPS_GET, API_URL, "", "OnWhitelistResponse");
return 1;
}
public OnWhitelistResponse(index, response[], status, error)
{
if (error)
{
printf("[WHITELIST] Requisição falhou (error=%d, status=%d)", error, status);
return 1;
}
if (status != 200)
{
printf("[WHITELIST] Status != 200: %d Body: %s", status, response);
return 1;
}
new body[8192];
strmid(body, response, 0, sizeof body);
Trim(body);
printf("[WHITELIST] Resposta: %s", body);
new idx = FindSubstring(body, ""whitelists"", 0);
if (idx == -1)
{
printf("[WHITELIST] 'whitelists' não encontrada no JSON.");
return 1;
}
new arrStart = FindSubstring(body, "[", idx);
if (arrStart == -1)
{
printf("[WHITELIST] array '[' não encontrado após 'whitelists'.");
return 1;
}
new arrEnd = FindSubstring(body, "]", arrStart);
if (arrEnd == -1) arrEnd = strlen(body);
new pos = arrStart + 1;
new processed = 0;
while (pos < arrEnd)
{
new objPos = FindSubstring(body, "{", pos);
if (objPos == -1 || objPos >= arrEnd) break;
new objEnd = FindSubstring(body, "}", objPos);
if (objEnd == -1 || objEnd > arrEnd) objEnd = arrEnd;
new identifier[128]; identifier[0] = '