Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion addons/sourcemod/scripting/FunModes.sp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public Plugin myinfo =
name = "FunModes",
author = "Dolly",
description = "bunch of fun modes for ze mode",
version = "1.4.7",
version = "1.4.8",
url = "https://nide.gg"
}

Expand Down Expand Up @@ -302,9 +302,28 @@ public void OnMapStart()

public void OnMapEnd()
{
/* RLGL Timers */
g_hRLGLTimer = null;
g_hRLGLDetectTimer = null;
g_hRLGLWarningTime = null;

/* VIPMode Timers */
g_hKillAllTimer = null;
g_hVIPRoundStartTimer = null;
for (int i = 1; i <= MaxClients; i++)
{
// VIP Beacon Timer
g_hVIPBeaconTimer[i] = null;

// Healbeacon beacon timer
g_hBeaconTimer[i] = null;
}

/* Healbeacon Timers */
g_hRoundStart_Timer[0] = null;
g_hRoundStart_Timer[1] = null;
g_hDamageTimer = null;
g_hHealTimer = null;
}

public void OnClientPutInServer(int client)
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/Fun_Modes/Fog.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stock void PluginStart_Fog()

stock void PlayerSpawn_Fog(int userid)
{
CreateTimer(1.0, PlayerSpawn_Timer, userid);
CreateTimer(1.0, PlayerSpawn_Timer, userid, TIMER_FLAG_NO_MAPCHANGE);
}

Action PlayerSpawn_Timer(Handle timer, int userid)
Expand Down
10 changes: 5 additions & 5 deletions addons/sourcemod/scripting/Fun_Modes/HealBeacon.sp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ stock void RoundStart_HealBeacon()
g_iCounter = 0;

/* LETS CREATE THE FIRST ROUND START TIMER */
g_hRoundStart_Timer[0] = CreateTimer(g_cvHealBeaconTimer.FloatValue, RoundStart_Timer);
g_hRoundStart_Timer[0] = CreateTimer(g_cvHealBeaconTimer.FloatValue, RoundStart_Timer, _, TIMER_FLAG_NO_MAPCHANGE);
}

stock void PlayerDeath_HealBeacon(int userid)
Expand Down Expand Up @@ -117,7 +117,7 @@ Action RoundStart_Timer(Handle timer)

/* Delete the previous timer handler if found so we dont assign a new CreateTimer over the old one */
delete g_hRoundStart_Timer[1];
g_hRoundStart_Timer[1] = CreateTimer(1.0, RoundStart_CountTimer, _, TIMER_REPEAT);
g_hRoundStart_Timer[1] = CreateTimer(1.0, RoundStart_CountTimer, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
return Plugin_Stop;
}

Expand Down Expand Up @@ -185,7 +185,7 @@ stock void SetHealBeaconToClient(int client)

/* BEACON THE PLAYER */
delete g_hBeaconTimer[client];
g_hBeaconTimer[client] = CreateTimer(0.1, HealBeacon_BeaconTimer, GetClientUserId(client), TIMER_REPEAT);
g_hBeaconTimer[client] = CreateTimer(0.1, HealBeacon_BeaconTimer, GetClientUserId(client), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);

/* Lets now push client indexes to the arraylist */
g_aHBPlayers.Push(client);
Expand All @@ -195,11 +195,11 @@ stock void HealBeacon_Setup()
{
/* Lets create the damage timer and delete the handle first so we dont get problems */
delete g_hDamageTimer;
g_hDamageTimer = CreateTimer(0.7, HealBeacon_DamageTimer, _, TIMER_REPEAT);
g_hDamageTimer = CreateTimer(0.7, HealBeacon_DamageTimer, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);

/* Lets create the heal timer and delete the handle first so we dont get problems */
delete g_hHealTimer;
g_hHealTimer = CreateTimer(1.0, HealBeacon_HealTimer, _, TIMER_REPEAT);
g_hHealTimer = CreateTimer(1.0, HealBeacon_HealTimer, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
}

Action HealBeacon_BeaconTimer(Handle timer, int userid)
Expand Down
12 changes: 7 additions & 5 deletions addons/sourcemod/scripting/Fun_Modes/VIPMode.sp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ stock void PlayerTeam_VIPMode(int userid, int team)

stock void ClientDisconnect_VIPMode(int client)
{
delete g_hVIPBeaconTimer[client];

if(!g_bIsVIPModeOn) {
return;
}
Expand All @@ -141,7 +143,7 @@ stock void ClientDisconnect_VIPMode(int client)
RemoveClientVIP(client, true, "VIPMode_VIPDeathDisconnect");

delete g_hKillAllTimer;
g_hKillAllTimer = CreateTimer(g_cvVIPModeCount.FloatValue, VIPMode_KillAllTimer);
g_hKillAllTimer = CreateTimer(g_cvVIPModeCount.FloatValue, VIPMode_KillAllTimer, _, TIMER_FLAG_NO_MAPCHANGE);
}

Action VIPMode_KillAllTimer(Handle timer)
Expand Down Expand Up @@ -183,7 +185,7 @@ stock void RoundStart_VIPMode()
}

delete g_hVIPRoundStartTimer;
g_hVIPRoundStartTimer = CreateTimer(g_cvVIPModeTimer.FloatValue, VIPRoundStart_Timer);
g_hVIPRoundStartTimer = CreateTimer(g_cvVIPModeTimer.FloatValue, VIPRoundStart_Timer, _, TIMER_FLAG_NO_MAPCHANGE);
}

Action VIPRoundStart_Timer(Handle timer)
Expand Down Expand Up @@ -307,7 +309,7 @@ Action Cmd_SetVIP(int client, int args)
CPrintToChatAll("%s {olive}%N {lightgreen}is a VIP!", VIPMode_Tag, target);

delete g_hVIPBeaconTimer[target];
g_hVIPBeaconTimer[target] = CreateTimer(1.0, VIP_BeaconTimer, GetClientUserId(target), TIMER_REPEAT);
g_hVIPBeaconTimer[target] = CreateTimer(1.0, VIP_BeaconTimer, GetClientUserId(target), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
return Plugin_Handled;
}

Expand Down Expand Up @@ -364,7 +366,7 @@ stock void RemoveClientVIP(int client, bool kill, const char[] translation = "")
CPrintToChatAll("%s %t", VIPMode_Tag, "VIPMode_KillAll", g_cvVIPModeCount.IntValue);

delete g_hKillAllTimer;
g_hKillAllTimer = CreateTimer(g_cvVIPModeCount.FloatValue, VIPMode_KillAllTimer);
g_hKillAllTimer = CreateTimer(g_cvVIPModeCount.FloatValue, VIPMode_KillAllTimer, _, TIMER_FLAG_NO_MAPCHANGE);
}
}

Expand Down Expand Up @@ -393,5 +395,5 @@ stock void VIP_PickRandom()
CPrintToChatAll("%s {olive}%N {lightgreen}is a VIP!", VIPMode_Tag, random);

delete g_hVIPBeaconTimer[random];
g_hVIPBeaconTimer[random] = CreateTimer(1.0, VIP_BeaconTimer, GetClientUserId(random), TIMER_REPEAT);
g_hVIPBeaconTimer[random] = CreateTimer(1.0, VIP_BeaconTimer, GetClientUserId(random), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
}