nomi-nonsz 40bae25c28
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
change data type, idk about sp
2025-07-30 14:19:31 +07:00

36 lines
974 B
SourcePawn

#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;
}
MoveType 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;
}