add noclip, not sure to compile

This commit is contained in:
Nomi Nonsense (Nonszy) 2025-07-29 16:43:50 +07:00
commit a4f8717c42
2 changed files with 38 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# AdminGOD Plugins
You have a right to control the server

35
scripting/admmingod.sp Normal file
View File

@ -0,0 +1,35 @@
#include <sourcemod>
#include <sdktools>
public Plugin myinfo = {
name = "AdminGod",
author = "Nonszy",
description = "Admin-only ttols",
version = "1.0",
url = "https://gitea.nonszy.space/nomi-nonsz/left4dead2-admingod"
};
public void OnPluginStart() {
RegConsoleCmd("slot10", Cmd_Slot10);
}
public Action Cmd_Slot10(int client, int args) {
if (!IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Handled;
if (!CheckCommandAccess(client, "noclip_admin", ADMFLAG_GENERIC)) {
PrintToChat(client, "[SM] You do not have permission to use noclip.");
return Plugin_Handled;
}
int flags = GetEntityMoveType(client);
if (flags == MOVETYPE_NOCLIP) {
SetEntityMoveType(client, MOVETYPE_WALK);
PrintToChat(client, "[SM] Noclip OFF.");
} else {
SetEntityMoveType(client, MOVETYPE_NOCLIP);
PrintToChat(client, "[SM] Noclip ON.");
}
return Plugin_Handled;
}