From a4f8717c42ca16a5209b29159d25b6854778ce11 Mon Sep 17 00:00:00 2001 From: nomi-nonsz Date: Tue, 29 Jul 2025 16:43:50 +0700 Subject: [PATCH] add noclip, not sure to compile --- README.md | 3 +++ scripting/admmingod.sp | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 README.md create mode 100644 scripting/admmingod.sp diff --git a/README.md b/README.md new file mode 100644 index 0000000..1d33c5e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# AdminGOD Plugins + +You have a right to control the server \ No newline at end of file diff --git a/scripting/admmingod.sp b/scripting/admmingod.sp new file mode 100644 index 0000000..f97406a --- /dev/null +++ b/scripting/admmingod.sp @@ -0,0 +1,35 @@ +#include +#include + +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; +}