Sort, Remove and Clean.
This commit is contained in:
parent
01ea902a8f
commit
997d1ec0e6
@ -19,6 +19,20 @@ public Plugin myinfo =
|
||||
version = "1.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
||||
{
|
||||
if(GetEngineVersion() != Engine_CSGO)
|
||||
{
|
||||
strcopy(error, err_max, "This plugin is only required on CS:GO!");
|
||||
return APLRes_Failure;
|
||||
}
|
||||
|
||||
return APLRes_Success;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -57,7 +71,7 @@ public void OnSpawnPost(int iClient)
|
||||
{
|
||||
if(!IsClientInGame(iClient) || IsClientObserver(iClient) || !IsPlayerAlive(iClient))
|
||||
return;
|
||||
|
||||
|
||||
if (GetEntPropEnt(iClient, Prop_Send, "m_hMyWearables") == INVALID_ENT_REFERENCE)
|
||||
{
|
||||
switch(GetClientTeam(iClient))
|
@ -7,12 +7,26 @@
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "Force CVars",
|
||||
name = "Force ConVars",
|
||||
author = "zaCade",
|
||||
description = "Force CVars to specific values.",
|
||||
description = "Force ConVars to specific values.",
|
||||
version = "1.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
||||
{
|
||||
if(GetEngineVersion() != Engine_CSGO)
|
||||
{
|
||||
strcopy(error, err_max, "This plugin is only required on CS:GO!");
|
||||
return APLRes_Failure;
|
||||
}
|
||||
|
||||
return APLRes_Success;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -29,15 +43,15 @@ public Action Command_ForceCVar(int args)
|
||||
char sArguments[2][128];
|
||||
GetCmdArg(1, sArguments[0], sizeof(sArguments[]));
|
||||
GetCmdArg(2, sArguments[1], sizeof(sArguments[]));
|
||||
|
||||
|
||||
ConVar CVar;
|
||||
if ((CVar = FindConVar(sArguments[0])) != null)
|
||||
{
|
||||
float fValue = StringToFloat(sArguments[1]);
|
||||
|
||||
|
||||
CVar.SetBounds(ConVarBound_Lower, true, fValue);
|
||||
CVar.SetBounds(ConVarBound_Upper, true, fValue);
|
||||
|
||||
|
||||
CVar.SetFloat(fValue, true, false);
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
#include <sourcemod>
|
||||
#include <sdkhooks>
|
||||
#include <sdktools>
|
||||
|
||||
#define MAXAMMO 10000
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "IncreaseReserveAmmo",
|
||||
author = "zaCade",
|
||||
description = "Feex volvo bullshiet!",
|
||||
version = "1.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnPluginStart()
|
||||
{
|
||||
for(int client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if(IsClientInGame(client) && !IsFakeClient(client))
|
||||
OnClientPutInServer(client);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnClientPutInServer(int client)
|
||||
{
|
||||
if (!IsFakeClient(client))
|
||||
{
|
||||
SDKHook(client, SDKHook_WeaponEquipPost, OnWeaponAction);
|
||||
SDKHook(client, SDKHook_WeaponDropPost, OnWeaponAction);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnWeaponAction(int client, int weapon)
|
||||
{
|
||||
if (IsValidEntity(weapon))
|
||||
{
|
||||
if (!HasEntProp(client, Prop_Send, "m_iAmmo"))
|
||||
return;
|
||||
|
||||
SetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount", MAXAMMO);
|
||||
SetEntProp(weapon, Prop_Send, "m_iSecondaryReserveAmmoCount", MAXAMMO);
|
||||
|
||||
int AmmoTypePrimary = GetEntProp(weapon, Prop_Data, "m_iPrimaryAmmoType");
|
||||
int AmmoTypeSecondary = GetEntProp(weapon, Prop_Data, "m_iSecondaryAmmoType");
|
||||
|
||||
// PrintToChatAll("Primary: %d | Secondary: %d", AmmoTypePrimary, AmmoTypeSecondary)
|
||||
|
||||
if (AmmoTypePrimary >= 0 && AmmoTypePrimary <= 13 || AmmoTypePrimary == 20)
|
||||
if (GetEntProp(client, Prop_Send, "m_iAmmo", _, AmmoTypePrimary) >= 0)
|
||||
SetEntProp(client, Prop_Send, "m_iAmmo", MAXAMMO, _, AmmoTypePrimary);
|
||||
|
||||
if (AmmoTypeSecondary >= 0 && AmmoTypeSecondary <= 13 || AmmoTypeSecondary == 20)
|
||||
if (GetEntProp(client, Prop_Send, "m_iAmmo", _, AmmoTypeSecondary) >= 0)
|
||||
SetEntProp(client, Prop_Send, "m_iAmmo", MAXAMMO, _, AmmoTypeSecondary);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
"chatfilters"
|
||||
{
|
||||
"#lennies"
|
||||
{
|
||||
"( ͡° ͜ʖ ͡°)" {}
|
||||
}
|
||||
"#entWatch"
|
||||
{
|
||||
"[entWatch]" {}
|
||||
}
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
#pragma newdecls required
|
||||
|
||||
#include <sourcemod>
|
||||
#include <regex>
|
||||
#include <ccc>
|
||||
|
||||
ArrayList g_aClientFilters[MAXPLAYERS+1];
|
||||
ArrayList g_aGroupFilters[MAXPLAYERS+1];
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "ChatFilter",
|
||||
author = "zaCade",
|
||||
description = "Allows users to filter their chat messages",
|
||||
version = "1.0.0"
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnPluginStart()
|
||||
{
|
||||
RegConsoleCmd("sm_cf", Command_ChatFilter);
|
||||
RegConsoleCmd("sm_cfg", Command_ChatFilterGroup);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (int client = 1; client <= MAXPLAYERS; client++)
|
||||
{
|
||||
g_aClientFilters[client] = new ArrayList(512);
|
||||
g_aGroupFilters[client] = new ArrayList(512);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnClientConnected(int client)
|
||||
{
|
||||
g_aClientFilters[client].Clear();
|
||||
g_aGroupFilters[client].Clear();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action Command_ChatFilter(int client, int args)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// g_aClientFilters[client].PushString(filter);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action Command_ChatFilterGroup(int client, int args)
|
||||
{
|
||||
|
||||
|
||||
|
||||
// ArrayList filters = new ArrayList(128);
|
||||
|
||||
|
||||
|
||||
// filters.PushString(filter);
|
||||
|
||||
|
||||
|
||||
// g_aGroupFilters[client].Push(filters);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action CCC_OnChatMessage(int client, int author, const char[] message)
|
||||
{
|
||||
bool bBlockMessage = false;
|
||||
|
||||
// Check the clients own filter list.
|
||||
if (!bBlockMessage && g_aClientFilters[client].Length)
|
||||
{
|
||||
for (int filterID; filterID < g_aClientFilters[client].Length; filterID++)
|
||||
{
|
||||
char filter[128];
|
||||
g_aClientFilters[client].GetString(filterID, filter, sizeof(filter));
|
||||
|
||||
if (StrContains(message, filter, false))
|
||||
{
|
||||
bBlockMessage = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check the clients group filter lists.
|
||||
if (!bBlockMessage && g_aGroupFilters[client].Length)
|
||||
{
|
||||
for (int groupID; groupID < g_aGroupFilters[client].Length; groupID++)
|
||||
{
|
||||
ArrayList filters = g_aGroupFilters[client].Get(groupID);
|
||||
|
||||
if (filters.Length)
|
||||
{
|
||||
for (int filterID; filterID < filters.Length; filterID++)
|
||||
{
|
||||
char filter[128];
|
||||
filters.GetString(filterID, filter, sizeof(filter));
|
||||
|
||||
if (StrContains(message, filter, false))
|
||||
{
|
||||
bBlockMessage = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (bBlockMessage) ? Plugin_Handled : Plugin_Continue;
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
#include <sourcemod>
|
||||
#include <cstrike>
|
||||
#include <zombiereloaded>
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "InfectionExploitFix",
|
||||
author = "zaCade & Neon",
|
||||
description = "Fixes Infection Dodge Exploit",
|
||||
version = "1.0",
|
||||
url = ""
|
||||
}
|
||||
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
bool g_bZombieSpawned = false;
|
||||
bool g_bCriticalWindow = false;
|
||||
|
||||
Handle g_hTimerHandle = INVALID_HANDLE;
|
||||
|
||||
public void OnPluginStart()
|
||||
{
|
||||
HookEvent("player_spawn", OnPlayerSpawn, EventHookMode_Post);
|
||||
HookEvent("round_freeze_end", OnRoundStart, EventHookMode_PostNoCopy);
|
||||
HookEvent("round_end", OnRoundEnd, EventHookMode_PostNoCopy);
|
||||
}
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
g_bZombieSpawned = false;
|
||||
g_bCriticalWindow = false;
|
||||
}
|
||||
|
||||
public void OnRoundStart(Event event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
g_hTimerHandle = CreateTimer(20.0, PreventSpawnExploitStop, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
|
||||
|
||||
g_bZombieSpawned = false;
|
||||
g_bCriticalWindow = true;
|
||||
}
|
||||
|
||||
public void OnRoundEnd(Event event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
if (g_hTimerHandle != INVALID_HANDLE && KillTimer(g_hTimerHandle))
|
||||
g_hTimerHandle = INVALID_HANDLE;
|
||||
|
||||
g_bZombieSpawned = false;
|
||||
g_bCriticalWindow = false;
|
||||
}
|
||||
|
||||
public void OnPlayerSpawn(Event event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||
|
||||
if (g_bZombieSpawned && g_bCriticalWindow && GetClientTeam(client) >= CS_TEAM_T)
|
||||
RequestFrame(OnPlayerSpawnPost, client);
|
||||
}
|
||||
|
||||
public void OnPlayerSpawnPost(int client)
|
||||
{
|
||||
if (IsClientInGame(client) && IsPlayerAlive(client))
|
||||
ZR_InfectClient(client);
|
||||
}
|
||||
|
||||
public Action ZR_OnClientInfect(int &client, int &attacker, bool &motherInfect, bool &respawnOverride, bool &respawn)
|
||||
{
|
||||
if (!g_bZombieSpawned && motherInfect)
|
||||
g_bZombieSpawned = true;
|
||||
}
|
||||
|
||||
public Action PreventSpawnExploitStop(Handle timer)
|
||||
{
|
||||
if (g_hTimerHandle != INVALID_HANDLE)
|
||||
g_hTimerHandle = INVALID_HANDLE;
|
||||
|
||||
g_bCriticalWindow = false;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
#include <cstrike>
|
||||
#include <sourcemod>
|
||||
#include <zombiereloaded>
|
||||
#include "loghelper.inc"
|
||||
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
ConVar g_cvarMinimumStreak = null;
|
||||
ConVar g_cvarMaximumStreak = null;
|
||||
|
||||
bool g_bIsMotherZM[MAXPLAYERS+1] = false;
|
||||
int g_iKillStreak[MAXPLAYERS+1] = 0;
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "KillStreaks",
|
||||
author = "Neon",
|
||||
description = "Recreation of the original HLSTATS Killstreaks for Zombies only + new MotherZM-Win event",
|
||||
version = "1.1",
|
||||
url = "https://steamcommunity.com/id/n3ontm"
|
||||
};
|
||||
|
||||
public void OnPluginStart()
|
||||
{
|
||||
g_cvarMinimumStreak = CreateConVar("sm_killstreaks_min", "2", "amount of kills required for the lowest killstreak", 0, true, 0.0);
|
||||
g_cvarMaximumStreak = CreateConVar("sm_killstreaks_max", "12", "amount of kills required for the highest killstreak", 0, true, 0.0);
|
||||
|
||||
HookEvent("round_end", OnRoundEnding, EventHookMode_Pre);
|
||||
HookEvent("player_spawn", OnClientSpawn);
|
||||
HookEvent("player_death", OnClientDeath, EventHookMode_Pre);
|
||||
}
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
GetTeams();
|
||||
}
|
||||
|
||||
public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn)
|
||||
{
|
||||
if (motherInfect)
|
||||
g_bIsMotherZM[client] = true;
|
||||
|
||||
if (attacker > -1)
|
||||
g_iKillStreak[attacker] += 1;
|
||||
}
|
||||
|
||||
public void OnClientDisconnect(int client)
|
||||
{
|
||||
ResetClient(client);
|
||||
}
|
||||
|
||||
public void OnClientSpawn(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
int client = GetClientOfUserId(hEvent.GetInt("userid"));
|
||||
ResetClient(client);
|
||||
}
|
||||
|
||||
public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
int client = GetClientOfUserId(hEvent.GetInt("userid"));
|
||||
EndKillStreak(client);
|
||||
}
|
||||
|
||||
public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
int iReason = hEvent.GetInt("reason");
|
||||
|
||||
if (iReason != view_as<int>(CSRoundEnd_GameStart))
|
||||
{
|
||||
for (int client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if (IsValidClient(client))
|
||||
{
|
||||
if ((ZR_IsClientZombie(client)) && (g_bIsMotherZM[client]))
|
||||
LogPlayerEvent(client, "triggered", "ze_m_zombies_win");
|
||||
|
||||
EndKillStreak(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EndKillStreak(int client)
|
||||
{
|
||||
if (g_iKillStreak[client] >= g_cvarMinimumStreak.IntValue)
|
||||
{
|
||||
if (g_iKillStreak[client] > g_cvarMaximumStreak.IntValue)
|
||||
g_iKillStreak[client] = g_cvarMaximumStreak.IntValue;
|
||||
|
||||
char StrEventName[32];
|
||||
if(g_bIsMotherZM[client])
|
||||
{
|
||||
Format(StrEventName, sizeof(StrEventName), "ze_m_kill_streak_%d", g_iKillStreak[client]);
|
||||
LogPlayerEvent(client, "triggered", StrEventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(StrEventName, sizeof(StrEventName), "ze_kill_streak_%d", g_iKillStreak[client]);
|
||||
LogPlayerEvent(client, "triggered", StrEventName);
|
||||
}
|
||||
ResetClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetClient(int client)
|
||||
{
|
||||
g_bIsMotherZM[client] = false;
|
||||
g_iKillStreak[client] = 0;
|
||||
}
|
||||
|
||||
stock bool IsValidClient(int client)
|
||||
{
|
||||
return (client > 0 && client <= MaxClients && IsClientInGame(client) && IsPlayerAlive(client));
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
#include <sourcemod>
|
||||
#include <cstrike>
|
||||
#include <zombiereloaded>
|
||||
|
||||
bool G_bIsHuman[MAXPLAYERS+1];
|
||||
bool G_bIsZombie[MAXPLAYERS+1];
|
||||
|
||||
ConVar G_hCvar_Difficulty_Humans;
|
||||
ConVar G_hCvar_Difficulty_Zombies;
|
||||
ConVar G_hCvar_Difficulty_Humans_BlockTime;
|
||||
|
||||
Handle g_hHumanPointsTimer;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Plugin:myinfo =
|
||||
{
|
||||
name = "HLstatsX CE Difficulty",
|
||||
author = "zaCade + Neon",
|
||||
description = "Grant points to the winning team. (zombies/humans)",
|
||||
version = "1.2",
|
||||
url = ""
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public OnPluginStart()
|
||||
{
|
||||
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_Humans_BlockTime = CreateConVar("hlx_difficulty_humans_blocktime", "60", "", 0, true, 0.0, true, 180.0);
|
||||
|
||||
HookEvent("round_start", Event_RoundStart);
|
||||
HookEvent("round_end", Event_RoundEnd);
|
||||
|
||||
AutoExecConfig(true, "plugin.hlstatsx_difficulty");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn)
|
||||
{
|
||||
G_bIsHuman[client] = false;
|
||||
G_bIsZombie[client] = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public ZR_OnClientHumanPost(client, bool:respawn, bool:protect)
|
||||
{
|
||||
G_bIsHuman[client] = true;
|
||||
G_bIsZombie[client] = false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
|
||||
{
|
||||
if (g_hHumanPointsTimer != INVALID_HANDLE && CloseHandle(g_hHumanPointsTimer))
|
||||
g_hHumanPointsTimer = INVALID_HANDLE;
|
||||
|
||||
g_hHumanPointsTimer = CreateTimer(G_hCvar_Difficulty_Humans_BlockTime.FloatValue, OnHumanPointsTimer);
|
||||
|
||||
for (new client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
G_bIsHuman[client] = true;
|
||||
G_bIsZombie[client] = false;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
||||
{
|
||||
switch(GetEventInt(event, "winner"))
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action OnHumanPointsTimer(Handle timer)
|
||||
{
|
||||
g_hHumanPointsTimer = INVALID_HANDLE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action:OnHumansWin(Handle:timer)
|
||||
{
|
||||
if (g_hHumanPointsTimer != INVALID_HANDLE)
|
||||
{
|
||||
PrintToChatAll("[SM] Round ended too fast. Humans will not be rewarded for the Win.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (new client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
|
||||
{
|
||||
if (G_bIsHuman[client] && !G_bIsZombie[client])
|
||||
{
|
||||
new String:sAuthid[64];
|
||||
if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid)))
|
||||
Format(sAuthid, sizeof(sAuthid), "UNKNOWN");
|
||||
|
||||
LogToGame("\"%N<%d><%s><%s>\" triggered \"human_win_%i\"", client, GetClientUserId(client), sAuthid, "CT", G_hCvar_Difficulty_Humans.IntValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action:OnZombiesWin(Handle:timer)
|
||||
{
|
||||
for (new client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
|
||||
{
|
||||
if (G_bIsZombie[client] && !G_bIsHuman[client])
|
||||
{
|
||||
new String:sAuthid[64];
|
||||
if (!GetClientAuthString(client, sAuthid, sizeof(sAuthid)))
|
||||
Format(sAuthid, sizeof(sAuthid), "UNKNOWN");
|
||||
|
||||
LogToGame("\"%N<%d><%s><%s>\" triggered \"zombie_win_%i\"", client, GetClientUserId(client), sAuthid, "TERRORIST", G_hCvar_Difficulty_Zombies.IntValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
#if defined _No_Steam_Info_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _No_Steam_Info_included
|
||||
|
||||
enum RevEmu_PlayerType
|
||||
{
|
||||
ErrorGet = -1, //Failed determine PlayerType
|
||||
SteamLegitUser = 0,
|
||||
SteamCrackedUser,
|
||||
RevEmuUser,
|
||||
RevEmuUserOld,
|
||||
SettiSRCScanBot,
|
||||
RevEmuUserV74,
|
||||
RevEmuUserVeryOld,
|
||||
UnknownUser,
|
||||
Steam2Legit,
|
||||
Steam2Cracked
|
||||
};
|
||||
|
||||
/**
|
||||
* Checking if player is no-steam.
|
||||
* @param iClient Index player.
|
||||
* -
|
||||
* @return True if no-steam.
|
||||
* -
|
||||
* @error Invalid player index or player not in game or player is a bot.
|
||||
*/
|
||||
#pragma deprecated Use RevEmu_GetPlayerType instead
|
||||
native bool IsPlayerNoSteam(int iClient);
|
||||
|
||||
/**
|
||||
* Get the type of player
|
||||
* @param iClient Index player.
|
||||
* -
|
||||
* @return Returns RevEmu_PlayerType value.
|
||||
* -
|
||||
* @error Invalid player index or player not in game or player is bot.
|
||||
*/
|
||||
native RevEmu_PlayerType RevEmu_GetPlayerType(int iClient);
|
||||
|
||||
|
||||
public Extension __ext_No_Steam_Info =
|
||||
{
|
||||
name = "No_Steam_Info",
|
||||
file = "No_Steam_Info.ext",
|
||||
#if defined AUTOLOAD_EXTENSIONS
|
||||
autoload = 1,
|
||||
#else
|
||||
autoload = 0,
|
||||
#endif
|
||||
#if defined REQUIRE_EXTENSIONS
|
||||
required = 1,
|
||||
#else
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_EXTENSIONS
|
||||
public __ext_No_Steam_Info_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("IsPlayerNoSteam");
|
||||
MarkNativeAsOptional("RevEmu_GetPlayerType");
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user