add noclip, not sure to compile
This commit is contained in:
commit
a4f8717c42
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# AdminGOD Plugins
|
||||||
|
|
||||||
|
You have a right to control the server
|
35
scripting/admmingod.sp
Normal file
35
scripting/admmingod.sp
Normal 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;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user