A lightweight, username-based admin slap system for SA-MP RP servers
This script adds a simple but powerful /slap system to any SA-MP Roleplay gamemode. Admins (verified by username only) can slap a single player or every player online with a high jump effect.
โ Clean compile
โ Lightweight & stable
โ Fully RP-friendly
โ No admin IDs required โ username check only
โก /slap <playerid> โ Launch a player high into the sky
๐ /slap all โ Slap every connected player
๐ Username-based admin verification
๐ฆ Fully standalone (no database required)
๐ 100% English documentation
๐งฉ Works with all SA-MP Roleplay gamemodes
๐ Instant response & no performance impact
Follow these easy steps:
1๏ธโฃ Download the Script
Download the .pwn file and place it inside your gamemode or filterscripts folder.
2๏ธโฃ Ensure Required Includes Exist
Make sure you have:
a_samp
sscanf2
If you are missing sscanf2, download it from: โก https://github.com/maddinat0r/sscanf
Or install via sampctl:
sampctl package install maddinat0r/sscanf
3๏ธโฃ Add Script to Your Gamemode
If included inside your GM:
#include "slap_system.pwn"
If using as a filterscript, add to server.cfg:
filterscripts slap_system
4๏ธโฃ Add Your Admin Username(s)
Inside OnGameModeInit():
AddAdmin("YourAdminName"); // โ replace this
AddAdmin("SecondAdmin"); // optional
You can add unlimited names.
5๏ธโฃ Compile
Compile using your standard Pawn compiler:
pawncc yourgamemode.pwn
If everything is correct โ you will get:
โ No errors
โ No warnings
โ Clean compile
6๏ธโฃ Start Your Server
Run SA-MP server and test:
/slap <playerid>
/slap all
๐ฆ Slap a Single Player
/slap 12
Player with ID 12 will be launched upward.
๐จ Slap Everyone
/slap all
All connected players receive the slap effect.
๐ Permission System
Only users whose username matches your admin list can use the command.
โ Change admin names exactly as they appear in-game (case-insensitive)
๐ซ Do not put spaces in admin usernames
Example:
โ "John Doe"
โ "John_Doe"
๐ If you want multiple admins โ just add more AddAdmin("username"); lines
โ You can safely use this script in live RP servers
๐งน No database needed โ everything runs standalone
Requirement Description
SA-MP Server 0.3.7 / open.mp Works on both
Pawn Compiler Standard pawncc is enough
sscanf Plugin Needed for command parsing
Basic Server Knowledge How to compile & run SA-MP
This project is free to use, modify, and include in any SA-MP server.
If you like this script, consider giving the repository a โญ on GitHub! Contributions & improvements are always welcome.