Based on original code by Southclaws. Refactored and modularized by xWendorion.
This include provides a plug-and-play noclip system for SA-MP servers.
Originally created by Southclaws, this version has been updated, cleaned, and converted into a modern include for easier use and maintenance.
- Smooth free-fly (noclip) movement
- Acceleration-based controls
- Toggle via command
- Easy integration
- Works with Open.MP and SA-MP 0.3.7
At the top of your .pwn
file:
#include <noclip>
Add the following to your OnGameModeInit
, OnPlayerConnect
, and OnPlayerUpdate
:
public OnGameModeInit()
{
NoclipInit();
return 1;
}
public OnPlayerConnect(playerid)
{
NoclipConnect(playerid);
return 1;
}
public OnPlayerUpdate(playerid)
{
NoclipUpdate(playerid);
return 1;
}
COMMAND:noclip(playerid)
{
if (GetPVarInt(playerid, "FlyMode") == 1)
{
CancelFlyMode(playerid);
SendClientMessage(playerid, -1, "[Noclip] Disabled.");
}
else
{
FlyMode(playerid);
SendClientMessage(playerid, -1, "[Noclip] Enabled.");
}
return 1;
}
- SA-MP 0.3.7 or Open.MP
- Pawn.CMD (or another command processor)
- Player admin/auth system (for access control)
- Southclaws – Original noclip codebase
- xWendorion – Refactor, optimization, include version
MIT This include is open-source and free to use, modify, and redistribute.