Spring break cleanup.

Cleaning up all useless tabs, spaces, indents, you name it.
This commit is contained in:
zaCade 2018-07-23 17:06:03 +02:00
parent 0e8490f32f
commit c8b3433700
17 changed files with 925 additions and 962 deletions

View File

@ -27,11 +27,11 @@ char g_sStats[4096];
public Plugin myinfo = public Plugin myinfo =
{ {
name = "AntiBhopCheat", name = "AntiBhopCheat",
author = "BotoX", autho = "BotoX",
description = "Detect all kinds of bhop cheats", description = "Detect all kinds of bhop cheats",
version = "0.0", version = "0.0",
url = "" url = ""
}; };

View File

@ -22,11 +22,11 @@ Handle g_hCustomMessageFile2;
// Purpose: // Purpose:
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Plugin myinfo = { public Plugin myinfo = {
name = "Connect Announce", name = "Connect Announce",
author = "Neon + Botox", author = "Neon + Botox",
description = "Connect Announcer", description = "Connect Announcer",
version = "2.0", version = "2.0",
url = "" url = ""
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@ public Plugin myinfo =
author = "Neon", author = "Neon",
description = "", description = "",
version = "1.0.0", version = "1.0.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
}; };
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -49,11 +49,11 @@ int g_iLastReportID;
public Plugin myinfo = public Plugin myinfo =
{ {
name = "Discord core", name = "Discord core",
author = "Obus and Neon", author = "Obus and Neon",
description = "Chat- & Rcon-Support", description = "Chat- & Rcon-Support",
version = "1.2.0", version = "1.2.0",
url = "" url = ""
} }
public APLRes AskPluginLoad2(Handle hThis, bool bLate, char[] sError, int err_max) public APLRes AskPluginLoad2(Handle hThis, bool bLate, char[] sError, int err_max)

View File

@ -4,11 +4,11 @@
public Plugin myinfo = public Plugin myinfo =
{ {
name = "InfectionExploitFix", name = "InfectionExploitFix",
author = "zaCade & Neon", author = "zaCade & Neon",
description = "Fixes Infection Dodge Exploit", description = "Fixes Infection Dodge Exploit",
version = "1.0", version = "1.0",
url = "" url = ""
} }
#pragma semicolon 1 #pragma semicolon 1

View File

@ -19,7 +19,7 @@ public Plugin myinfo =
author = "Neon", author = "Neon",
description = "", description = "",
version = "1.0.0", version = "1.0.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
}; };
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -14,11 +14,11 @@ int g_iKillStreak[MAXPLAYERS+1] = 0;
public Plugin myinfo = public Plugin myinfo =
{ {
name = "KillStreaks", name = "KillStreaks",
author = "Neon", author = "Neon",
description = "Recreation of the original HLSTATS Killstreaks for Zombies only + new MotherZM-Win event", description = "Recreation of the original HLSTATS Killstreaks for Zombies only + new MotherZM-Win event",
version = "1.1", version = "1.1",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
}; };
public void OnPluginStart() public void OnPluginStart()

View File

@ -2,110 +2,84 @@
#include <cstrike> #include <cstrike>
#include <zombiereloaded> #include <zombiereloaded>
new bool:G_bIsHuman[66]; new bool:G_bIsHuman[MAXPLAYERS+1];
new bool:G_bIsZombie[66]; new bool:G_bIsZombie[MAXPLAYERS+1];
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo = public Plugin myinfo =
{ {
name = "MVP_Stars", name = "MVP_Stars",
author = "zaCade", author = "zaCade",
description = "", description = "",
version = "1.0", version = "1.0",
url = "" url = ""
}; };
public void OnPluginStart() //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public OnPluginStart()
{ {
HookEvent("round_start", Event_RoundStart, EventHookMode:1); HookEvent("round_start", Event_RoundStart);
HookEvent("round_end", Event_RoundEnd, EventHookMode:1); HookEvent("round_end", Event_RoundEnd);
} }
public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn)
{ {
G_bIsHuman[client] = 0; G_bIsHuman[client] = false;
G_bIsZombie[client] = 1; G_bIsZombie[client] = true;
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientHumanPost(client, bool:respawn, bool:protect) public ZR_OnClientHumanPost(client, bool:respawn, bool:protect)
{ {
G_bIsHuman[client] = 1; G_bIsHuman[client] = true;
G_bIsZombie[client] = 0; G_bIsZombie[client] = false;
} }
public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{ {
new client = 1; for (new client = 1; client <= MaxClients; client++)
while (client <= MaxClients)
{ {
G_bIsHuman[client] = 1; G_bIsHuman[client] = true;
G_bIsZombie[client] = 0; G_bIsZombie[client] = false;
client++;
} }
return Action:0;
} }
public Action:Event_RoundEnd(Handle:event, String:name[], bool:dontBroadcast) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{ {
switch (GetEventInt(event, "winner")) switch(GetEventInt(event, "winner"))
{ {
case 2: case(CS_TEAM_CT): CreateTimer(0.2, OnHumansWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
{
CreateTimer(0.2, OnZombiesWin, any:0, 2);
}
case 3:
{
CreateTimer(0.2, OnHumansWin, any:0, 2);
}
default:
{
}
} }
return Action:0;
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:OnHumansWin(Handle:timer) public Action:OnHumansWin(Handle:timer)
{ {
new client = 1; for (new client = 1; client <= MaxClients; client++)
while (client <= MaxClients)
{ {
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{ {
new var2;
if (G_bIsHuman[client] && !G_bIsZombie[client]) if (G_bIsHuman[client] && !G_bIsZombie[client])
{ {
CS_SetMVPCount(client, CS_GetMVPCount(client) + 1); CS_SetMVPCount(client, CS_GetMVPCount(client) + 1);
new String:sAuthID[64];
if (!GetClientAuthString(client, sAuthID, 64, true))
{
Format(sAuthID, 64, "UNKNOWN");
}
} }
} }
client++;
} }
return Action:0;
}
public Action:OnZombiesWin(Handle:timer)
{
new client = 1;
while (client <= MaxClients)
{
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{
new var2;
if (G_bIsZombie[client] && !G_bIsHuman[client])
{
new String:sAuthID[64];
if (!GetClientAuthString(client, sAuthID, 64, true))
{
Format(sAuthID, 64, "UNKNOWN");
}
}
}
client++;
}
return Action:0;
} }

View File

@ -9,11 +9,11 @@
public Plugin myinfo = public Plugin myinfo =
{ {
name = "MakoVoteSystem", name = "MakoVoteSystem",
author = "Neon", author = "Neon",
description = "MakoVoteSystem", description = "MakoVoteSystem",
version = "1.0", version = "1.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
} }
#define NUMBEROFSTAGES 6 #define NUMBEROFSTAGES 6

View File

@ -18,11 +18,11 @@ ConVar g_cCD;
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Plugin myinfo = public Plugin myinfo =
{ {
name = "Trigger Rewards", name = "Trigger Rewards",
author = "Neon", author = "Neon",
description = "HLSTATS Trigger Rewards", description = "HLSTATS Trigger Rewards",
version = "1.0", version = "1.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
}; };
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -30,12 +30,12 @@ public Plugin myinfo =
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnPluginStart() public void OnPluginStart()
{ {
g_cCD = CreateConVar("sm_trigger_reward_cd", "10.0", "Cooldown between HLSTATS Trigger rewards", 0, true, 0.1); g_cCD = CreateConVar("sm_trigger_reward_cd", "10.0", "Cooldown between HLSTATS Trigger rewards", 0, true, 0.1);
AutoExecConfig(true, "plugin.TriggerRewards"); AutoExecConfig(true, "plugin.TriggerRewards");
HookEvent("round_start", OnRoundStart); HookEvent("round_start", OnRoundStart);
HookEntityOutput("trigger_once", "OnStartTouch", OnStartTouch); HookEntityOutput("trigger_once", "OnStartTouch", OnStartTouch);
HookEntityOutput("func_button", "OnPressed", OnPressed); HookEntityOutput("func_button", "OnPressed", OnPressed);
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -51,7 +51,7 @@ public void OnMapStart()
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Action OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) public Action OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
{ {
for(int i = 0; i <= 2047; i++) for(int i = 0; i < 2048; i++)
g_bDisabled[i] = false; g_bDisabled[i] = false;
} }
@ -60,13 +60,10 @@ public Action OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcas
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnStartTouch(const char[] sOutput, int iCaller, int iActivator, float fDelay) public void OnStartTouch(const char[] sOutput, int iCaller, int iActivator, float fDelay)
{ {
if (g_bDisabled[iCaller]) if (!IsValidClient(iActivator))
return; return;
if (g_bOnCD) if (g_bDisabled[iCaller] || g_bOnCD)
return;
if(!(1<=iActivator<= MaxClients ) || (iCaller == -1) || (!IsClientInGame(iActivator)) || !IsPlayerAlive(iActivator) || !IsPlayerAlive(iActivator))
return; return;
if (!(ZR_IsClientHuman(iActivator))) if (!(ZR_IsClientHuman(iActivator)))
@ -88,26 +85,20 @@ public void OnPressed(const char[] sOutput, int iCaller, int iActivator, float f
if(!IsValidClient(iActivator)) if(!IsValidClient(iActivator))
return; return;
if (g_bDisabled[iCaller]) if (g_bDisabled[iCaller] || g_bOnCD)
return;
if (g_bOnCD)
return; return;
if (!(ZR_IsClientHuman(iActivator))) if (!(ZR_IsClientHuman(iActivator)))
return; return;
int iParent = -1; int iParent = INVALID_ENT_REFERENCE;
iParent = GetEntPropEnt(iCaller, Prop_Data, "m_hMoveParent"); if ((iParent = GetEntPropEnt(iCaller, Prop_Data, "m_hMoveParent")) != INVALID_ENT_REFERENCE)
if (iParent != -1)
{ {
char sClassname[64]; char sClassname[64];
GetEdictClassname(iParent, sClassname, sizeof(sClassname)); GetEdictClassname(iParent, sClassname, sizeof(sClassname));
if ((StrContains(sClassname, "weapon", false) != -1)) if (strncmp(sClassname, "weapon_", 7, false) == 0)
return; return;
} }
g_bDisabled[iCaller] = true; g_bDisabled[iCaller] = true;
@ -116,7 +107,6 @@ public void OnPressed(const char[] sOutput, int iCaller, int iActivator, float f
CreateTimer(g_cCD.FloatValue, ResetCD); CreateTimer(g_cCD.FloatValue, ResetCD);
LogPlayerEvent(iActivator, "triggered", "trigger"); LogPlayerEvent(iActivator, "triggered", "trigger");
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -132,8 +122,8 @@ public Action ResetCD(Handle timer)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public bool IsValidClient(int iClient) public bool IsValidClient(int iClient)
{ {
if ( !( 1 <= iClient <= MaxClients ) || !IsClientInGame(iClient) || !IsPlayerAlive(iClient)) if ( !( 1 <= iClient <= MaxClients ) || !IsClientInGame(iClient) || !IsPlayerAlive(iClient))
return false; return false;
return true; return true;
} }

View File

@ -9,11 +9,11 @@ ConVar g_cvFreeVIPDuration;
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Plugin myinfo = public Plugin myinfo =
{ {
name = "Unloze_VIP_Test", name = "Unloze_VIP_Test",
author = "Neon", author = "Neon",
description = "", description = "",
version = "1.0", version = "1.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -2,119 +2,118 @@
#include <cstrike> #include <cstrike>
#include <zombiereloaded> #include <zombiereloaded>
new bool:G_bIsHuman[66]; new bool:G_bIsHuman[MAXPLAYERS+1];
new bool:G_bIsZombie[66]; new bool:G_bIsZombie[MAXPLAYERS+1];
new Handle:G_hCvar_Difficulty_Humans; new Handle:G_hCvar_Difficulty_Humans;
new Handle:G_hCvar_Difficulty_Zombies; new Handle:G_hCvar_Difficulty_Zombies;
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin:myinfo = public Plugin:myinfo =
{ {
name = "HLstatsX CE Difficulty", name = "HLstatsX CE Difficulty",
author = "zaCade + Neon",
description = "Grant points to the winning team. (zombies/humans)", description = "Grant points to the winning team. (zombies/humans)",
author = "zaCade + Neon", version = "1.1",
version = "1.1", url = ""
url = ""
}; };
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public OnPluginStart() public OnPluginStart()
{ {
G_hCvar_Difficulty_Humans = CreateConVar("hlx_difficulty_humans", "0", "", 0, true, 0.0, true, 3.0); G_hCvar_Difficulty_Humans = CreateConVar("hlx_difficulty_humans", "0", "", 0, true, 0.0, true, 3.0);
G_hCvar_Difficulty_Zombies = CreateConVar("hlx_difficulty_zombies", "0", "", 0, true, 0.0, true, 3.0); G_hCvar_Difficulty_Zombies = CreateConVar("hlx_difficulty_zombies", "0", "", 0, true, 0.0, true, 3.0);
HookEvent("round_start", Event_RoundStart, EventHookMode:1);
HookEvent("round_end", Event_RoundEnd, EventHookMode:1); HookEvent("round_start", Event_RoundStart);
HookEvent("round_end", Event_RoundEnd);
AutoExecConfig(true, "plugin.hlstatsx_difficulty"); AutoExecConfig(true, "plugin.hlstatsx_difficulty");
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn) public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn)
{ {
G_bIsHuman[client] = 0; G_bIsHuman[client] = false;
G_bIsZombie[client] = 1; G_bIsZombie[client] = true;
} }
public void ZR_OnClientHumanPost(int client, bool respawn, bool protect) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientHumanPost(client, bool:respawn, bool:protect)
{ {
G_bIsHuman[client] = 1; G_bIsHuman[client] = true;
G_bIsZombie[client] = 0; G_bIsZombie[client] = false;
} }
public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{ {
new client = 1; for (new client = 1; client <= MaxClients; client++)
while (client <= MaxClients)
{ {
G_bIsHuman[client] = 1; G_bIsHuman[client] = true;
G_bIsZombie[client] = 0; G_bIsZombie[client] = false;
client++;
} }
return Action:0;
} }
public Action:Event_RoundEnd(Handle:event, String:name[], bool:dontBroadcast) //----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{ {
switch (GetEventInt(event, "winner")) switch(GetEventInt(event, "winner"))
{ {
case 2: case(CS_TEAM_CT): CreateTimer(0.2, OnHumansWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
{ case(CS_TEAM_T): CreateTimer(0.2, OnZombiesWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(0.2, OnZombiesWin, any:0, 2);
}
case 3:
{
CreateTimer(0.2, OnHumansWin, any:0, 2);
}
default:
{
}
} }
return Action:0;
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:OnHumansWin(Handle:timer) public Action:OnHumansWin(Handle:timer)
{ {
new client = 1; for (new client = 1; client <= MaxClients; client++)
while (client <= MaxClients)
{ {
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{ {
new var2;
if (G_bIsHuman[client] && !G_bIsZombie[client]) if (G_bIsHuman[client] && !G_bIsZombie[client])
{ {
//CS_SetMVPCount(client, CS_GetMVPCount(client) + 1); new String:sAuthid[64];
new String:sAuthID[64]; if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid)))
if (!GetClientAuthString(client, sAuthID, 64, true)) Format(sAuthid, sizeof(sAuthid), "UNKNOWN");
{
Format(sAuthID, 64, "UNKNOWN"); LogToGame("\"%N<%d><%s><%s>\" triggered \"human_win_%i\"", client, GetClientUserId(client), sAuthid, "CT", GetConVarInt(G_hCvar_Difficulty_Humans));
}
LogToGame("\"%N<%d><%s><%s>\" triggered \"human_win_%i\"", client, GetClientUserId(client), sAuthID, "CT", GetConVarInt(G_hCvar_Difficulty_Humans));
} }
} }
client++;
} }
return Action:0;
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:OnZombiesWin(Handle:timer) public Action:OnZombiesWin(Handle:timer)
{ {
new client = 1; for (new client = 1; client <= MaxClients; client++)
while (client <= MaxClients)
{ {
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client)) if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{ {
new var2;
if (G_bIsZombie[client] && !G_bIsHuman[client]) if (G_bIsZombie[client] && !G_bIsHuman[client])
{ {
new String:sAuthID[64]; new String:sAuthid[64];
if (!GetClientAuthString(client, sAuthID, 64, true)) if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid)))
{ Format(sAuthid, sizeof(sAuthid), "UNKNOWN");
Format(sAuthID, 64, "UNKNOWN");
} LogToGame("\"%N<%d><%s><%s>\" triggered \"zombie_win_%i\"", client, GetClientUserId(client), sAuthid, "TERRORIST", GetConVarInt(G_hCvar_Difficulty_Zombies));
LogToGame("\"%N<%d><%s><%s>\" triggered \"zombie_win_%i\"", client, GetClientUserId(client), sAuthID, "TERRORIST", GetConVarInt(G_hCvar_Difficulty_Zombies));
} }
} }
client++;
} }
return Action:0;
} }

View File

@ -24,11 +24,11 @@ float g_fPropOrigin[3];
public Plugin myinfo = public Plugin myinfo =
{ {
name = "Unloze Season Event", name = "Unloze Season Event",
author = "Neon", author = "Neon",
description = "Unloze Season Event", description = "Unloze Season Event",
version = "1.1", version = "1.1",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
}; };
public void OnPluginStart() public void OnPluginStart()

View File

@ -4,11 +4,11 @@
public Plugin myinfo = public Plugin myinfo =
{ {
name = "ze_boatescape6_remix_fix2 Secret", name = "ze_boatescape6_remix_fix2 Secret",
author = "Neon", author = "Neon",
description = "Seagull + 2 different Endings", description = "Seagull + 2 different Endings",
version = "2.0", version = "2.0",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
} }
new float:g_fOrigin_Button5[3]; new float:g_fOrigin_Button5[3];