summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-04-26 21:30:30 +0200
committeraura <nw@moneybot.cc>2026-04-26 21:30:30 +0200
commit0f45999d7208f9288e6b38b6286a3f2a37e7c3dc (patch)
tree187558fda3de8ef05910c2fc8e2219247ad87acc
parent216c729c8762f4d0388d8750905a91fe1de64ccf (diff)
-rw-r--r--source/sourcemod/scripting/gokz-chat.sp2
-rw-r--r--source/sourcemod/scripting/gokz-core/misc.sp19
-rw-r--r--source/sourcemod/scripting/gokz-core/teleports.sp16
-rw-r--r--source/sourcemod/scripting/gokz-hud/tp_menu.sp24
-rw-r--r--source/sourcemod/scripting/gokz-saveloc.sp14
5 files changed, 45 insertions, 30 deletions
diff --git a/source/sourcemod/scripting/gokz-chat.sp b/source/sourcemod/scripting/gokz-chat.sp
index 38820f8..1558e2c 100644
--- a/source/sourcemod/scripting/gokz-chat.sp
+++ b/source/sourcemod/scripting/gokz-chat.sp
@@ -118,7 +118,7 @@ public Action OnPlayerDisconnect(Event event, const char[] name, bool dontBroadc
public Action OnPlayerJoinTeam(Event event, const char[] name, bool dontBroadcast) // player_team pre hook
{
- event.SetBool("silent", true); // Block join team messages
+ // event.SetBool("silent", true); // Block join team messages
return Plugin_Continue;
}
diff --git a/source/sourcemod/scripting/gokz-core/misc.sp b/source/sourcemod/scripting/gokz-core/misc.sp
index ae44a1d..6c322e9 100644
--- a/source/sourcemod/scripting/gokz-core/misc.sp
+++ b/source/sourcemod/scripting/gokz-core/misc.sp
@@ -208,7 +208,10 @@ void OnPlayerRunCmd_Turnbinds(int client, int buttons, int tickcount, float angl
void OnPlayerSpawn_PlayerCollision(int client)
{
// Let players go through other players
- // SetEntProp(client, Prop_Send, "m_CollisionGroup", GOKZ_COLLISION_GROUP_STANDARD);
+
+ int warmup = GameRules_GetProp( "m_bWarmupPeriod" );
+ if( warmup )
+ SetEntProp(client, Prop_Send, "m_CollisionGroup", GOKZ_COLLISION_GROUP_STANDARD);
}
void OnSetModel_PlayerCollision(int client)
@@ -348,13 +351,13 @@ void JoinTeam(int client, int newTeam, bool restorePos, bool forceBroadcast = fa
player.StopTimer();
// Just joining a team alone can put you into weird invalid spawns.
// Need to teleport the player to a valid one.
- float spawnOrigin[3];
- float spawnAngles[3];
- if (newTeam == CS_TEAM_CT)
- GetValidSpawnCT(spawnOrigin, spawnAngles);
- else
- GetValidSpawnT(spawnOrigin, spawnAngles);
- TeleportPlayer(client, spawnOrigin, spawnAngles);
+ // float spawnOrigin[3];
+ // float spawnAngles[3];
+ // if (newTeam == CS_TEAM_CT)
+ // GetValidSpawnCT(spawnOrigin, spawnAngles);
+ // else
+ // GetValidSpawnT(spawnOrigin, spawnAngles);
+ // TeleportPlayer(client, spawnOrigin, spawnAngles);
}
hasSavedPosition[client] = false;
Call_GOKZ_OnJoinTeam(client, newTeam);
diff --git a/source/sourcemod/scripting/gokz-core/teleports.sp b/source/sourcemod/scripting/gokz-core/teleports.sp
index 764fc6e..499a198 100644
--- a/source/sourcemod/scripting/gokz-core/teleports.sp
+++ b/source/sourcemod/scripting/gokz-core/teleports.sp
@@ -258,6 +258,15 @@ void TeleportToCheckpoint(int client)
bool CanTeleportToCheckpoint(int client, bool showError = false)
{
+ int warmup = GameRules_GetProp( "m_bWarmupPeriod" );
+ if( !warmup ) {
+ if( showError ) {
+ GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup");
+ GOKZ_PlayErrorSound(client);
+ }
+ return false;
+ }
+
// Safeguard Check
if (GOKZ_GetCoreOption(client, Option_Safeguard) == Safeguard_EnabledPRO && GOKZ_GetTimerRunning(client) && GOKZ_GetValidTimer(client) && GOKZ_GetTeleportCount(client) == 0)
{
@@ -399,6 +408,13 @@ bool CanNextCheckpoint(int client, bool showError = false)
bool CanTeleportToStart(int client, bool showError = false)
{
+ int warmup = GameRules_GetProp( "m_bWarmupPeriod" );
+ if( !warmup ) {
+ GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup");
+ GOKZ_PlayErrorSound(client);
+ return false;
+ }
+
// Safeguard Check
if (GOKZ_GetCoreOption(client, Option_Safeguard) > Safeguard_Disabled && GOKZ_GetTimerRunning(client) && GOKZ_GetValidTimer(client))
{
diff --git a/source/sourcemod/scripting/gokz-hud/tp_menu.sp b/source/sourcemod/scripting/gokz-hud/tp_menu.sp
index bb78f1e..6fe94de 100644
--- a/source/sourcemod/scripting/gokz-hud/tp_menu.sp
+++ b/source/sourcemod/scripting/gokz-hud/tp_menu.sp
@@ -236,26 +236,8 @@ static void TPMenuSetTitle(KZPlayer player, Menu menu, HUDInfo info)
static void TPMenuAddItems(KZPlayer player, Menu menu)
{
- switch (player.TPMenu)
- {
- case TPMenu_Simple:
- {
- TPMenuAddItemCheckpoint(player, menu);
- TPMenuAddItemTeleport(player, menu);
- TPMenuAddItemPause(player, menu);
- TPMenuAddItemStart(player, menu);
- }
- case TPMenu_Advanced:
- {
- TPMenuAddItemCheckpoint(player, menu);
- TPMenuAddItemTeleport(player, menu);
- TPMenuAddItemPrevCheckpoint(player, menu);
- TPMenuAddItemNextCheckpoint(player, menu);
- TPMenuAddItemUndo(player, menu);
- TPMenuAddItemPause(player, menu);
- TPMenuAddItemStart(player, menu);
- }
- }
+ TPMenuAddItemCheckpoint(player, menu);
+ TPMenuAddItemTeleport(player, menu);
}
static void TPMenuAddItemCheckpoint(KZPlayer player, Menu menu)
@@ -412,4 +394,4 @@ static void TPMenuAddItemStart(KZPlayer player, Menu menu)
FormatEx(display, sizeof(display), "%T", "TP Menu - Start", player.ID);
menu.AddItem(ITEM_INFO_START, display, ITEMDRAW_DEFAULT);
}
-} \ No newline at end of file
+}
diff --git a/source/sourcemod/scripting/gokz-saveloc.sp b/source/sourcemod/scripting/gokz-saveloc.sp
index 98d64c0..3c842cd 100644
--- a/source/sourcemod/scripting/gokz-saveloc.sp
+++ b/source/sourcemod/scripting/gokz-saveloc.sp
@@ -100,6 +100,13 @@ enum struct Location {
bool Load(int client)
{
+ int warmup = GameRules_GetProp( "m_bWarmupPeriod" );
+ if( !warmup ) {
+ GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup");
+ GOKZ_PlayErrorSound(client);
+ return false;
+ }
+
// Safeguard Check
if (GOKZ_GetCoreOption(client, Option_Safeguard) > Safeguard_Disabled && GOKZ_GetTimerRunning(client) && GOKZ_GetValidTimer(client))
{
@@ -627,6 +634,13 @@ void SaveLocation(int client, char[] name, int target)
bool LoadLocation(int client, int id)
{
+ int warmup = GameRules_GetProp( "m_bWarmupPeriod" );
+ if( !warmup ) {
+ GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup");
+ GOKZ_PlayErrorSound(client);
+ return false;
+ }
+
if (!IsPlayerAlive(client))
{
GOKZ_PrintToChat(client, true, "%t", "Must Be Alive");