Compare commits

..

12 Commits

Author SHA1 Message Date
d0eb5012a3 Merge pull request 'Switching to drone pipeline' (#2) from new/drone-pipeline into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2
2025-08-19 10:47:01 +08:00
3a9be2f07d remove old file
All checks were successful
continuous-integration/drone/push Build is passing
2025-08-19 09:25:08 +07:00
4ec8966a06 i'm switching to drone bruh 2025-08-19 09:20:38 +07:00
61ec119c50 wrong syntax stupid woodpecker
Some checks are pending
ci/woodpecker/push/test-build Pipeline is pending
2025-08-16 23:26:02 +07:00
55a34ef36b add spawn command 2025-08-16 20:52:02 +07:00
c9ae3f3181 wrong cmd
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
2025-08-12 20:33:43 +07:00
9c983fbcee add client logger
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
2025-08-11 22:43:47 +07:00
317cefeb95 add give command
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
2025-08-11 22:41:13 +07:00
8bc6e3b9a3 fix noclip and add godmode 2025-08-11 22:37:17 +07:00
73e6c4c81b typo
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
2025-07-30 14:52:28 +07:00
40bae25c28 change data type, idk about sp
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
2025-07-30 14:19:31 +07:00
26c806d72d Add woodpecker pipeline (#1)
All checks were successful
ci/woodpecker/push/test-build Pipeline was successful
Reviewed-on: #1
Co-authored-by: nomi-nonsz <norman25.na@gmail.com>
Co-committed-by: nomi-nonsz <norman25.na@gmail.com>
2025-07-30 07:18:30 +00:00
3 changed files with 141 additions and 38 deletions

View File

@ -1,6 +1,13 @@
when:
- branch: [main, new/woodpecker-pipeline]
event: push
kind: pipeline
type: docker
name: default
trigger:
branch:
- main
- new/drone-pipeline
event:
- push
steps:
- name: getbuildtools

131
scripting/admingod.sp Normal file
View File

@ -0,0 +1,131 @@
#include <sourcemod>
#include <sdktools>
public Plugin myinfo = {
name = "AdminGod",
author = "Nonszy",
description = "Admin-only ttols",
version = "1.0.1",
url = "https://gitea.nonszy.space/nomi-nonsz/left4dead2-admingod"
};
bool g_bGodmode[MAXPLAYERS + 1];
public void OnClientPutInServer(int client)
{
if (!IsClientInGame(client) || IsFakeClient(client)) return;
char name[64];
char steamID[64];
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Steam2, steamID, sizeof(steamID));
PrintToServer("[ClientLogger] %s (%s) connected", name, steamID);
LogAction(client, -1, "%s (%s) has connected to the server", name, steamID);
}
public void OnPluginStart() {
RegAdminCmd("sm_quick_noclip", Command_QuickNoclip, ADMFLAG_SLAY|ADMFLAG_CHEATS);
RegAdminCmd("sm_god", Command_Godmode, ADMFLAG_SLAY|ADMFLAG_CHEATS);
RegAdminCmd("sm_give", Command_Give, ADMFLAG_SLAY|ADMFLAG_CHEATS);
RegAdminCmd("sm_spawn", Command_Spawn, ADMFLAG_SLAY|ADMFLAG_CHEATS);
}
public void ExecCommand(int client, char[] command) {
int flagsgive = GetCommandFlags("give");
int flagszspawn = GetCommandFlags("z_spawn_old");
SetCommandFlags("give", flagsgive & ~FCVAR_CHEAT);
SetCommandFlags("z_spawn_old", flagszspawn & ~FCVAR_CHEAT);
FakeClientCommand(client, command);
SetCommandFlags("give", flagsgive|FCVAR_CHEAT);
SetCommandFlags("z_spawn_old", flagsgive|FCVAR_CHEAT);
}
public Action Command_QuickNoclip(int client, int args) {
if (!IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Handled;
if (!CheckCommandAccess(client, "sm_noclip", ADMFLAG_CHEATS)) {
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;
}
public Action Command_Godmode(int client, int args)
{
if (!IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Handled;
g_bGodmode[client] = !g_bGodmode[client];
if (g_bGodmode[client])
{
SetEntProp(client, Prop_Data, "m_takedamage", 0);
PrintToChat(client, "[Godmode] (godmode ON)");
}
else
{
SetEntProp(client, Prop_Data, "m_takedamage", 2);
PrintToChat(client, "[Godmode] (godmode OFF)");
}
return Plugin_Handled;
}
public Action Command_Give(int client, int args)
{
if (!IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Handled;
if (args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_give <itemname>");
return Plugin_Handled;
}
char arg[64];
GetCmdArg(1, arg, sizeof(arg));
char cmd[64];
StrCat(cmd, sizeof(cmd), "give ");
StrCat(cmd, sizeof(cmd), arg);
ExecCommand(client, cmd);
return Plugin_Handled;
}
public Action Command_Spawn(int client, int args)
{
if (!IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Handled;
if (args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_spawn <entity>");
return Plugin_Handled;
}
char arg[64];
GetCmdArg(1, arg, sizeof(arg));
char cmd[64];
StrCat(cmd, sizeof(cmd), "z_spawn_old ");
StrCat(cmd, sizeof(cmd), arg);
ExecCommand(client, cmd);
return Plugin_Handled;
}

View File

@ -1,35 +0,0 @@
#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;
}