diff --git a/.gitignore b/.gitignore index 65c98ed26..6e49244f3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,6 @@ $RECYCLE.BIN/ # ========================= # Operating System Files # ========================= -.vscode -.local -cfg/server_secret.cfg -addons/sourcemod/logs/ -cvars_secret.cfg \ No newline at end of file + +# Visual Studio Code files +/.vscode \ No newline at end of file diff --git a/addons/sourcemod/plugins/optional/l4d_tank_control_eq.smx b/addons/sourcemod/plugins/optional/l4d_tank_control_eq.smx index 16deebc99..d772e6f26 100644 Binary files a/addons/sourcemod/plugins/optional/l4d_tank_control_eq.smx and b/addons/sourcemod/plugins/optional/l4d_tank_control_eq.smx differ diff --git a/addons/sourcemod/plugins/optional/playermanagement.smx b/addons/sourcemod/plugins/optional/playermanagement.smx index c645b03e9..80de06223 100644 Binary files a/addons/sourcemod/plugins/optional/playermanagement.smx and b/addons/sourcemod/plugins/optional/playermanagement.smx differ diff --git a/addons/sourcemod/scripting/1v1.sp b/addons/sourcemod/scripting/1v1.sp index 07ef95dce..1d6f50218 100644 --- a/addons/sourcemod/scripting/1v1.sp +++ b/addons/sourcemod/scripting/1v1.sp @@ -47,7 +47,7 @@ public void OnPluginStart() HookEvent("player_hurt", Event_PlayerHurt, EventHookMode_Post); } -public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int fDamage = hEvent.GetInt("dmg_health"); if (fDamage < g_hCvarDmgThreshold.IntValue) { diff --git a/addons/sourcemod/scripting/1v1_skeetstats.sp b/addons/sourcemod/scripting/1v1_skeetstats.sp index 64486ae91..46cb0878e 100644 --- a/addons/sourcemod/scripting/1v1_skeetstats.sp +++ b/addons/sourcemod/scripting/1v1_skeetstats.sp @@ -249,12 +249,6 @@ public void OnPluginStart() } } -/* -public OnPluginEnd() -{ - // nothing -} -*/ public void OnClientPutInServer(int client) { char tmpBuffer[64]; @@ -274,7 +268,7 @@ public void OnClientPutInServer(int client) * convar changes (phase this out later) * ============== */ -public void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, const char[] newValue) +void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, const char[] newValue) { if (StringToInt(newValue) == 0) { @@ -286,7 +280,7 @@ public void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, con } } -public void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, const char[] newValue) +void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, const char[] newValue) { if (StringToInt(newValue) == 0) { @@ -298,12 +292,12 @@ public void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, co } } -public void ConVarChange_BrevityFlags(Handle cvar, const char[] oldValue, const char[] newValue) + void ConVarChange_BrevityFlags(Handle cvar, const char[] oldValue, const char[] newValue) { iBrevityFlags = StringToInt(newValue); } -public void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const char[] newValue) +void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const char[] newValue) { if (StringToInt(newValue) == 0) { @@ -315,7 +309,7 @@ public void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const cha } } -public void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const char[] newValue) +void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const char[] newValue) { iPounceDmgInt = StringToInt(newValue); } @@ -324,7 +318,7 @@ public void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const * map load / round start/end * ========================== */ -public Action PlayerLeftStartArea(Handle event, const char[] name, bool dontBroadcast) +Action PlayerLeftStartArea(Handle event, const char[] name, bool dontBroadcast) { iClientPlaying = GetCurrentSurvivor(); bPlayerLeftStartArea = true; // if RUP active, now we can start tracking @@ -346,7 +340,7 @@ public void OnMapEnd() bInRound = false; } -public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast) +void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast) { iClientPlaying = GetCurrentSurvivor(); bPlayerLeftStartArea = false; @@ -366,7 +360,7 @@ public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast } } -public void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast) +void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast) { // only show / log stuff when the round is done "the first time" if (bInRound) @@ -381,7 +375,7 @@ public void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast) * cmds / reports * ============== */ -public Action Say_Cmd(int client, int args) +Action Say_Cmd(int client, int args) { if (!client) { @@ -399,7 +393,7 @@ public Action Say_Cmd(int client, int args) return Plugin_Continue; } -public Action SkeetStat_Cmd(int client, int args) +Action SkeetStat_Cmd(int client, int args) { // FloatSub(GetEngineTime(), fPreviousShot[user]) < SHOTGUN_TIME // <-- use this to avoid the following from affecting stats.. maybe. ResolveOpenShots(); // make sure we're up to date (this *might* affect the stats, but it'd have to be insanely badly timed @@ -407,7 +401,7 @@ public Action SkeetStat_Cmd(int client, int args) return Plugin_Handled; } -public Action delayedSkeetStatPrint(Handle timer) +Action delayedSkeetStatPrint(Handle timer) { PrintSkeetStats(0); return Plugin_Continue; @@ -417,7 +411,7 @@ public Action delayedSkeetStatPrint(Handle timer) * track damage/kills & accuracy * ============================= */ -public void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast) +void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast) { int zombieClass = 0; @@ -507,7 +501,7 @@ public void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast } } -public void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadcast) +void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadcast) { // check user int userId = GetEventInt(event, "attacker"); @@ -646,7 +640,7 @@ public void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadca } } -public void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcast) +void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcast) { int zombieClass = 0; @@ -710,7 +704,7 @@ public void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcas } } -public void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadcast) +void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadcast) { int attackerId = GetEventInt(event, "attacker"); int attacker = GetClientOfUserId(attackerId); @@ -724,7 +718,7 @@ public void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadc } } -public void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadcast) +void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadcast) { // check user int userId = GetEventInt(event, "attacker"); @@ -748,7 +742,7 @@ public void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadca } // hunters pouncing / tracking -public void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast) +void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast) { // track hunters pouncing int userId = GetEventInt(event, "userid"); @@ -771,7 +765,7 @@ public void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast } } -public Action groundTouchTimer(Handle timer, int client) +Action groundTouchTimer(Handle timer, int client) { if (IsClientAndInGame(client) && (isGrounded(client) || !IsPlayerAlive(client))) { @@ -782,13 +776,13 @@ public Action groundTouchTimer(Handle timer, int client) return Plugin_Continue; } -public bool isGrounded(int client) +bool isGrounded(int client) { return (GetEntProp(client, Prop_Data, "m_fFlags") & FL_ONGROUND) > 0; } // accuracy: -public void WeaponFire_Event(Handle event, const char[] name, bool dontBroadcast) +void WeaponFire_Event(Handle event, const char[] name, bool dontBroadcast) { // check user int userId = GetEventInt(event, "userid"); @@ -1004,7 +998,7 @@ void PrintSkeetStats(int toClient) */ // resolve hits, for the final shotgun blasts before wipe/saferoom -public void ResolveOpenShots() + void ResolveOpenShots() { if (iClientPlaying <= 0) { diff --git a/addons/sourcemod/scripting/8ball.sp b/addons/sourcemod/scripting/8ball.sp index 2d527c04c..7fa51035b 100644 --- a/addons/sourcemod/scripting/8ball.sp +++ b/addons/sourcemod/scripting/8ball.sp @@ -19,7 +19,7 @@ public void OnPluginStart() RegConsoleCmd("sm_8ball", Command_8ball); } -public Action Command_8ball(int iClient, int iArgs) +Action Command_8ball(int iClient, int iArgs) { if (iArgs == 0) { @@ -63,4 +63,4 @@ public Action Command_8ball(int iClient, int iArgs) } return Plugin_Handled; -} \ No newline at end of file +} diff --git a/addons/sourcemod/scripting/MeleeInTheSafeRoom.sp b/addons/sourcemod/scripting/MeleeInTheSafeRoom.sp index 615813aa5..f290f1232 100644 --- a/addons/sourcemod/scripting/MeleeInTheSafeRoom.sp +++ b/addons/sourcemod/scripting/MeleeInTheSafeRoom.sp @@ -66,7 +66,7 @@ public OnPluginStart() RegAdminCmd("sm_melee", Command_SMMelee, ADMFLAG_KICK, "Lists all melee weapons spawnable in current campaign" ); } -public Action:Command_SMMelee(client, args) +Action:Command_SMMelee(client, args) { for( new i = 0; i < g_iMeleeClassCount; i++ ) { @@ -116,7 +116,7 @@ public OnMapStart() RemoveEdict(index); } -public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) +Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { if( !GetConVarBool( g_hEnabled ) ) return Plugin_Continue; @@ -131,7 +131,7 @@ public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroad return Plugin_Continue; } -public Action:Timer_SpawnMelee( Handle:timer ) +Action:Timer_SpawnMelee( Handle:timer ) { new client = GetInGameClient(); diff --git a/addons/sourcemod/scripting/aitankgank.sp b/addons/sourcemod/scripting/aitankgank.sp index c0be9c622..cfad3d28a 100644 --- a/addons/sourcemod/scripting/aitankgank.sp +++ b/addons/sourcemod/scripting/aitankgank.sp @@ -30,7 +30,7 @@ public void OnPluginStart() HookEvent("player_bot_replace", OnTankGoneAi); } -public void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iNewTank = GetClientOfUserId(hEvent.GetInt("bot")); @@ -45,7 +45,7 @@ public void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadc } } -public Action Timed_CheckAndKill(Handle hTimer, any iNewTank) +Action Timed_CheckAndKill(Handle hTimer, any iNewTank) { if (IsFakeClient(iNewTank) && IsPlayerAlive(iNewTank)) { ForcePlayerSuicide(iNewTank); diff --git a/addons/sourcemod/scripting/annoyance_exploit_fixes.sp b/addons/sourcemod/scripting/annoyance_exploit_fixes.sp index e5857819c..27aa4ffdd 100644 --- a/addons/sourcemod/scripting/annoyance_exploit_fixes.sp +++ b/addons/sourcemod/scripting/annoyance_exploit_fixes.sp @@ -55,7 +55,7 @@ public void OnCedapugEnded() g_bCedaGame = false; } -public Action Listener_CallVote(int client, const char[] command, int argc) +Action Listener_CallVote(int client, const char[] command, int argc) { if (!client || !IsClientInGame(client)) return Plugin_Handled; diff --git a/addons/sourcemod/scripting/autopause.sp b/addons/sourcemod/scripting/autopause.sp index 4fff5cd21..78d90d383 100644 --- a/addons/sourcemod/scripting/autopause.sp +++ b/addons/sourcemod/scripting/autopause.sp @@ -148,7 +148,7 @@ public void OnClientPutInServer(int client) } } -public void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast) { ClearTrie(crashedPlayers); ClearArray(generalCrashers); @@ -157,12 +157,12 @@ public void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast bRoundEnd = false; } -public void Event_RoundEnd(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_RoundEnd(Event hEvent, char[] sEventName, bool dontBroadcast) { bRoundEnd = true; } -public void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); @@ -239,7 +239,7 @@ public void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast } } -public void Event_PlayerDisconnect(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_PlayerDisconnect(Event hEvent, char[] sEventName, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); diff --git a/addons/sourcemod/scripting/bequiet.sp b/addons/sourcemod/scripting/bequiet.sp index 2e7047af1..befeb6dc5 100644 --- a/addons/sourcemod/scripting/bequiet.sp +++ b/addons/sourcemod/scripting/bequiet.sp @@ -46,7 +46,7 @@ public void OnPluginStart() LoadTranslations("bequiet.phrases"); } -public Action Say_Callback(int client, char[] command, int args) +Action Say_Callback(int client, char[] command, int args) { char sayWord[MAX_NAME_LENGTH]; GetCmdArg(1, sayWord, sizeof(sayWord)); @@ -58,7 +58,7 @@ public Action Say_Callback(int client, char[] command, int args) return Plugin_Continue; } -public Action TeamSay_Callback(int client, char[] command, int args) +Action TeamSay_Callback(int client, char[] command, int args) { char sayWord[MAX_NAME_LENGTH]; GetCmdArg(1, sayWord, sizeof(sayWord)); @@ -90,13 +90,13 @@ public Action TeamSay_Callback(int client, char[] command, int args) return Plugin_Continue; } -public Action Event_ServerConVar(Event event, const char[] name, bool dontBroadcast) +Action Event_ServerConVar(Event event, const char[] name, bool dontBroadcast) { if (bCvarChange) return Plugin_Handled; return Plugin_Continue; } -public Action Event_NameChange(Event event, const char[] name, bool dontBroadcast) +Action Event_NameChange(Event event, const char[] name, bool dontBroadcast) { int clientid = event.GetInt("userid"); int client = GetClientOfUserId(clientid); @@ -109,7 +109,7 @@ public Action Event_NameChange(Event event, const char[] name, bool dontBroadcas return Plugin_Continue; } -public void cvarChanged(Handle convar, const char[] oldValue, const char[] newValue) +void cvarChanged(Handle convar, const char[] oldValue, const char[] newValue) { bCvarChange = hCvarCvarChange.BoolValue; bNameChange = hCvarNameChange.BoolValue; @@ -117,7 +117,7 @@ public void cvarChanged(Handle convar, const char[] oldValue, const char[] newVa bSpecSeeChat = hCvarSpecSeeChat.BoolValue; } -stock bool IsValidClient(int client) +bool IsValidClient(int client) { if (client <= 0 || client > MaxClients || !IsClientConnected(client) || !IsClientInGame(client)) return false; return true; diff --git a/addons/sourcemod/scripting/blockheatseekingchargers.sp b/addons/sourcemod/scripting/blockheatseekingchargers.sp index 0aab38e50..82e12f82a 100644 --- a/addons/sourcemod/scripting/blockheatseekingchargers.sp +++ b/addons/sourcemod/scripting/blockheatseekingchargers.sp @@ -49,22 +49,22 @@ void ResetArray() } } -public void Event_Reset(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void Event_Reset(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { ResetArray(); } -public void Event_ChargeStart(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void Event_ChargeStart(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { IsInCharge[GetClientOfUserId(hEvent.GetInt("userid"))] = true; } -public void Event_ChargeEnd(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void Event_ChargeEnd(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { IsInCharge[GetClientOfUserId(hEvent.GetInt("userid"))] = false; } -public void BotReplacesPlayer(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void BotReplacesPlayer(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { int iClient = GetClientOfUserId(hEvent.GetInt("player")); if (iClient > 0 && IsInCharge[iClient]) { @@ -75,12 +75,12 @@ public void BotReplacesPlayer(Event hEvent, const char[] sEntityName, bool bDont } } -public void Event_OnPlayerSpawn(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void Event_OnPlayerSpawn(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { IsInCharge[GetClientOfUserId(hEvent.GetInt("userid"))] = false; } -public void Event_OnPlayerDeath(Event hEvent, const char[] sEntityName, bool bDontBroadcast) +void Event_OnPlayerDeath(Event hEvent, const char[] sEntityName, bool bDontBroadcast) { IsInCharge[GetClientOfUserId(hEvent.GetInt("userid"))] = false; } diff --git a/addons/sourcemod/scripting/blocktrolls.sp b/addons/sourcemod/scripting/blocktrolls.sp index 25b6bed1d..94775d3c5 100644 --- a/addons/sourcemod/scripting/blocktrolls.sp +++ b/addons/sourcemod/scripting/blocktrolls.sp @@ -53,7 +53,7 @@ public void OnMapStart() CreateTimer(40.0, EnableCallvoteTimer); } -public void OnPlayerJoin(Handle event, char[] name, bool dontBroadcast) +void OnPlayerJoin(Handle event, char[] name, bool dontBroadcast) { if (GetEventInt(event, "oldteam") == 0) { @@ -62,7 +62,7 @@ public void OnPlayerJoin(Handle event, char[] name, bool dontBroadcast) } } -public Action Vote_Listener(int client, const char[] command, int argc) +Action Vote_Listener(int client, const char[] command, int argc) { if (g_bBlockCallvote) { @@ -83,16 +83,7 @@ public Action Vote_Listener(int client, const char[] command, int argc) return Plugin_Continue; } -public Action CallvoteCallback(int client, int args) -{ - if (g_bBlockCallvote) - { - return Plugin_Handled; - } - return Plugin_Continue; -} - -public Action EnableCallvoteTimer(Handle timer) +Action EnableCallvoteTimer(Handle timer) { g_bBlockCallvote = false; return Plugin_Stop; diff --git a/addons/sourcemod/scripting/boomer_horde_equalizer.sp b/addons/sourcemod/scripting/boomer_horde_equalizer.sp index 403109faf..df74c689c 100644 --- a/addons/sourcemod/scripting/boomer_horde_equalizer.sp +++ b/addons/sourcemod/scripting/boomer_horde_equalizer.sp @@ -59,7 +59,7 @@ public Action L4D_OnSpawnITMob(int &iAmount) return Plugin_Changed; } -public void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CheckPatch(hConVar.BoolValue); } diff --git a/addons/sourcemod/scripting/boomer_horde_equalizer_refactored.sp b/addons/sourcemod/scripting/boomer_horde_equalizer_refactored.sp index 8aecaf0f1..e897bfcbb 100644 --- a/addons/sourcemod/scripting/boomer_horde_equalizer_refactored.sp +++ b/addons/sourcemod/scripting/boomer_horde_equalizer_refactored.sp @@ -110,7 +110,7 @@ public void OnPluginEnd() /* ================================================================================= CONVARS ================================================================================= */ -public void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CheckPatch(g_hPatchEnable.BoolValue); iMobSize = g_hMobMaxSize.IntValue; @@ -120,7 +120,7 @@ public void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] s /* ================================================================================= SERVER COMMANDS ================================================================================= */ -public Action ServerCmdSetBoomHorde(int args) +Action ServerCmdSetBoomHorde(int args) { // Check to make sure the arguments are set up right. if (args != 2) @@ -145,7 +145,7 @@ public Action ServerCmdSetBoomHorde(int args) /* ================================================================================= EVENTS ================================================================================= */ -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { // Just in case. BoomedSurvivorCount = 0; @@ -155,7 +155,7 @@ public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) } } -public void Event_PlayerBotReplace(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerBotReplace(Event event, const char[] name, bool dontBroadcast) { int player = GetClientOfUserId(event.GetInt("player")); @@ -171,7 +171,7 @@ public void Event_PlayerBotReplace(Event event, const char[] name, bool dontBroa } } -public void Event_BotPlayerReplace(Event event, const char[] name, bool dontBroadcast) +void Event_BotPlayerReplace(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")); @@ -187,7 +187,7 @@ public void Event_BotPlayerReplace(Event event, const char[] name, bool dontBroa } } -public void Event_PlayerBoomedExpired(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerBoomedExpired(Event event, const char[] name, bool dontBroadcast) { // This event only triggers on players (Bile bomb on SI or Boomer bile on Survivors) // Will only have to check if the player is a Survivor. diff --git a/addons/sourcemod/scripting/caster_assister.sp b/addons/sourcemod/scripting/caster_assister.sp index a33cf68fe..c04140d40 100644 --- a/addons/sourcemod/scripting/caster_assister.sp +++ b/addons/sourcemod/scripting/caster_assister.sp @@ -62,7 +62,7 @@ public void OnClientPutInServer(int client) } } -public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) { int team = event.GetInt("team"); if (team == 1) @@ -72,7 +72,7 @@ public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) } } -public Action SetSpecspeed_Cmd(int client, int args) +Action SetSpecspeed_Cmd(int client, int args) { if (GetClientTeam(client) != 1) { @@ -94,7 +94,7 @@ public Action SetSpecspeed_Cmd(int client, int args) return Plugin_Handled; } -public Action SetSpecspeedIncrement_Cmd(int client, int args) +Action SetSpecspeedIncrement_Cmd(int client, int args) { if (GetClientTeam(client) != 1) { @@ -112,7 +112,7 @@ public Action SetSpecspeedIncrement_Cmd(int client, int args) return Plugin_Handled; } -public Action IncreaseSpecspeed_Cmd(int client, int args) +Action IncreaseSpecspeed_Cmd(int client, int args) { if (GetClientTeam(client) != 1) { @@ -123,7 +123,7 @@ public Action IncreaseSpecspeed_Cmd(int client, int args) return Plugin_Handled; } -public Action DecreaseSpecspeed_Cmd(int client, int args) +Action DecreaseSpecspeed_Cmd(int client, int args) { if (GetClientTeam(client) != 1) { @@ -143,7 +143,7 @@ stock void IncreaseSpecspeed(int client, float difference) } } -public Action SetVerticalIncrement_Cmd(int client, int args) +Action SetVerticalIncrement_Cmd(int client, int args) { if (GetClientTeam(client) != 1) { diff --git a/addons/sourcemod/scripting/caster_system.sp b/addons/sourcemod/scripting/caster_system.sp index fb10c9622..3ea195095 100644 --- a/addons/sourcemod/scripting/caster_system.sp +++ b/addons/sourcemod/scripting/caster_system.sp @@ -89,13 +89,13 @@ void LoadPluginTranslation() // Natives // ======================== -public int Native_IsClientCaster(Handle plugin, int numParams) +int Native_IsClientCaster(Handle plugin, int numParams) { int client = GetNativeCell(1); return IsClientCaster(client); } -public int Native_IsIDCaster(Handle plugin, int numParams) +int Native_IsIDCaster(Handle plugin, int numParams) { char buffer[64]; GetNativeString(1, buffer, sizeof(buffer)); @@ -120,7 +120,7 @@ bool IsIDCaster(const char[] AuthID) // Caster Addons // ======================== -public void OnAddonsSettingChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnAddonsSettingChanged(ConVar convar, const char[] oldValue, const char[] newValue) { bool disable = !!StringToInt(newValue); bool previous = !!StringToInt(oldValue); @@ -163,7 +163,7 @@ public void OnAddonsSettingChanged(ConVar convar, const char[] oldValue, const c } } -public Action Timer_ReconnectCasters(Handle timer, ArrayList aList) +Action Timer_ReconnectCasters(Handle timer, ArrayList aList) { int size = aList.Length; for (int i = 0; i < size; i++) @@ -180,7 +180,7 @@ public Action L4D2_OnClientDisableAddons(const char[] SteamID) return (!g_hDisableAddons.BoolValue && IsIDCaster(SteamID)) ? Plugin_Handled : Plugin_Continue; } -public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) { if (event.GetInt("team") != L4D2Team_Spectator) { @@ -189,7 +189,7 @@ public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) } } -public Action CasterCheck(Handle timer, int userid) +Action CasterCheck(Handle timer, int userid) { int client = GetClientOfUserId(userid); if (client && IsClientInGame(client) && GetClientTeam(client) != L4D2Team_Spectator && IsClientCaster(client)) @@ -206,7 +206,7 @@ public Action CasterCheck(Handle timer, int userid) // Caster Registration // ======================== -public Action Cast_Cmd(int client, int args) +Action Cast_Cmd(int client, int args) { if (!client) return Plugin_Continue; @@ -237,7 +237,7 @@ public Action Cast_Cmd(int client, int args) return Plugin_Handled; } -public Action Caster_Cmd(int client, int args) +Action Caster_Cmd(int client, int args) { if (args < 1) { @@ -267,7 +267,7 @@ public Action Caster_Cmd(int client, int args) return Plugin_Handled; } -public Action NotCasting_Cmd(int client, int args) +Action NotCasting_Cmd(int client, int args) { char buffer[64]; @@ -315,14 +315,14 @@ public Action NotCasting_Cmd(int client, int args) return Plugin_Handled; } -public Action Reconnect(Handle timer, int client) +Action Reconnect(Handle timer, int client) { if (IsClientConnected(client)) ReconnectClient(client); return Plugin_Stop; } -public Action ResetCaster_Cmd(int client, int args) +Action ResetCaster_Cmd(int client, int args) { casterTrie.Clear(); forbidSelfRegister = false; @@ -330,7 +330,7 @@ public Action ResetCaster_Cmd(int client, int args) return Plugin_Handled; } -public Action AddCasterSteamID_Cmd(int client, int args) +Action AddCasterSteamID_Cmd(int client, int args) { char buffer[128]; GetCmdArg(1, buffer, sizeof(buffer)); @@ -347,7 +347,7 @@ public Action AddCasterSteamID_Cmd(int client, int args) return Plugin_Handled; } -public Action RemoveCasterSteamID_Cmd(int client, int args) +Action RemoveCasterSteamID_Cmd(int client, int args) { char buffer[128]; GetCmdArg(1, buffer, sizeof(buffer)); @@ -366,7 +366,7 @@ public Action RemoveCasterSteamID_Cmd(int client, int args) return Plugin_Handled; } -public Action PrintCasters_Cmd(int client, int args) +Action PrintCasters_Cmd(int client, int args) { StringMapSnapshot ss = allowedCastersTrie.Snapshot(); char buffer[128]; @@ -396,7 +396,7 @@ public Action PrintCasters_Cmd(int client, int args) // Kick Specs // ======================== -public Action KickSpecs_Cmd(int client, int args) +Action KickSpecs_Cmd(int client, int args) { AdminId id = GetUserAdmin(client); if (id != INVALID_ADMIN_ID && GetAdminFlag(id, Admin_Ban)) // Check for specific admin flag @@ -457,7 +457,7 @@ void StartKickSpecsVote(int client) FakeClientCommand(client, "Vote Yes"); } -public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) +void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { switch (action) { @@ -472,7 +472,7 @@ public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, } } -public void KickSpecsVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void KickSpecsVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { @@ -494,7 +494,7 @@ public void KickSpecsVoteResultHandler(Handle vote, int num_votes, int num_clien DisplayBuiltinVoteFail(vote, BuiltinVoteFail_Loses); } -public Action Timer_KickSpecs(Handle timer) +Action Timer_KickSpecs(Handle timer) { for (int i = 1; i <= MaxClients; i++) { diff --git a/addons/sourcemod/scripting/cfg_motd.sp b/addons/sourcemod/scripting/cfg_motd.sp index 72b11241e..df7456f4b 100644 --- a/addons/sourcemod/scripting/cfg_motd.sp +++ b/addons/sourcemod/scripting/cfg_motd.sp @@ -24,7 +24,7 @@ public OnPluginStart() RegConsoleCmd("sm_cfg", ShowMOTD, "Show a MOTD describing the current config"); } -public Action:ShowMOTD(client, args) +Action:ShowMOTD(client, args) { decl String:title[64], String:url[192]; diff --git a/addons/sourcemod/scripting/changelog.sp b/addons/sourcemod/scripting/changelog.sp index bd7302cbf..a3c16e8d1 100644 --- a/addons/sourcemod/scripting/changelog.sp +++ b/addons/sourcemod/scripting/changelog.sp @@ -20,7 +20,7 @@ public OnPluginStart() RegConsoleCmd("sm_changelog", ChangeLog_CMD); } -public Action:ChangeLog_CMD(client, args) +Action:ChangeLog_CMD(client, args) { new String:link[128]; GetConVarString(linkCVar, link, sizeof(link)); diff --git a/addons/sourcemod/scripting/charger_incap_damage.sp b/addons/sourcemod/scripting/charger_incap_damage.sp index 6bfdf5176..320dfe309 100644 --- a/addons/sourcemod/scripting/charger_incap_damage.sp +++ b/addons/sourcemod/scripting/charger_incap_damage.sp @@ -57,7 +57,7 @@ public void OnClientPostAdminCheck(int client) * GOT MY EYES ON YOU, DAMAGE * -------------------------------------- */ -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3]) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3]) { if (!inflictor || !attacker || !victim || !IsValidEdict(victim) || !IsValidEdict(inflictor)) { return Plugin_Continue; } diff --git a/addons/sourcemod/scripting/checkpoint-rage-control.sp b/addons/sourcemod/scripting/checkpoint-rage-control.sp index 82d91429e..7e0e3de5d 100644 --- a/addons/sourcemod/scripting/checkpoint-rage-control.sp +++ b/addons/sourcemod/scripting/checkpoint-rage-control.sp @@ -67,7 +67,7 @@ public void OnPluginStart() RegServerCmd("saferoom_frustration_tickdown", SetSaferoomFrustrationTickdown); } -public Action SetSaferoomFrustrationTickdown(int args) +Action SetSaferoomFrustrationTickdown(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); @@ -108,7 +108,7 @@ public void L4D_OnSpawnTank_Post(int client, const float vecPos[3], const float } -public void Event_EnteredStartArea(Event hEvent, const char[] sName, bool dontBroadcast) +void Event_EnteredStartArea(Event hEvent, const char[] sName, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(hEvent, "userid")); if (IsValidSurvivor(client)) @@ -122,13 +122,13 @@ public void Event_EnteredStartArea(Event hEvent, const char[] sName, bool dontBr } } -public void Event_RoundEndEvent(Event hEvent, const char[] sName, bool dontBroadcast) +void Event_RoundEndEvent(Event hEvent, const char[] sName, bool dontBroadcast) { DebugPrint("Unhook from round_end"); UnHookAll(); } -public void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcast) +void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); if (client > 0 && IsTank(client)) @@ -138,13 +138,13 @@ public void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcas } } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { DebugPrint("Unhook from round_start"); UnHookAll(); } -public void UnHookAll() +void UnHookAll() { UnhookEvent("player_entered_start_area", Event_EnteredStartArea); UnhookEvent("round_end", Event_RoundEndEvent); diff --git a/addons/sourcemod/scripting/christmas_surprise.sp b/addons/sourcemod/scripting/christmas_surprise.sp index ff880e8b1..0c83a2f55 100644 --- a/addons/sourcemod/scripting/christmas_surprise.sp +++ b/addons/sourcemod/scripting/christmas_surprise.sp @@ -43,7 +43,7 @@ public OnMapStart() CreateTimer(0.5, MakeSnow); } -public Action:MakeSnow(Handle:timer) +Action:MakeSnow(Handle:timer) { new iSnow = -1; while ((iSnow = FindEntityByClassname(iSnow , "func_precipitation")) != INVALID_ENT_REFERENCE) AcceptEntityInput(iSnow, "Kill"); @@ -70,7 +70,7 @@ public Action:MakeSnow(Handle:timer) } } -public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) +void Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { CreateTimer(0.7, MakeSnow); } \ No newline at end of file diff --git a/addons/sourcemod/scripting/code_patcher.sp b/addons/sourcemod/scripting/code_patcher.sp index 5b1d08725..277b69ce3 100644 --- a/addons/sourcemod/scripting/code_patcher.sp +++ b/addons/sourcemod/scripting/code_patcher.sp @@ -75,7 +75,7 @@ public void OnPluginEnd() } } -public Action CodePatchListCommand(int args) +Action CodePatchListCommand(int args) { char name[MAX_PATCH_NAME_LENGTH + 1]; char bytes[MAX_PATCH_SIZE]; @@ -102,7 +102,7 @@ public Action CodePatchListCommand(int args) return Plugin_Handled; } -public Action CodePatchPatchCommand(int args) +Action CodePatchPatchCommand(int args) { if (GetCmdArgs() != 1) { PrintToServer("syntax: codepatch_patch "); @@ -184,7 +184,7 @@ public Action CodePatchPatchCommand(int args) return Plugin_Handled; } -public Action CodePatchUnpatchCommand(int args) +Action CodePatchUnpatchCommand(int args) { if (GetCmdArgs() != 1) { PrintToServer("syntax: codepatch_unpatch "); @@ -383,7 +383,7 @@ static bool RevertPatch(const char[] name) } /* Natives */ -public int IsPatchApplied(Handle plugin, int numParams) +int IsPatchApplied(Handle plugin, int numParams) { int length; GetNativeStringLength(1, length); @@ -400,7 +400,7 @@ public int IsPatchApplied(Handle plugin, int numParams) return bIsPatchApplied; } -public int GetPatchAddress(Handle plugin, int numParams) +int GetPatchAddress(Handle plugin, int numParams) { int length; GetNativeStringLength(1, length); @@ -422,7 +422,7 @@ public int GetPatchAddress(Handle plugin, int numParams) return hPatchAddresses.Get(patchId); } -public int IsPlatformWindows(Handle plugin, int numParams) +int IsPlatformWindows(Handle plugin, int numParams) { return bIsWindows; } diff --git a/addons/sourcemod/scripting/coinflip.sp b/addons/sourcemod/scripting/coinflip.sp index 7a23140b1..4fa493051 100644 --- a/addons/sourcemod/scripting/coinflip.sp +++ b/addons/sourcemod/scripting/coinflip.sp @@ -40,7 +40,7 @@ public OnPluginStart() RegConsoleCmd("sm_picknumber", Command_Picknumber); } -public Action:Command_Coinflip(client, args) +Action:Command_Coinflip(client, args) { current_timeC = GetTime(); @@ -64,7 +64,7 @@ public Action:Command_Coinflip(client, args) return Plugin_Handled; } -public Action:Command_Picknumber(client, args) +Action:Command_Picknumber(client, args) { current_timeN = GetTime(); diff --git a/addons/sourcemod/scripting/current.sp b/addons/sourcemod/scripting/current.sp index 291d111eb..e2dee3fcf 100644 --- a/addons/sourcemod/scripting/current.sp +++ b/addons/sourcemod/scripting/current.sp @@ -25,7 +25,7 @@ public void OnPluginStart() RegConsoleCmd("sm_current", CurrentCmd); } -public Action CurrentCmd(int client, int args) +Action CurrentCmd(int client, int args) { int boss_proximity = RoundToNearest(GetBossProximity() * 100.0); PrintToChat(client, "\x01Current: \x04%d%%", boss_proximity); diff --git a/addons/sourcemod/scripting/eq_finale_tanks.sp b/addons/sourcemod/scripting/eq_finale_tanks.sp index 67d60c62d..b54637264 100644 --- a/addons/sourcemod/scripting/eq_finale_tanks.sp +++ b/addons/sourcemod/scripting/eq_finale_tanks.sp @@ -74,7 +74,7 @@ public void OnPluginStart() HookEvent("round_start", RoundStartEvent, EventHookMode_PostNoCopy); } -public Action SetMapFirstTankSpawningScheme(int args) +Action SetMapFirstTankSpawningScheme(int args) { if (args != 1) { PrintToServer("Usage: tank_map_flow_and_second_event "); @@ -89,7 +89,7 @@ public Action SetMapFirstTankSpawningScheme(int args) return Plugin_Handled; } -public Action SetMapSecondTankSpawningScheme(int args) +Action SetMapSecondTankSpawningScheme(int args) { if (args != 1) { PrintToServer("Usage: tank_map_only_first_event "); @@ -104,12 +104,12 @@ public Action SetMapSecondTankSpawningScheme(int args) return Plugin_Handled; } -public void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) +void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) { CreateTimer(8.0, ProcessTankSpawn, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action ProcessTankSpawn(Handle hTimer) +Action ProcessTankSpawn(Handle hTimer) { spawnScheme = Skip; tankCount = 0; diff --git a/addons/sourcemod/scripting/finale_tank_blocker.sp b/addons/sourcemod/scripting/finale_tank_blocker.sp index c5fbc9269..54e0a42dd 100644 --- a/addons/sourcemod/scripting/finale_tank_blocker.sp +++ b/addons/sourcemod/scripting/finale_tank_blocker.sp @@ -35,7 +35,7 @@ public void OnMapEnd() g_iTankCount[1] = 0; } -public Action SetFinaleExceptionMap(int iArgs) +Action SetFinaleExceptionMap(int iArgs) { if (iArgs != 1) { PrintToServer("Usage: finale_tank_default "); diff --git a/addons/sourcemod/scripting/finalefix.sp b/addons/sourcemod/scripting/finalefix.sp index 9e3f461f6..3ae179256 100644 --- a/addons/sourcemod/scripting/finalefix.sp +++ b/addons/sourcemod/scripting/finalefix.sp @@ -20,7 +20,7 @@ public void OnPluginStart() HookEvent("finale_vehicle_leaving", FinaleEnd_Event, EventHookMode_PostNoCopy); } -public void FinaleEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void FinaleEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (int i = 1; i <= MaxClients; i++) { if (IsClientInGame(i) && GetClientTeam(i) == TEAM_SURVIVOR && IsPlayerIncap(i)) { diff --git a/addons/sourcemod/scripting/fix_fastmelee.sp b/addons/sourcemod/scripting/fix_fastmelee.sp index 3b038e294..d1c298af1 100644 --- a/addons/sourcemod/scripting/fix_fastmelee.sp +++ b/addons/sourcemod/scripting/fix_fastmelee.sp @@ -57,7 +57,7 @@ public OnClientPutInServer(client) fLastMeleeSwing[client] = 0.0; } -public Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast) +Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if (client > 0 && !IsFakeClient(client)) @@ -71,7 +71,7 @@ public Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroad } } -public OnWeaponSwitched(client, weapon) +void OnWeaponSwitched(client, weapon) { if (!IsFakeClient(client) && IsValidEntity(weapon)) { diff --git a/addons/sourcemod/scripting/frozen_tank_fix.sp b/addons/sourcemod/scripting/frozen_tank_fix.sp index 5557c03de..46034821a 100644 --- a/addons/sourcemod/scripting/frozen_tank_fix.sp +++ b/addons/sourcemod/scripting/frozen_tank_fix.sp @@ -16,7 +16,7 @@ public OnPluginStart() CreateConVar("l4d2_fix_frozen_tank_version", PL_VERSION, "Frozen tank fix version", FCVAR_NOTIFY); } -public Event_PlayerIncap(Handle:event, const String:name[], bool:dontBroadcast) +void Event_PlayerIncap(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if (client > 0 && IsPlayerTank(client)) @@ -25,7 +25,7 @@ public Event_PlayerIncap(Handle:event, const String:name[], bool:dontBroadcast) } } -public Action:KillTank_tCallback(Handle:timer) +Action:KillTank_tCallback(Handle:timer) { for (new i = 1; i <= MaxClients; i++) { diff --git a/addons/sourcemod/scripting/ghost_hurt.sp b/addons/sourcemod/scripting/ghost_hurt.sp index 5b7896cd7..ceae7abc7 100644 --- a/addons/sourcemod/scripting/ghost_hurt.sp +++ b/addons/sourcemod/scripting/ghost_hurt.sp @@ -68,12 +68,12 @@ public void OnMapStart() DisableGhostHurt(); } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { DisableGhostHurt(); } -public Action Cmd_ResetGhostHurt(int iArgs) +Action Cmd_ResetGhostHurt(int iArgs) { DisableGhostHurt(); PrintToServer("DisableGhostHurt()"); diff --git a/addons/sourcemod/scripting/l4d2_ai_damagefix.sp b/addons/sourcemod/scripting/l4d2_ai_damagefix.sp index 819bebba0..7a17c5acd 100644 --- a/addons/sourcemod/scripting/l4d2_ai_damagefix.sp +++ b/addons/sourcemod/scripting/l4d2_ai_damagefix.sp @@ -119,17 +119,16 @@ public void OnPluginStart() } -public void OnAIDamageFixEnableChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnAIDamageFixEnableChanged(ConVar convar, const char[] oldValue, const char[] newValue) { fEnabled = StringToInt(newValue); } -public void OnPounceInterruptChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnPounceInterruptChanged(ConVar convar, const char[] oldValue, const char[] newValue) { iPounceInterrupt = StringToInt(newValue); } - public void OnClientPostAdminCheck(int client) { // hook bots spawning @@ -137,7 +136,7 @@ public void OnClientPostAdminCheck(int client) iHunterSkeetDamage[client] = 0; } -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { // Must be enabled, victim and attacker must be ingame, damage must be greater than 0, victim must be AI infected if (fEnabled && IsClientAndInGame(victim) && IsClientAndInGame(attacker) && damage > 0.0 && GetClientTeam(victim) == TEAM_INFECTED && IsFakeClient(victim)) @@ -175,7 +174,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam } // hunters pouncing / tracking -public void Event_AbilityUse(Event event, const char[] name, bool dontBroadcast) +void Event_AbilityUse(Event event, const char[] name, bool dontBroadcast) { // track hunters pouncing int client = GetClientOfUserId(event.GetInt("userid")); diff --git a/addons/sourcemod/scripting/l4d2_antibaiter.sp b/addons/sourcemod/scripting/l4d2_antibaiter.sp index 26869a17e..c264c0402 100644 --- a/addons/sourcemod/scripting/l4d2_antibaiter.sp +++ b/addons/sourcemod/scripting/l4d2_antibaiter.sp @@ -108,17 +108,17 @@ void InitGameData() delete hGamedata2; } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { IsRoundIsActive = false; } -public void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) { IsRoundIsActive = false; } -public void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) { //This event works great with the plugin readyup.smx (does not conflict) //This event works great in different game modes: versus, coop, scavenge and etc @@ -126,7 +126,7 @@ public void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadc StartRound(); } -public void Event_PlayerBiled(Event hEvent, const char[] name, bool dontBroadcast) +void Event_PlayerBiled(Event hEvent, const char[] name, bool dontBroadcast) { bool byBoom = hEvent.GetBool("by_boomer"); if (byBoom && hCvarStopTimerOnBile.BoolValue) @@ -145,7 +145,7 @@ public void OnRoundIsLive() } #if DEBUG -public Action RegisterSI(int client, int args) +Action RegisterSI(int client, int args) { StartRound(); return Plugin_Handled; @@ -192,7 +192,7 @@ public void OnConfigsExecuted() minProgress = hCvarMinProgressThreshold.FloatValue; } -public Action AntibaiterThink(Handle hTimer) +Action AntibaiterThink(Handle hTimer) { if (!IsRoundActive()) { return Plugin_Handled; diff --git a/addons/sourcemod/scripting/l4d2_blind_infected.sp b/addons/sourcemod/scripting/l4d2_blind_infected.sp index b5a173624..a5e7a761b 100644 --- a/addons/sourcemod/scripting/l4d2_blind_infected.sp +++ b/addons/sourcemod/scripting/l4d2_blind_infected.sp @@ -74,7 +74,7 @@ public void OnPluginStart() CreateTimer(ENT_CHECK_INTERVAL, Timer_EntCheck, _, TIMER_REPEAT); } -public Action Timer_EntCheck(Handle hTimer) +Action Timer_EntCheck(Handle hTimer) { char sTmp[PLATFORM_MAX_PATH]; int iCurrentEnt[eArray_Size], iEntity, iSize = g_hBlockedEntities.Length; @@ -94,14 +94,14 @@ public Action Timer_EntCheck(Handle hTimer) return Plugin_Continue; } -public void RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_hBlockedEntities.Clear(); CreateTimer(1.2, RoundStartDelay_Timer, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action RoundStartDelay_Timer(Handle hTimer) +Action RoundStartDelay_Timer(Handle hTimer) { int iWeapon; int iBhTemp[eArray_Size], iEntityCount = GetEntityCount(); @@ -127,7 +127,7 @@ public Action RoundStartDelay_Timer(Handle hTimer) return Plugin_Stop; } -public Action OnTransmit(int iEntity, int iClient) +Action OnTransmit(int iEntity, int iClient) { if (GetClientTeam(iClient) != L4D2Team_Infected) { return Plugin_Continue; @@ -196,7 +196,7 @@ bool IsVisibleTo(int iClient, int iEntity) // check an entity for being visible return bIsVisible; } -public bool TraceFilter(int iEntity, int iContentsMask) +bool TraceFilter(int iEntity, int iContentsMask) { if (iEntity <= MaxClients || !IsValidEntity(iEntity)) { // dont let WORLD, players, or invalid entities be hit return false; diff --git a/addons/sourcemod/scripting/l4d2_block_bot_pills.sp b/addons/sourcemod/scripting/l4d2_block_bot_pills.sp index 713a5f3a3..add938ca7 100644 --- a/addons/sourcemod/scripting/l4d2_block_bot_pills.sp +++ b/addons/sourcemod/scripting/l4d2_block_bot_pills.sp @@ -34,7 +34,7 @@ public void OnPluginStart() HookEvent("player_bot_replace", playerBotReplace_Event); } -public void playerBotReplace_Event(Event hEvent, char[] sEventName, bool dontBroadcast) +void playerBotReplace_Event(Event hEvent, char[] sEventName, bool dontBroadcast) { int bot = GetClientOfUserId(hEvent.GetInt("bot")); diff --git a/addons/sourcemod/scripting/l4d2_bw_rock_hit.sp b/addons/sourcemod/scripting/l4d2_bw_rock_hit.sp index 865ed32d8..723d21a92 100644 --- a/addons/sourcemod/scripting/l4d2_bw_rock_hit.sp +++ b/addons/sourcemod/scripting/l4d2_bw_rock_hit.sp @@ -97,7 +97,7 @@ void InitGameData() delete hGameData; } -public void CvarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void CvarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CvarsToType(); } @@ -119,7 +119,7 @@ public void OnClientDisconnect(int iClient) SDKUnhook(iClient, SDKHook_OnTakeDamage, OnTakeDamage); } -public Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype, +Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype, int &iWeapon, float fDamageForce[3], float fDamagePosition[3]) { if (iDamagetype != DMG_CLUB || !IsTankRock(iInflictor)) { @@ -203,7 +203,7 @@ void CTankRock__Detonate(int iTankRock) } #if DEBUG -public Action Cmd_DetonateRock(int iClient, int iArgs) +Action Cmd_DetonateRock(int iClient, int iArgs) { int iEntity = -1; while ((iEntity = FindEntityByClassname(iEntity, "tank_rock")) != -1) { diff --git a/addons/sourcemod/scripting/l4d2_byedoor.sp b/addons/sourcemod/scripting/l4d2_byedoor.sp index ab25978ec..0f6c49c48 100644 --- a/addons/sourcemod/scripting/l4d2_byedoor.sp +++ b/addons/sourcemod/scripting/l4d2_byedoor.sp @@ -18,7 +18,7 @@ public void OnPluginStart() HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy); } -public void Event_RoundStart(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] eName, bool dontBroadcast) { int EntityCount = GetEntityCount(); char EdictClassName[128]; diff --git a/addons/sourcemod/scripting/l4d2_car_alarm_hittable_fix.sp b/addons/sourcemod/scripting/l4d2_car_alarm_hittable_fix.sp index 81bec6006..bf9eeeb89 100644 --- a/addons/sourcemod/scripting/l4d2_car_alarm_hittable_fix.sp +++ b/addons/sourcemod/scripting/l4d2_car_alarm_hittable_fix.sp @@ -124,7 +124,7 @@ public void OnEntityCreated(int entity, const char[] classname) SDKHook(entity, SDKHook_Touch, OnTouch); } -public void OnTouch(int car, int other) +void OnTouch(int car, int other) { // Is the other entity a Survivor? if ((iFlags & FLAGS[0]) && other >= 1 && other <= MaxClients && GetClientTeam(other) == 2) @@ -163,7 +163,7 @@ public void OnTouch(int car, int other) } } -public Action DisableAlarm(Handle timer, any car) +Action DisableAlarm(Handle timer, any car) { int Tank = -1; diff --git a/addons/sourcemod/scripting/l4d2_changelevel.sp b/addons/sourcemod/scripting/l4d2_changelevel.sp index 8f5ba6a58..f1e2b6d65 100644 --- a/addons/sourcemod/scripting/l4d2_changelevel.sp +++ b/addons/sourcemod/scripting/l4d2_changelevel.sp @@ -90,7 +90,7 @@ public void OnPluginStart() RegAdminCmd("sm_changelevel", Changelevel, ADMFLAG_ROOT, "L4D2 changelevel method to release all resources"); } -public Action Changelevel(int iClient, int iArg) +Action Changelevel(int iClient, int iArg) { char sMapName[PLATFORM_MAX_PATH]; char temp[2]; @@ -122,7 +122,7 @@ void L4D2_ChangeLevel(const char[] sMapName, bool bShouldResetScores=true) SDKCall(hDirectorChangeLevel, TheDirector, sMapName); } -public int L4D2_ChangeLevelNV(Handle plugin, int numParams) +int L4D2_ChangeLevelNV(Handle plugin, int numParams) { if(numParams < 1) ThrowNativeError(SP_ERROR_PARAM, "Invalid numParams"); diff --git a/addons/sourcemod/scripting/l4d2_character_fix.sp b/addons/sourcemod/scripting/l4d2_character_fix.sp index 030b42ed2..91e3bd153 100644 --- a/addons/sourcemod/scripting/l4d2_character_fix.sp +++ b/addons/sourcemod/scripting/l4d2_character_fix.sp @@ -14,7 +14,7 @@ public OnPluginStart() { hCvarMaxZombies = FindConVar("z_max_player_zombies"); } -public Action:TeamCmd(client, const String:command[], argc) { +Action:TeamCmd(client, const String:command[], argc) { if (client && argc > 0) { static String:sBuffer[128]; diff --git a/addons/sourcemod/scripting/l4d2_collision_adjustments.sp b/addons/sourcemod/scripting/l4d2_collision_adjustments.sp index 7917b8f9b..0239301c8 100644 --- a/addons/sourcemod/scripting/l4d2_collision_adjustments.sp +++ b/addons/sourcemod/scripting/l4d2_collision_adjustments.sp @@ -54,7 +54,7 @@ public void OnPluginStart() HookEvent("round_end", Event_Reset, EventHookMode_PostNoCopy); } -public void cvarChanged(ConVar cvar, const char[] oldValue, const char[] newValue) +void cvarChanged(ConVar cvar, const char[] oldValue, const char[] newValue) { CvarsInType(); } @@ -109,19 +109,19 @@ public Action CH_PassFilter(int ent1, int ent2, bool &result) return Plugin_Continue; } -public void Event_Reset(Event hEvent, const char[] name, bool dontBroadcast) +void Event_Reset(Event hEvent, const char[] name, bool dontBroadcast) { for (int i = 0; i <= MAXPLAYERS; i++) { isPulled[i] = false; } } -public void Event_SurvivorPulled(Event hEvent, const char[] name, bool dontBroadcast) +void Event_SurvivorPulled(Event hEvent, const char[] name, bool dontBroadcast) { isPulled[GetClientOfUserId(hEvent.GetInt("victim"))] = true; } -public void Event_PullEnd(Event hEvent, const char[] name, bool dontBroadcast) +void Event_PullEnd(Event hEvent, const char[] name, bool dontBroadcast) { isPulled[GetClientOfUserId(hEvent.GetInt("victim"))] = false; } diff --git a/addons/sourcemod/scripting/l4d2_director_commonlimit_block.sp b/addons/sourcemod/scripting/l4d2_director_commonlimit_block.sp index 583ec9db5..730671ffc 100644 --- a/addons/sourcemod/scripting/l4d2_director_commonlimit_block.sp +++ b/addons/sourcemod/scripting/l4d2_director_commonlimit_block.sp @@ -26,7 +26,7 @@ public void OnPluginStart() HookConVarChange(hCommonLimit, Cvar_CommonLimitChange); } -public void Cvar_CommonLimitChange(ConVar hCvar, const char[] oldValue, const char[] newValue) +void Cvar_CommonLimitChange(ConVar hCvar, const char[] oldValue, const char[] newValue) { iCommonLimit = hCommonLimit.IntValue; } diff --git a/addons/sourcemod/scripting/l4d2_dominatorscontrol.sp b/addons/sourcemod/scripting/l4d2_dominatorscontrol.sp index cd98f4b8d..df3aa77c8 100644 --- a/addons/sourcemod/scripting/l4d2_dominatorscontrol.sp +++ b/addons/sourcemod/scripting/l4d2_dominatorscontrol.sp @@ -95,7 +95,7 @@ public void OnPluginEnd() SetDominators(); } -public void OnCvarDominatorsChange(ConVar hCvar, const char[] sOldVal, const char[] sNewVal) +void OnCvarDominatorsChange(ConVar hCvar, const char[] sOldVal, const char[] sNewVal) { int iNewVal = StringToInt(sNewVal); if (iNewVal == g_iDominators) { diff --git a/addons/sourcemod/scripting/l4d2_drop_secondary.sp b/addons/sourcemod/scripting/l4d2_drop_secondary.sp index 14c5ff03f..8e6af1c5f 100644 --- a/addons/sourcemod/scripting/l4d2_drop_secondary.sp +++ b/addons/sourcemod/scripting/l4d2_drop_secondary.sp @@ -60,7 +60,7 @@ public void OnClientDisconnect(int client) sMeleeScript[client] = MELEE_NONE; } -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { for (int i = 1; i <= MaxClients; i++) { @@ -75,7 +75,7 @@ public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) * THEIR SECONDARY AND MELEE SCRIPT * *****************************************************************************************/ -public void Event_OnPlayerReplacedByBot(Event event, const char[] name, bool dontBroadcast) +void Event_OnPlayerReplacedByBot(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")) int player = GetClientOfUserId(event.GetInt("player")) @@ -88,7 +88,7 @@ public void Event_OnPlayerReplacedByBot(Event event, const char[] name, bool don if (bDebug) CPrintToChatAll("{green}[{olive}OnPlayerReplacedByBot{green}] {default}- {blue}BOT {default}replaced {blue}%N {default}({green}Secondary: {olive}%s{default})", player, sSecondary[bot]); } -public void Event_OnBotReplacedByPlayer(Event event, const char[] name, bool dontBroadcast) +void Event_OnBotReplacedByPlayer(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")) int player = GetClientOfUserId(event.GetInt("player")) @@ -106,7 +106,7 @@ public void Event_OnBotReplacedByPlayer(Event event, const char[] name, bool don * THIS FIRES AND STORES A PLAYER'S SECONDARY * *****************************************************************************************/ -public void Event_OnPlayerUse(Event event, const char[] name, bool dontBroadcast) +void Event_OnPlayerUse(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); int targetid = event.GetInt("targetid"); @@ -149,7 +149,7 @@ public void Event_OnPlayerUse(Event event, const char[] name, bool dontBroadcast * IN CASE HE/SHE DIES WHILE INCAPACITATED * *****************************************************************************************/ -public Action Event_OnPlayerDeath(Event event, const char[] name, bool dontBroadcast) +Action Event_OnPlayerDeath(Event event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(event.GetInt("userid")); if (IsValidSurvivor(victim)) @@ -209,7 +209,7 @@ void DetermineMeleeScript(int client, int iWeaponIndex) if (bDebug) CPrintToChatAll("{green}[{olive}DetermineMeleeScript{green}] {default}- {blue}%N {default}has {olive}%s {default}- MS: {olive}%s", client, buffScriptName, sMeleeScript[client]); } -public void DebugChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void DebugChanged(ConVar convar, const char[] oldValue, const char[] newValue) { bDebug = l4d2_drop_secondary_debug.BoolValue; CPrintToChatAll("{blue}[{default}L4D2 Drop Secondary{blue}]{default}: {green}Debugging {olive}%s", bDebug ? "Enabled" : "Disabled"); diff --git a/addons/sourcemod/scripting/l4d2_explosiondmg_prev.sp b/addons/sourcemod/scripting/l4d2_explosiondmg_prev.sp index 57851a05e..3e6ce71ce 100644 --- a/addons/sourcemod/scripting/l4d2_explosiondmg_prev.sp +++ b/addons/sourcemod/scripting/l4d2_explosiondmg_prev.sp @@ -45,7 +45,7 @@ public void OnClientPutInServer(int client) SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); } -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { if (!(damagetype & DMG_BLAST)) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_fireworks_noise_block.sp b/addons/sourcemod/scripting/l4d2_fireworks_noise_block.sp index bd2e00236..dc8a2ded4 100644 --- a/addons/sourcemod/scripting/l4d2_fireworks_noise_block.sp +++ b/addons/sourcemod/scripting/l4d2_fireworks_noise_block.sp @@ -16,11 +16,12 @@ public OnPluginStart() AddAmbientSoundHook(AmbientSHook:OnAmbientSound); } -public Action:OnNormalSound(int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags) +Action:OnNormalSound(int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags) { return (StrContains(sample, "firewerks", true) > -1) ? Plugin_Stop : Plugin_Continue; } -public Action:OnAmbientSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) + +Action:OnAmbientSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) { return (StrContains(sample, "firewerks", true) > -1) ? Plugin_Stop : Plugin_Continue; -} \ No newline at end of file +} diff --git a/addons/sourcemod/scripting/l4d2_fix_team_shuffle.sp b/addons/sourcemod/scripting/l4d2_fix_team_shuffle.sp index d35a4df5a..1e28f36a5 100644 --- a/addons/sourcemod/scripting/l4d2_fix_team_shuffle.sp +++ b/addons/sourcemod/scripting/l4d2_fix_team_shuffle.sp @@ -40,7 +40,7 @@ public void L4D2_OnEndVersusModeRound_Post() SaveTeams(); } -public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast) +void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast) { DisableFixTeam(); @@ -53,7 +53,7 @@ public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast CreateTimer(1.0, EnableFixTeam_Timer); } -public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) { if (IsNewGame()) { @@ -73,14 +73,14 @@ public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) CreateTimer(1.0, FixTeam_Timer); } -public Action FixTeam_Timer(Handle timer) +Action FixTeam_Timer(Handle timer) { FixTeams(); return Plugin_Continue; } -public Action EnableFixTeam_Timer(Handle timer) +Action EnableFixTeam_Timer(Handle timer) { EnableFixTeam(); FixTeams(); @@ -89,14 +89,14 @@ public Action EnableFixTeam_Timer(Handle timer) return Plugin_Continue; } -public Action DisableFixTeam_Timer(Handle timer) +Action DisableFixTeam_Timer(Handle timer) { DisableFixTeam(); return Plugin_Continue; } -public void SaveTeams() +void SaveTeams() { ClearTeamsData(); @@ -109,7 +109,7 @@ public void SaveTeams() CopyClientsToArray(losers, losersTeam); } -public void CopyClientsToArray(ArrayList arrayList, int team) +void CopyClientsToArray(ArrayList arrayList, int team) { for (int client = 1; client <= MaxClients; client++) { @@ -120,7 +120,7 @@ public void CopyClientsToArray(ArrayList arrayList, int team) } } -public void FixTeams() +void FixTeams() { if (!MustFixTheTeams()) return; @@ -147,7 +147,7 @@ public void FixTeams() EnableFixTeam(); } -public void MoveToSpectatorWhoIsNotInTheTeam(ArrayList arrayList, int team) +void MoveToSpectatorWhoIsNotInTheTeam(ArrayList arrayList, int team) { for (int client = 1; client <= MaxClients; client++) { @@ -159,7 +159,7 @@ public void MoveToSpectatorWhoIsNotInTheTeam(ArrayList arrayList, int team) } } -public void MoveSpectatorsToTheCorrectTeam(ArrayList arrayList, int team) +void MoveSpectatorsToTheCorrectTeam(ArrayList arrayList, int team) { for (int client = 1; client <= MaxClients; client++) { @@ -171,7 +171,7 @@ public void MoveSpectatorsToTheCorrectTeam(ArrayList arrayList, int team) } } -public bool PlayersInCorrectTeam(ArrayList arrayList, int team) +bool PlayersInCorrectTeam(ArrayList arrayList, int team) { int arraySize = GetArraySize(arrayList); @@ -186,7 +186,7 @@ public bool PlayersInCorrectTeam(ArrayList arrayList, int team) return true; } -public bool SurvivorsAreWinning() +bool SurvivorsAreWinning() { int flipped = GameRules_GetProp("m_bAreTeamsFlipped"); @@ -199,33 +199,33 @@ public bool SurvivorsAreWinning() return survivorScore >= infectedScore; } -public bool MustFixTheTeams() +bool MustFixTheTeams() { return fixTeam && !TeamsDataIsEmpty(); } -public void EnableFixTeam() +void EnableFixTeam() { fixTeam = true; } -public void DisableFixTeam() +void DisableFixTeam() { fixTeam = false; } -public void ClearTeamsData() +void ClearTeamsData() { winners.Clear(); losers.Clear(); } -public bool TeamsDataIsEmpty() +bool TeamsDataIsEmpty() { return GetArraySize(winners) == 0 && GetArraySize(losers) == 0; } -public bool IsNewGame() +bool IsNewGame() { int teamAScore = L4D2Direct_GetVSCampaignScore(0); int teamBScore = L4D2Direct_GetVSCampaignScore(1); @@ -233,7 +233,7 @@ public bool IsNewGame() return teamAScore == 0 && teamBScore == 0; } -public void MovePlayerToTeam(int client, int team) +void MovePlayerToTeam(int client, int team) { // No need to check multiple times if we're trying to move a player to a possibly full team. if (team != L4D2_TEAM_SPECTATOR && NumberOfPlayersInTheTeam(team) >= TeamSize()) @@ -252,7 +252,7 @@ public void MovePlayerToTeam(int client, int team) } } -public int NumberOfPlayersInTheTeam(int team) +int NumberOfPlayersInTheTeam(int team) { int count = 0; @@ -267,7 +267,7 @@ public int NumberOfPlayersInTheTeam(int team) return count; } -public int TeamSize() +int TeamSize() { return GetConVarInt(FindConVar("survivor_limit")); } \ No newline at end of file diff --git a/addons/sourcemod/scripting/l4d2_getup_slide_fix.sp b/addons/sourcemod/scripting/l4d2_getup_slide_fix.sp index d6e968e9c..15e2694d1 100644 --- a/addons/sourcemod/scripting/l4d2_getup_slide_fix.sp +++ b/addons/sourcemod/scripting/l4d2_getup_slide_fix.sp @@ -49,7 +49,7 @@ public void OnPluginStart() HookEvent("round_end", Event_RoundEnd, EventHookMode_PostNoCopy); } -public void Event_RoundEnd(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] eName, bool dontBroadcast) { ResetStaggerBlocked(); } @@ -60,7 +60,7 @@ public void OnMapEnd() } //Called when a Player replaces a Bot -public void Event_BotPlayerReplace(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_BotPlayerReplace(Event hEvent, const char[] eName, bool dontBroadcast) { int player = GetClientOfUserId(hEvent.GetInt("player")); int charIndex = IdentifySurvivor(player); @@ -74,7 +74,7 @@ public void Event_BotPlayerReplace(Event hEvent, const char[] eName, bool dontBr } //Called when a Bot replaces a Player -public void Event_PlayerBotReplace(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_PlayerBotReplace(Event hEvent, const char[] eName, bool dontBroadcast) { int bot = GetClientOfUserId(hEvent.GetInt("bot")); int charIndex = IdentifySurvivor(bot); @@ -87,7 +87,7 @@ public void Event_PlayerBotReplace(Event hEvent, const char[] eName, bool dontBr } } -public void Event_PounceChargeEnd(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_PounceChargeEnd(Event hEvent, const char[] eName, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("victim")); int charIndex = IdentifySurvivor(client); @@ -99,7 +99,7 @@ public void Event_PounceChargeEnd(Event hEvent, const char[] eName, bool dontBro isSurvivorStaggerBlocked[charIndex] = true; } -public Action HookOnThink(Handle hTimer, any client) +Action HookOnThink(Handle hTimer, any client) { if (client && IsSurvivor(client)) { SDKHook(client, SDKHook_PostThink, OnThink); @@ -108,7 +108,7 @@ public Action HookOnThink(Handle hTimer, any client) return Plugin_Stop; } -public void OnThink(int client) +void OnThink(int client) { int charIndex = IdentifySurvivorFast(client); if (charIndex == SurvivorCharacter_Invalid) { diff --git a/addons/sourcemod/scripting/l4d2_ghost_warp.sp b/addons/sourcemod/scripting/l4d2_ghost_warp.sp index a4b3c741a..76ca81ce9 100644 --- a/addons/sourcemod/scripting/l4d2_ghost_warp.sp +++ b/addons/sourcemod/scripting/l4d2_ghost_warp.sp @@ -97,7 +97,7 @@ void InitTrie() g_hTrieNameToGenderIndex.SetValue("francis", L4D2Gender_Biker); } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { // GetGameTime (gpGlobals->curtime) starts from scratch every map. // Let's clean this up @@ -108,7 +108,7 @@ public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBr } } -public Action Cmd_WarpToSurvivor(int iClient, int iArgs) +Action Cmd_WarpToSurvivor(int iClient, int iArgs) { if (iClient == 0) { ReplyToCommand(iClient, "%s This command is not available for the server!", PLUGIN_TAG); @@ -217,7 +217,7 @@ public void L4D_OnEnterGhostState(int iClient) SDKHook(iClient, SDKHook_PostThinkPost, Hook_OnPostThinkPost); } -public void Hook_OnPostThinkPost(int iClient) +void Hook_OnPostThinkPost(int iClient) { int iPressButtons = GetEntProp(iClient, Prop_Data, "m_afButtonPressed"); @@ -359,7 +359,7 @@ int GetSurvivorOfFlowRank(int iRank) return strSurvArray.eiSurvivorIndex; } -public int sortFunc(int iIndex1, int iIndex2, Handle hArray, Handle hndl) +int sortFunc(int iIndex1, int iIndex2, Handle hArray, Handle hndl) { eSurvFlow strSurvArray1; eSurvFlow strSurvArray2; @@ -411,7 +411,7 @@ int GetSurvivorOfFlowRank(int iRank) return strSurvArray[eiSurvivorIndex]; } -public int sortFunc(int iIndex1, int iIndex2, Handle hArray, Handle hndl) +int sortFunc(int iIndex1, int iIndex2, Handle hArray, Handle hndl) { eSurvFlow strSurvArray1[eSurvFlow]; eSurvFlow strSurvArray2[eSurvFlow]; diff --git a/addons/sourcemod/scripting/l4d2_godframes_control_merge.sp b/addons/sourcemod/scripting/l4d2_godframes_control_merge.sp index bd5289d9e..9d4ffbb71 100644 --- a/addons/sourcemod/scripting/l4d2_godframes_control_merge.sp +++ b/addons/sourcemod/scripting/l4d2_godframes_control_merge.sp @@ -201,8 +201,7 @@ public void OnPluginStart() } } -//public void OnRoundStart() //l4d2util forward -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (int i = 1; i <= MaxClients; i++) { //clear both fake and real just because g_fFakeGodframeEnd[i] = 0.0; @@ -212,7 +211,7 @@ public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBr } } -public void PostSurvivorRelease(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PostSurvivorRelease(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iVictim = GetClientOfUserId(hEvent.GetInt("victim")); @@ -255,7 +254,7 @@ public void L4D2_OnStagger_Post(int client, int source) } } -public void Event_Replaced(Event hEvent, char[] name, bool dontBroadcast) +void Event_Replaced(Event hEvent, char[] name, bool dontBroadcast) { bool bBotReplaced = (!strncmp(name, "b", 1)); int replaced = bBotReplaced ? GetClientOfUserId(hEvent.GetInt("bot")) : GetClientOfUserId(hEvent.GetInt("player")); @@ -310,7 +309,7 @@ void Timed_SetFrustration(any iClient) } } -public Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, \ +Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, \ int &iDamagetype, int &iWeapon, float fDamageForce[3], float fDamagePosition[3]) { if (!IsValidSurvivor(iVictim) || !IsValidEdict(iAttacker) || !IsValidEdict(iInflictor)) { @@ -528,7 +527,7 @@ public Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float & return Plugin_Continue; } -public Action Timed_ResetGlow(Handle hTimer, any iClient) +Action Timed_ResetGlow(Handle hTimer, any iClient) { if (IsClientAndInGame(iClient)) { // remove transparency/color @@ -559,7 +558,7 @@ public void OnMapStart() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */ // The sole purpose of this hook is to prevent survivor bots from causing the vision of human survivors to recoil -public Action TraceAttackUndoFF(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype, int &iAmmotype, int iHitbox, int iHitgroup) +Action TraceAttackUndoFF(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype, int &iAmmotype, int iHitbox, int iHitgroup) { // If none of the flags are enabled, don't do anything if (!g_iEnabledFlags) { @@ -581,7 +580,7 @@ public Action TraceAttackUndoFF(int iVictim, int &iAttacker, int &iInflictor, fl // Apply fractional permanent damage here // Also announce damage, and undo guilty bot damage -public Action Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_iEnabledFlags) { return Plugin_Continue; @@ -638,7 +637,7 @@ public Action Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDont // When a Survivor is incapped by damage, player_hurt will not fire // So you may notice that the code here has some similarities to the code for player_hurt -public Action Event_PlayerIncapStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_PlayerIncapStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { // Cycle the incap pointer, now that the damage has been confirmed int iVictim = GetClientOfUserId(hEvent.GetInt("userid")); @@ -662,7 +661,7 @@ public Action Event_PlayerIncapStart(Event hEvent, const char[] sEventName, bool // If a bot is guilty of creating a friendly fire event, undo it // Also give the human some reaction time to realize the bot ran in front of them -public Action Event_FriendlyFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_FriendlyFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!(g_iEnabledFlags & FFTYPE_STUPIDBOTS)) { return Plugin_Continue; @@ -677,7 +676,7 @@ public Action Event_FriendlyFire(Event hEvent, const char[] sEventName, bool bDo return Plugin_Continue; } -public Action StupidGuiltyBotDelay(Handle hTimer, any iClient) +Action StupidGuiltyBotDelay(Handle hTimer, any iClient) { g_bStupidGuiltyBots[iClient] = false; @@ -686,7 +685,7 @@ public Action StupidGuiltyBotDelay(Handle hTimer, any iClient) // While a Charger is carrying a Survivor, undo any friendly fire done to them // since they are effectively pinned and pinned survivors are normally immune to FF -public Action Event_ChargerCarryStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_ChargerCarryStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!(g_iEnabledFlags & FFTYPE_CHARGERCARRY)) { return Plugin_Continue; @@ -703,7 +702,7 @@ public Action Event_ChargerCarryStart(Event hEvent, const char[] sEventName, boo // (there is some time between carryend and pummelbegin, // but pummelbegin does not always get called if the charger died first, so it is unreliable // and besides the survivor has natural FF immunity when pinned) -public Action Event_ChargerCarryEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_ChargerCarryEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iClient = GetClientOfUserId(hEvent.GetInt("victim")); CreateTimer(1.0, ChargerCarryFFDelay, iClient, TIMER_FLAG_NO_MAPCHANGE); @@ -711,7 +710,7 @@ public Action Event_ChargerCarryEnd(Event hEvent, const char[] sEventName, bool return Plugin_Continue; } -public Action ChargerCarryFFDelay(Handle hTimer, any iClient) +Action ChargerCarryFFDelay(Handle hTimer, any iClient) { g_bChargerCarryNoFF[iClient] = false; @@ -719,7 +718,7 @@ public Action ChargerCarryFFDelay(Handle hTimer, any iClient) } // For health kit undo, we must remember the target in HealBegin -public Action Event_HealBegin(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_HealBegin(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_iEnabledFlags) { return Plugin_Continue; // Not enabled? Done @@ -744,7 +743,7 @@ public Action Event_HealBegin(Event hEvent, const char[] sEventName, bool bDontB // When healing ends, remember how much temp health the target had // This way it can be restored in UndoDamage -public Action Event_HealEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_HealEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_iEnabledFlags) { return Plugin_Continue; // Not enabled? Done @@ -769,7 +768,7 @@ public Action Event_HealEnd(Event hEvent, const char[] sEventName, bool bDontBro } // Save the amount of health restored as negative so it can be undone -public Action Event_HealSuccess(Event hEvent, const char[] sEventName, bool bDontBroadcast) +Action Event_HealSuccess(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_iEnabledFlags) { return Plugin_Continue; // Not enabled? Done @@ -923,17 +922,17 @@ bool IsClientAndInGame(int iClient) } // Cvars -public void OnUndoFFEnableChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void OnUndoFFEnableChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { g_iEnabledFlags = StringToInt(sNewValue); } -public void OnUndoFFBlockZeroDmgChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void OnUndoFFBlockZeroDmgChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { g_iBlockZeroDmg = StringToInt(sNewValue); } -public void OnPermFracChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void OnPermFracChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { g_fPermFrac = StringToFloat(sNewValue); } @@ -945,7 +944,7 @@ public void OnPermFracChanged(ConVar hConVar, const char[] sOldValue, const char // // // // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */ -public void ProcessShot(ArrayStack hStack) +void ProcessShot(ArrayStack hStack) { int iVictim = 0, iAttacker = 0, iWeapon = 0; if (!hStack.Empty) { @@ -1001,7 +1000,7 @@ bool IsTankRock(int iEntity) } // Natives -public int Native_GiveClientGodFrames(Handle hPlugin, int iNumParams) +int Native_GiveClientGodFrames(Handle hPlugin, int iNumParams) { int iClient = GetNativeCell(1); diff --git a/addons/sourcemod/scripting/l4d2_hittable_control.sp b/addons/sourcemod/scripting/l4d2_hittable_control.sp index 3612e6396..d4a8689f0 100644 --- a/addons/sourcemod/scripting/l4d2_hittable_control.sp +++ b/addons/sourcemod/scripting/l4d2_hittable_control.sp @@ -163,7 +163,7 @@ public void OnClientPutInServer(int client) SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); } -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { // Reset everything to make sure we don't run into issues when a map is restarted (as GameTime resets) for (int i = 1; i <= MaxClients; i++) @@ -190,7 +190,7 @@ public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) } } -public Action PatchBreakableForklifts(Handle timer) +Action PatchBreakableForklifts(Handle timer) { int forklift = -1; @@ -210,7 +210,7 @@ public Action PatchBreakableForklifts(Handle timer) return Plugin_Stop; } -public Action UnpatchBreakableForklifts(Handle timer) +Action UnpatchBreakableForklifts(Handle timer) { int forklift = -1; @@ -230,7 +230,7 @@ public Action UnpatchBreakableForklifts(Handle timer) return Plugin_Stop; } -public void ConVarChanged_UnbreakableForklifts(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void ConVarChanged_UnbreakableForklifts(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { if (hUnbreakableForklifts.BoolValue) { @@ -242,11 +242,11 @@ public void ConVarChanged_UnbreakableForklifts(ConVar hConVar, const char[] sOld } } -public int Native_UnbreakableForklifts(Handle plugin, int numParams) { +int Native_UnbreakableForklifts(Handle plugin, int numParams) { return hUnbreakableForklifts.BoolValue; } -public void Event_GauntletFinaleStart(Event event, const char[] name, bool dontBroadcast) +void Event_GauntletFinaleStart(Event event, const char[] name, bool dontBroadcast) { bIsGauntletFinale = true; } @@ -375,7 +375,7 @@ bool GetHittableDamage(int entity, float &damage) return true; } -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { // Hey, we don't care. if (!IsValidEdict(attacker) || diff --git a/addons/sourcemod/scripting/l4d2_horde.sp b/addons/sourcemod/scripting/l4d2_horde.sp index 5a44244ef..49bf02d3f 100644 --- a/addons/sourcemod/scripting/l4d2_horde.sp +++ b/addons/sourcemod/scripting/l4d2_horde.sp @@ -92,7 +92,7 @@ public void OnEntityCreated(int entity, const char[] classname) } } -public void CommonSpawnPost(int entity) +void CommonSpawnPost(int entity) { if (IsValidEntity(entity)) { if (GetAllCommon() > (iCommonLimit - 8)) { @@ -101,7 +101,7 @@ public void CommonSpawnPost(int entity) } } -public void RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { fSavedTime = 0.0; } diff --git a/addons/sourcemod/scripting/l4d2_horde_equaliser.sp b/addons/sourcemod/scripting/l4d2_horde_equaliser.sp index 298cd0a24..96bce67df 100644 --- a/addons/sourcemod/scripting/l4d2_horde_equaliser.sp +++ b/addons/sourcemod/scripting/l4d2_horde_equaliser.sp @@ -91,7 +91,7 @@ public void OnMapStart() PrecacheSound(HORDE_SOUND); } -public void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) +void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) { commonTotal = 0; lastCheckpoint = 0; diff --git a/addons/sourcemod/scripting/l4d2_hunter_no_deadstops.sp b/addons/sourcemod/scripting/l4d2_hunter_no_deadstops.sp index 71ba26aa4..8a2a520d4 100644 --- a/addons/sourcemod/scripting/l4d2_hunter_no_deadstops.sp +++ b/addons/sourcemod/scripting/l4d2_hunter_no_deadstops.sp @@ -109,7 +109,7 @@ bool HasTarget(int hunter) return (IsSurvivor(target) && IsPlayerAlive(target)); } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { // clear SI tracking stats for (int i = 1; i <= MaxClients; i++) @@ -118,7 +118,7 @@ public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast } } -public void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcast) +void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(hEvent.GetInt("userid")); @@ -131,7 +131,7 @@ public void Event_PlayerDeath(Event hEvent, const char[] name, bool dontBroadcas } // hunters pouncing / tracking -public void Event_AbilityUse(Event hEvent, const char[] name, bool dontBroadcast) +void Event_AbilityUse(Event hEvent, const char[] name, bool dontBroadcast) { // track hunters pouncing char abilityName[64]; diff --git a/addons/sourcemod/scripting/l4d2_hybrid_scoremod.sp b/addons/sourcemod/scripting/l4d2_hybrid_scoremod.sp index b2461b30a..02f92ddba 100644 --- a/addons/sourcemod/scripting/l4d2_hybrid_scoremod.sp +++ b/addons/sourcemod/scripting/l4d2_hybrid_scoremod.sp @@ -148,7 +148,7 @@ public OnMapStart() bTiebreakerEligibility[1] = false; } -public CvarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) +void CvarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) { OnConfigsExecuted(); } @@ -165,7 +165,7 @@ public OnClientDisconnect(client) SDKUnhook(client, SDKHook_OnTakeDamagePost, OnTakeDamagePost); } -public void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (new i = 0; i <= MAXPLAYERS; i++) { @@ -174,37 +174,37 @@ public void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBro bRoundOver = false; } -public Native_GetHealthBonus(Handle:plugin, numParams) +int Native_GetHealthBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorHealthBonus()); } -public Native_GetMaxHealthBonus(Handle:plugin, numParams) +int Native_GetMaxHealthBonus(Handle:plugin, numParams) { return RoundToFloor(fMapHealthBonus); } -public Native_GetDamageBonus(Handle:plugin, numParams) +int Native_GetDamageBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorDamageBonus()); } -public Native_GetMaxDamageBonus(Handle:plugin, numParams) +int Native_GetMaxDamageBonus(Handle:plugin, numParams) { return RoundToFloor(fMapDamageBonus); } -public Native_GetPillsBonus(Handle:plugin, numParams) +int Native_GetPillsBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorPillBonus()); } -public Native_GetMaxPillsBonus(Handle:plugin, numParams) +int Native_GetMaxPillsBonus(Handle:plugin, numParams) { return iPillWorth * iTeamSize; } -public Action:CmdBonus(client, args) +Action:CmdBonus(client, args) { if (bRoundOver || !client) return Plugin_Handled; @@ -243,7 +243,7 @@ public Action:CmdBonus(client, args) return Plugin_Handled; } -public Action:CmdMapInfo(client, args) +Action:CmdMapInfo(client, args) { new Float:fMaxPillsBonus = float(iPillWorth * iTeamSize); new Float:fTotalBonus = fMapBonus + fMaxPillsBonus; @@ -264,7 +264,7 @@ public Action:CmdMapInfo(client, args) return Plugin_Handled; } -public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) +Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) { if (!IsSurvivor(victim) || IsPlayerIncap(victim)) return Plugin_Continue; @@ -279,13 +279,13 @@ public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damage return Plugin_Continue; } -public OnPlayerLedgeGrab(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerLedgeGrab(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); iLostTempHealth[InSecondHalfOfRound()] += L4D2Direct_GetPreIncapHealthBuffer(client); } -public void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcast) { bool bLedge = GetEventBool(event, "ledge_hang"); if (!bLedge) return; @@ -296,12 +296,12 @@ public void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcas RequestFrame(Revival, client); } -public void Revival(int client) +void Revival(int client) { iLostTempHealth[InSecondHalfOfRound()] -= GetSurvivorTemporaryHealth(client); } -public void OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) { new victim = GetClientOfUserId(GetEventInt(event, "userid")); new attacker = GetClientOfUserId(GetEventInt(event, "attacker")); @@ -326,7 +326,7 @@ public void OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) iTempHealth[victim] = GetSurvivorTemporaryHealth(victim) - fFakeDamage; } -public void OnTakeDamagePost(victim, attacker, inflictor, Float:damage, damagetype) +void OnTakeDamagePost(victim, attacker, inflictor, Float:damage, damagetype) { if (!IsSurvivor(victim)) return; @@ -403,7 +403,7 @@ public Action:L4D2_OnEndVersusModeRound(bool:countSurvivors) return Plugin_Continue; } -public Action:PrintRoundEndStats(Handle:timer) +Action:PrintRoundEndStats(Handle:timer) { for (new i = 0; i <= InSecondHalfOfRound(); i++) { diff --git a/addons/sourcemod/scripting/l4d2_hybrid_scoremod_zone.sp b/addons/sourcemod/scripting/l4d2_hybrid_scoremod_zone.sp index a257a8542..efcab33ff 100644 --- a/addons/sourcemod/scripting/l4d2_hybrid_scoremod_zone.sp +++ b/addons/sourcemod/scripting/l4d2_hybrid_scoremod_zone.sp @@ -149,7 +149,7 @@ public OnMapStart() bTiebreakerEligibility[1] = false; } -public CvarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) +void CvarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) { OnConfigsExecuted(); } @@ -166,7 +166,7 @@ public OnClientDisconnect(client) SDKUnhook(client, SDKHook_OnTakeDamagePost, OnTakeDamagePost); } -public void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (new i = 0; i <= MAXPLAYERS; i++) { @@ -175,37 +175,37 @@ public void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBro bRoundOver = false; } -public Native_GetHealthBonus(Handle:plugin, numParams) +int Native_GetHealthBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorHealthBonus()); } -public Native_GetMaxHealthBonus(Handle:plugin, numParams) +int Native_GetMaxHealthBonus(Handle:plugin, numParams) { return RoundToFloor(fMapHealthBonus); } -public Native_GetDamageBonus(Handle:plugin, numParams) +int Native_GetDamageBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorDamageBonus()); } -public Native_GetMaxDamageBonus(Handle:plugin, numParams) +int Native_GetMaxDamageBonus(Handle:plugin, numParams) { return RoundToFloor(fMapDamageBonus); } -public Native_GetPillsBonus(Handle:plugin, numParams) +int Native_GetPillsBonus(Handle:plugin, numParams) { return RoundToFloor(GetSurvivorPillBonus()); } -public Native_GetMaxPillsBonus(Handle:plugin, numParams) +int Native_GetMaxPillsBonus(Handle:plugin, numParams) { return iPillWorth * iTeamSize; } -public Action:CmdBonus(client, args) +Action:CmdBonus(client, args) { if (bRoundOver || !client) return Plugin_Handled; @@ -244,7 +244,7 @@ public Action:CmdBonus(client, args) return Plugin_Handled; } -public Action:CmdMapInfo(client, args) +Action:CmdMapInfo(client, args) { new Float:fMaxPillsBonus = float(iPillWorth * iTeamSize); new Float:fTotalBonus = fMapBonus + fMaxPillsBonus; @@ -265,7 +265,7 @@ public Action:CmdMapInfo(client, args) return Plugin_Handled; } -public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) +Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) { if (!IsSurvivor(victim) || IsPlayerIncap(victim)) return Plugin_Continue; @@ -280,13 +280,13 @@ public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damage return Plugin_Continue; } -public OnPlayerLedgeGrab(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerLedgeGrab(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); iLostTempHealth[InSecondHalfOfRound()] += L4D2Direct_GetPreIncapHealthBuffer(client); } -public OnPlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void OnPlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int victim = GetClientOfUserId(hEvent.GetInt("userid")); if (IsSurvivor(victim) && !bRoundOver) @@ -308,7 +308,7 @@ public OnPlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) } } -public OnPlayerIncapped(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerIncapped(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if (IsSurvivor(client)) @@ -317,7 +317,7 @@ public OnPlayerIncapped(Handle:event, const String:name[], bool:dontBroadcast) } } -public void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcast) +void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcast) { bool bLedge = GetEventBool(event, "ledge_hang"); if (!bLedge) { @@ -332,12 +332,12 @@ public void OnPlayerRevived(Handle:event, const String:name[], bool:dontBroadcas RequestFrame(Revival, client); } -public void Revival(int client) +void Revival(int client) { iLostTempHealth[InSecondHalfOfRound()] -= GetSurvivorTemporaryHealth(client); } -public Action:OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) +Action:OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) { new victim = GetClientOfUserId(GetEventInt(event, "userid")); new attacker = GetClientOfUserId(GetEventInt(event, "attacker")); @@ -362,7 +362,7 @@ public Action:OnPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast return Plugin_Continue; } -public OnTakeDamagePost(victim, attacker, inflictor, Float:damage, damagetype) +void OnTakeDamagePost(victim, attacker, inflictor, Float:damage, damagetype) { if (!IsSurvivor(victim)) return; @@ -439,7 +439,7 @@ public Action:L4D2_OnEndVersusModeRound(bool:countSurvivors) return Plugin_Continue; } -public Action:PrintRoundEndStats(Handle:timer) +Action:PrintRoundEndStats(Handle:timer) { for (new i = 0; i <= InSecondHalfOfRound(); i++) { diff --git a/addons/sourcemod/scripting/l4d2_jockey_jumpcap_patch.sp b/addons/sourcemod/scripting/l4d2_jockey_jumpcap_patch.sp index c973b5042..ab213b128 100644 --- a/addons/sourcemod/scripting/l4d2_jockey_jumpcap_patch.sp +++ b/addons/sourcemod/scripting/l4d2_jockey_jumpcap_patch.sp @@ -46,7 +46,7 @@ public void OnPluginStart() delete hGamedata; } -public void ResetEvent(Event hEvent, const char[] name, bool dontBroadcast) +void ResetEvent(Event hEvent, const char[] name, bool dontBroadcast) { for (int i = 0; i <= MAXPLAYERS; i++) { blockJumpCap[i] = false; @@ -60,7 +60,7 @@ public void OnEntityCreated(int entity, const char[] classname) } } -public void OnPlayerShoved(Event hEvent, const char[] name, bool dontBroadcast) +void OnPlayerShoved(Event hEvent, const char[] name, bool dontBroadcast) { int shovee = GetClientOfUserId(hEvent.GetInt("userid")); int shover = GetClientOfUserId(hEvent.GetInt("attacker")); @@ -71,13 +71,13 @@ public void OnPlayerShoved(Event hEvent, const char[] name, bool dontBroadcast) } } -public Action ResetJumpcapState(Handle hTimer, any jockey) +Action ResetJumpcapState(Handle hTimer, any jockey) { blockJumpCap[jockey] = false; return Plugin_Handled; } -public MRESReturn CLeap_OnTouch(int ability, Handle hParams) +MRESReturn CLeap_OnTouch(int ability, Handle hParams) { int jockey = GetEntPropEnt(ability, Prop_Send, "m_owner"); if (IsJockey(jockey) && !IsFakeClient(jockey)) { diff --git a/addons/sourcemod/scripting/l4d2_jockey_skeet.sp b/addons/sourcemod/scripting/l4d2_jockey_skeet.sp index 0adee4946..082d01e36 100644 --- a/addons/sourcemod/scripting/l4d2_jockey_skeet.sp +++ b/addons/sourcemod/scripting/l4d2_jockey_skeet.sp @@ -103,7 +103,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam return Plugin_Continue; } -public Action ResetDamageCounter(Handle hTimer, any jockey) +Action ResetDamageCounter(Handle hTimer, any jockey) { for (int i = 1; i <= MaxClients; i++) { inflictedDamage[jockey][i] = 0.0; diff --git a/addons/sourcemod/scripting/l4d2_jockey_teleport_fix.sp b/addons/sourcemod/scripting/l4d2_jockey_teleport_fix.sp index 381706fbe..61ca49682 100644 --- a/addons/sourcemod/scripting/l4d2_jockey_teleport_fix.sp +++ b/addons/sourcemod/scripting/l4d2_jockey_teleport_fix.sp @@ -32,7 +32,7 @@ public void OnPluginStart() { HookEvent("player_bot_replace", Event_BotReplacedByPlayer); } -public void Event_JockeyRide(Event hEvent, char[] name, bool dontBroadcast) { +void Event_JockeyRide(Event hEvent, char[] name, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("victim")); float currentOrigin[3]; @@ -46,7 +46,7 @@ public void Event_JockeyRide(Event hEvent, char[] name, bool dontBroadcast) { SDKHook(client, SDKHook_PreThink, OnPreThink); } -public void Event_BotReplacedByPlayer(Event hEvent, char[] name, bool dontBroadcast) { +void Event_BotReplacedByPlayer(Event hEvent, char[] name, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("player")); int bot = GetClientOfUserId(hEvent.GetInt("bot")); @@ -61,7 +61,7 @@ public void Event_BotReplacedByPlayer(Event hEvent, char[] name, bool dontBroadc SDKHook(client, SDKHook_PreThink, OnPreThink); } -public void Event_PlayerReplacedByBot(Event hEvent, char[] name, bool dontBroadcast) { +void Event_PlayerReplacedByBot(Event hEvent, char[] name, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("player")); int bot = GetClientOfUserId(hEvent.GetInt("bot")); diff --git a/addons/sourcemod/scripting/l4d2_ladder_rambos.sp b/addons/sourcemod/scripting/l4d2_ladder_rambos.sp index 8d265ca9c..2887877dd 100644 --- a/addons/sourcemod/scripting/l4d2_ladder_rambos.sp +++ b/addons/sourcemod/scripting/l4d2_ladder_rambos.sp @@ -215,7 +215,7 @@ public void OnConfigsExecuted() // OnEnableDisable - Patch or unpatch // ==================================================================================================== -public void OnEnableDisable(ConVar convar, const char[] oldValue, const char[] newValue) +void OnEnableDisable(ConVar convar, const char[] oldValue, const char[] newValue) { ApplyPatch((bCvar_Enabled = Cvar_Enabled.BoolValue)); } @@ -224,7 +224,7 @@ public void OnEnableDisable(ConVar convar, const char[] oldValue, const char[] n // OnConVarChanged - Refresh ConVar storage // ==================================================================================================== -public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { GetCvars(); } @@ -257,7 +257,7 @@ public void OnClientPutInServer(int client) // Event_RoundStart - Reset temp values // ==================================================================================================== -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { for (int i = 1; i <= MaxClients; i++) { @@ -271,7 +271,7 @@ public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) // Detour_CanDeployFor - Constantly called to check if player can pull out a weapon // ==================================================================================================== -public MRESReturn Detour_CanDeployFor(int pThis, Handle hReturn) +MRESReturn Detour_CanDeployFor(int pThis, Handle hReturn) { if (!bCvar_Enabled) return MRES_Ignored; @@ -383,7 +383,7 @@ public MRESReturn Detour_CanDeployFor(int pThis, Handle hReturn) // Detour_Reload - Block reload based on ConVar // ==================================================================================================== -public MRESReturn Detour_Reload(int pThis, Handle hReturn) +MRESReturn Detour_Reload(int pThis, Handle hReturn) { int client = GetEntPropEnt(pThis, Prop_Send, "m_hOwner"); bool bIsOnLadder = GetEntityMoveType(client) == MOVETYPE_LADDER; @@ -400,7 +400,7 @@ public MRESReturn Detour_Reload(int pThis, Handle hReturn) // Detour_ShotgunReload - Block reload based on ConVar // ==================================================================================================== -public MRESReturn Detour_ShotgunReload(int pThis, Handle hReturn) +MRESReturn Detour_ShotgunReload(int pThis, Handle hReturn) { int client = GetEntPropEnt(pThis, Prop_Send, "m_hOwner"); diff --git a/addons/sourcemod/scripting/l4d2_ladderblock.sp b/addons/sourcemod/scripting/l4d2_ladderblock.sp index 852b0c141..8c4abe60b 100644 --- a/addons/sourcemod/scripting/l4d2_ladderblock.sp +++ b/addons/sourcemod/scripting/l4d2_ladderblock.sp @@ -96,19 +96,19 @@ public void OnClientPutInServer(int iClient) } } -public void Charging(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Charging(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iCharger = GetClientOfUserId(hEvent.GetInt("userid")); g_iInCharge[iCharger] = true; } -public void NotCharging(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void NotCharging(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iCharger = GetClientOfUserId(hEvent.GetInt("userid")); g_iInCharge[iCharger] = false; } -public Action SDKHook_cb_Touch(int iEntity, int iOther) +Action SDKHook_cb_Touch(int iEntity, int iOther) { if (iOther > MaxClients || iOther < 1) { return Plugin_Continue; @@ -165,7 +165,7 @@ void ST_ToogleHook(bool bHook) } } -public void OnCvarChange_Flags(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) +void OnCvarChange_Flags(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) { if (strcmp(sOldValue, sNewValue) == 0) { return; @@ -180,7 +180,7 @@ public void OnCvarChange_Flags(ConVar hConvar, const char[] sOldValue, const cha } } -public void OnCvarChange_Immune(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) +void OnCvarChange_Immune(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) { if (strcmp(sOldValue, sNewValue) != 0) { g_iCvarImmune = g_hImmune.IntValue; diff --git a/addons/sourcemod/scripting/l4d2_lagcomp_manager.sp b/addons/sourcemod/scripting/l4d2_lagcomp_manager.sp index 8fe6415d0..cdda3e040 100644 --- a/addons/sourcemod/scripting/l4d2_lagcomp_manager.sp +++ b/addons/sourcemod/scripting/l4d2_lagcomp_manager.sp @@ -181,7 +181,7 @@ public void OnConfigsExecuted() CheckCvar(); } -public void SvUnLag_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void SvUnLag_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CheckCvar(); } @@ -348,7 +348,7 @@ bool IsFindEntity(int iEntity) * @remarks Basically this lagcomp array is always empty, so don't be surprised you won't see anything in the console * @remarks This works, for example, for melee weapons or for the boomer's ability, at this moment, entities should appear in this array */ -public Action Cmd_ShowLagCompList(int client, int args) +Action Cmd_ShowLagCompList(int client, int args) { ReplyToCommand(client, "[%s] The lagcomp array should have been printed to the server console!", GAMEDATA); LagComp_ShowAllEntities(); diff --git a/addons/sourcemod/scripting/l4d2_map_transitions.sp b/addons/sourcemod/scripting/l4d2_map_transitions.sp index d3f6e2d2d..370de345f 100644 --- a/addons/sourcemod/scripting/l4d2_map_transitions.sp +++ b/addons/sourcemod/scripting/l4d2_map_transitions.sp @@ -84,8 +84,7 @@ void LoadSDK() delete hGameData; } -//public void OnRoundEnd() //l4d2util forward was removed -public void L4D2_OnEndVersusModeRound_Post() //left4dhooks +public void L4D2_OnEndVersusModeRound_Post() { //If map is in last half, attempt a transition if (InSecondHalfOfRound()) { @@ -97,7 +96,7 @@ public void L4D2_OnEndVersusModeRound_Post() //left4dhooks } } -public Action OnRoundEnd_Post(Handle hTimer) +Action OnRoundEnd_Post(Handle hTimer) { g_hTransitionTimer = null; @@ -141,7 +140,7 @@ public void OnMapStart() } } -public Action Timer_OnMapStartDelay(Handle hTimer) +Action Timer_OnMapStartDelay(Handle hTimer) { SetScores(); @@ -171,7 +170,7 @@ void SetScores() #endif } -public Action AddMapTransition(int iArgs) +Action AddMapTransition(int iArgs) { if (iArgs != 2) { PrintToServer("Usage: sm_add_map_transition "); diff --git a/addons/sourcemod/scripting/l4d2_melee_damage_control.sp b/addons/sourcemod/scripting/l4d2_melee_damage_control.sp index 3455e3d70..9c6dac0d9 100644 --- a/addons/sourcemod/scripting/l4d2_melee_damage_control.sp +++ b/addons/sourcemod/scripting/l4d2_melee_damage_control.sp @@ -110,7 +110,7 @@ public void OnPluginStart() } } -public void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CvarsToType(); } @@ -132,7 +132,7 @@ public void OnClientDisconnect(int iClient) SDKUnhook(iClient, SDKHook_OnTakeDamage, Hook_OnTakeDamage); } -public Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) +Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) { //DMG_SLOWBURN - works for all types of melee weapons if (!(iDamagetype & DMG_SLOWBURN)) { diff --git a/addons/sourcemod/scripting/l4d2_melee_shenanigans.sp b/addons/sourcemod/scripting/l4d2_melee_shenanigans.sp index 55a17c3f6..6432214ea 100644 --- a/addons/sourcemod/scripting/l4d2_melee_shenanigans.sp +++ b/addons/sourcemod/scripting/l4d2_melee_shenanigans.sp @@ -25,7 +25,7 @@ public void OnPluginStart() hDropMethod.AddChangeHook(ConVarChange); } -public Action PlayerHit(Handle event, char[] event_name, bool dontBroadcast) +Action PlayerHit(Handle event, char[] event_name, bool dontBroadcast) { int Player = GetClientOfUserId(GetEventInt(event, "userid")); char Weapon[256]; @@ -102,7 +102,7 @@ stock bool IsTankOrCharger(int client) return false; } -public void ConVarChange(ConVar convar, char[] oldValue, char[] newValue) +void ConVarChange(ConVar convar, char[] oldValue, char[] newValue) { iDropMethod = StringToInt(newValue); } \ No newline at end of file diff --git a/addons/sourcemod/scripting/l4d2_melee_spawn_control.sp b/addons/sourcemod/scripting/l4d2_melee_spawn_control.sp index 759efeb12..a2e61386a 100644 --- a/addons/sourcemod/scripting/l4d2_melee_spawn_control.sp +++ b/addons/sourcemod/scripting/l4d2_melee_spawn_control.sp @@ -64,7 +64,7 @@ public void OnPluginStart() hCvarAddMelee = CreateConVar("l4d2_add_melee", "", "Add melee weapons to map basis melee spawn or l4d2_melee_spawn, use ',' to separate between names. Empty for don't add"); } -public MRESReturn DH_OnGetMissionInfo(Handle hReturn) +MRESReturn DH_OnGetMissionInfo(Handle hReturn) { if(GetGameTime() > 5.0) return MRES_Ignored; char t[255], s[255], f[255], m[64] diff --git a/addons/sourcemod/scripting/l4d2_noghostcheat.sp b/addons/sourcemod/scripting/l4d2_noghostcheat.sp index 06c02e3d1..e1dcd9d4e 100644 --- a/addons/sourcemod/scripting/l4d2_noghostcheat.sp +++ b/addons/sourcemod/scripting/l4d2_noghostcheat.sp @@ -17,13 +17,13 @@ public OnClientPutInServer(client) public OnPluginStart() { - for (new client = 1; client <= MAXPLAYERS; client++) + for (new client = 1; client <= MaxClients; client++) { if (IsValidClient(client)) SDKHook(client, SDKHook_SetTransmit, Hook_SetTransmit); } } -public Action:Hook_SetTransmit(client, entity) +Action:Hook_SetTransmit(client, entity) { // By default Valve still transmits the entities to Survivors, even when not in sight or in ghost mode. // Detecting if a player is actually in someone's sight is likely impossible to implement without issues, but blocking ghosts from being transmitted has no downsides. diff --git a/addons/sourcemod/scripting/l4d2_nosecondchances.sp b/addons/sourcemod/scripting/l4d2_nosecondchances.sp index 0311ef67a..f688dd546 100644 --- a/addons/sourcemod/scripting/l4d2_nosecondchances.sp +++ b/addons/sourcemod/scripting/l4d2_nosecondchances.sp @@ -54,7 +54,7 @@ public void OnPluginStart() g_hBotKickDelay = CreateConVar("bot_kick_delay", "0", "How long should we wait before kicking infected bots?", _, true, 0.0, true, 30.0); } -public void PlayerBotReplace(Event hEvent, const char[] eName, bool dontBroadcast) +void PlayerBotReplace(Event hEvent, const char[] eName, bool dontBroadcast) { int iUserID = hEvent.GetInt("bot"); int iBot = GetClientOfUserId(iUserID); @@ -84,7 +84,7 @@ bool ShouldBeKicked(int iBot) return true; } -public Action Timer_KillBotDelay(Handle hTimer, any iUserID) +Action Timer_KillBotDelay(Handle hTimer, any iUserID) { int iBot = GetClientOfUserId(iUserID); if (iBot > 0 && IsPlayerAlive(iBot) && ShouldBeKicked(iBot)) { diff --git a/addons/sourcemod/scripting/l4d2_nosey_parker.sp b/addons/sourcemod/scripting/l4d2_nosey_parker.sp index 99275338e..47de07ac1 100644 --- a/addons/sourcemod/scripting/l4d2_nosey_parker.sp +++ b/addons/sourcemod/scripting/l4d2_nosey_parker.sp @@ -68,7 +68,7 @@ public void OnPluginStart() g_hGhostDelayMin.AddChangeHook(Cvar_Changed); } -public void Cvar_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvar_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { g_fGhostDelay = hConVar.FloatValue; } @@ -78,7 +78,7 @@ public void OnMapEnd() g_hTongueParalyzeTimer = null; //if TIMER_FLAG_NO_MAPCHANGE } -public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iVictim = GetClientOfUserId(hEvent.GetInt("userid")); if (iVictim > 0 @@ -99,7 +99,7 @@ public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBr } } -public void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iClient = GetClientOfUserId(hEvent.GetInt("userid")); if (iClient == 0 @@ -123,7 +123,7 @@ public void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontB } } -public void Event_CHJ_Attack(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_CHJ_Attack(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iAttacker = GetClientOfUserId(hEvent.GetInt("userid")); if (iAttacker == 0 @@ -147,7 +147,7 @@ public void Event_CHJ_Attack(Event hEvent, const char[] sEventName, bool bDontBr PrintInflictedDamage(iVictim, iAttacker); } -public void Event_SmokerAttackFirst(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_SmokerAttackFirst(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iAttackerUserid = hEvent.GetInt("userid"); int iAttacker = GetClientOfUserId(iAttackerUserid); @@ -167,7 +167,7 @@ public void Event_SmokerAttackFirst(Event hEvent, const char[] sEventName, bool } } -public Action CheckSurvivorState(Handle hTimer, ArrayStack hEventMembers) +Action CheckSurvivorState(Handle hTimer, ArrayStack hEventMembers) { /* Fix warning 204: symbol is assigned a value that is never used: "checks"*/ if (!hEventMembers.Empty) { @@ -187,7 +187,7 @@ public Action CheckSurvivorState(Handle hTimer, ArrayStack hEventMembers) return Plugin_Stop; } -public void Event_SmokerAttackSecond(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_SmokerAttackSecond(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iAttacker = GetClientOfUserId(hEvent.GetInt("userid")); int iVictim = GetClientOfUserId(hEvent.GetInt("victim")); diff --git a/addons/sourcemod/scripting/l4d2_nospitterduringtank.sp b/addons/sourcemod/scripting/l4d2_nospitterduringtank.sp index f95564470..380e7da55 100644 --- a/addons/sourcemod/scripting/l4d2_nospitterduringtank.sp +++ b/addons/sourcemod/scripting/l4d2_nospitterduringtank.sp @@ -72,7 +72,7 @@ public OnPluginStart() g_iSpitterLimit = GetConVarInt(g_hSpitterLimit); } -public Cvar_SpitterLimit(Handle:convar, const String:oldValue[], const String:newValue[]) +void Cvar_SpitterLimit(Handle:convar, const String:oldValue[], const String:newValue[]) { if (g_bIsTankInPlay || StringToInt(oldValue) == 0) return; g_iSpitterLimit = StringToInt(newValue); @@ -96,7 +96,7 @@ public OnClientDisconnect_Post(client) CreateTimer(0.5, Timer_CheckTank, client); } -public Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) +void Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) { if (!g_bIsTankInPlay) return; @@ -108,7 +108,7 @@ public Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) CreateTimer(0.5, Timer_CheckTank, victim); } -public Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) +void Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); g_iTankClient = client; @@ -119,7 +119,7 @@ public Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) SetConVarInt(g_hSpitterLimit, 0); } -public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) +void Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { g_bIsTankInPlay = false; g_iTankClient = 0; @@ -129,7 +129,7 @@ public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) } } -public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) +void Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) { // A bit redundant to do it on both start/end, but there are cases where those events are bypassed // specifically by admin commands @@ -140,7 +140,7 @@ public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) } } -public Action:Timer_CheckTank(Handle:timer, any:oldtankclient) +Action:Timer_CheckTank(Handle:timer, any:oldtankclient) { // We already saw tank pass via another event firing if (g_iTankClient != oldtankclient) return; @@ -176,7 +176,7 @@ FindTankClient() return 0; } -public OnPluginEnd() +public void OnPluginEnd() { if (g_iSpitterLimit > 0 && GetConVarInt(g_hSpitterLimit) == 0) SetConVarInt(g_hSpitterLimit, g_iSpitterLimit); diff --git a/addons/sourcemod/scripting/l4d2_notankautoaim.sp b/addons/sourcemod/scripting/l4d2_notankautoaim.sp index 491ec84b4..149bd70dd 100644 --- a/addons/sourcemod/scripting/l4d2_notankautoaim.sp +++ b/addons/sourcemod/scripting/l4d2_notankautoaim.sp @@ -48,7 +48,7 @@ void InitGameData() delete hGamedata; } -public void Cvars_Changed(ConVar convar, const char[] oldValue, const char[] newValue) +void Cvars_Changed(ConVar convar, const char[] oldValue, const char[] newValue) { CheckPatch(convar.BoolValue); } diff --git a/addons/sourcemod/scripting/l4d2_penalty_bonus.sp b/addons/sourcemod/scripting/l4d2_penalty_bonus.sp index b6a0c7a19..3c8329945 100644 --- a/addons/sourcemod/scripting/l4d2_penalty_bonus.sp +++ b/addons/sourcemod/scripting/l4d2_penalty_bonus.sp @@ -147,7 +147,7 @@ public void OnMapEnd() g_bSecondHalf = false; } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { // reset g_hCvarDefibPenalty.SetInt(g_iOriginalPenalty); @@ -156,7 +156,7 @@ public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBr g_iSameChange = -1; } -public void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { // Fix double event call float fRoundEndTime = GameRules_GetPropFloat("m_flRoundEndTime"); @@ -172,7 +172,7 @@ public void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroa } } -public Action Cmd_Bonus(int iClient, int iArgs) +Action Cmd_Bonus(int iClient, int iArgs) { if (!g_hCvarEnabled.BoolValue || !g_hCvarDoDisplay.BoolValue) { return Plugin_Continue; @@ -182,7 +182,7 @@ public Action Cmd_Bonus(int iClient, int iArgs) return Plugin_Handled; } -/*public Action Command_Say(int iClient, const char[] sCommand, int iArgs) +/*Action Command_Say(int iClient, const char[] sCommand, int iArgs) { if (!g_hCvarEnabled.BoolValue || !g_hCvarDoDisplay.BoolValue) { return Plugin_Continue; @@ -202,7 +202,7 @@ public Action Cmd_Bonus(int iClient, int iArgs) // Tank and Witch tracking // ----------------------- -public void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_hCvarEnabled.BoolValue) { return; @@ -235,7 +235,7 @@ void TankKilled() ReportChange(iTankBonus); } -public void Event_WitchKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_WitchKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_hCvarEnabled.BoolValue) { return; @@ -368,7 +368,7 @@ void ReportChange(int iBonusChange, int iClient = -1, bool bAbsoluteSet = false) // Defib tracking // -------------- -public void Event_DefibUsed(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_DefibUsed(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_iDefibsUsed[RoundNum()]++; } @@ -382,7 +382,7 @@ int RoundNum() } /* -public PrintDebug(const char[] Message, any ...) +void PrintDebug(const char[] Message, any ...) { #if DEBUG_MODE char DebugBuff[256]; @@ -396,12 +396,12 @@ public PrintDebug(const char[] Message, any ...) // Natives // ------- -public int Native_GetRoundBonus(Handle hPlugin, int iNumParams) +int Native_GetRoundBonus(Handle hPlugin, int iNumParams) { return g_iBonus[RoundNum()]; } -public int Native_ResetRoundBonus(Handle hPlugin, int iNumParams) +int Native_ResetRoundBonus(Handle hPlugin, int iNumParams) { g_iBonus[RoundNum()] = 0; @@ -411,7 +411,7 @@ public int Native_ResetRoundBonus(Handle hPlugin, int iNumParams) return 1; } -public int Native_SetRoundBonus(Handle hPlugin, int iNumParams) +int Native_SetRoundBonus(Handle hPlugin, int iNumParams) { int iBonus = GetNativeCell(1); @@ -431,7 +431,7 @@ public int Native_SetRoundBonus(Handle hPlugin, int iNumParams) return 1; } -public int Native_AddRoundBonus(Handle hPlugin, int iNumParams) +int Native_AddRoundBonus(Handle hPlugin, int iNumParams) { bool bNoReport = false; int iBonus = GetNativeCell(1); @@ -458,12 +458,12 @@ public int Native_AddRoundBonus(Handle hPlugin, int iNumParams) return 1; } -public int Native_GetDefibsUsed(Handle hPlugin, int iNumParams) +int Native_GetDefibsUsed(Handle hPlugin, int iNumParams) { return g_iDefibsUsed[RoundNum()]; } -public int Native_SetDefibPenalty(Handle hPlugin, int iNumParams) +int Native_SetDefibPenalty(Handle hPlugin, int iNumParams) { int iPenalty = GetNativeCell(1); diff --git a/addons/sourcemod/scripting/l4d2_pickup.sp b/addons/sourcemod/scripting/l4d2_pickup.sp index 4a72f5e82..caaae6264 100644 --- a/addons/sourcemod/scripting/l4d2_pickup.sp +++ b/addons/sourcemod/scripting/l4d2_pickup.sp @@ -129,7 +129,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3 return Plugin_Continue; } -public Action ChangeSecondaryFlags(int client, int args) +Action ChangeSecondaryFlags(int client, int args) { if (IsValidClient(client)) { if (iSwitchFlags[client] != 3) { @@ -149,7 +149,7 @@ public Action ChangeSecondaryFlags(int client, int args) // Yucky Timer Method~ | // | // -------------------------------*/ -public Action DelayUse(Handle hTimer, any client) +Action DelayUse(Handle hTimer, any client) { bTanked[client] = false; hTanked[client] = null; @@ -157,7 +157,7 @@ public Action DelayUse(Handle hTimer, any client) return Plugin_Stop; } -public Action DelaySwitchHealth(Handle hTimer, any client) +Action DelaySwitchHealth(Handle hTimer, any client) { bCantSwitchHealth[client] = false; hHealth[client] = null; @@ -165,7 +165,7 @@ public Action DelaySwitchHealth(Handle hTimer, any client) return Plugin_Stop; } -public Action DelaySwitchSecondary(Handle hTimer, any client) +Action DelaySwitchSecondary(Handle hTimer, any client) { bCantSwitchSecondary[client] = false; hSecondary[client] = null; @@ -173,7 +173,7 @@ public Action DelaySwitchSecondary(Handle hTimer, any client) return Plugin_Stop; } -public Action DelayValveSwitch(Handle hTimer, any client) +Action DelayValveSwitch(Handle hTimer, any client) { bPreventValveSwitch[client] = false; hValveSwitch[client] = null; @@ -187,7 +187,7 @@ public Action DelayValveSwitch(Handle hTimer, any client) // SDK Hooks, Fun! | // | // -------------------------------*/ -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { if (!IsValidEdict(inflictor) || !IsPlayerSurvivor(victim)) { return Plugin_Continue; @@ -221,7 +221,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam return Plugin_Continue; } -public Action WeaponCanSwitchTo(int client, int weapon) +Action WeaponCanSwitchTo(int client, int weapon) { if (!IsValidEntity(weapon)) { return Plugin_Continue; @@ -244,7 +244,7 @@ public Action WeaponCanSwitchTo(int client, int weapon) return Plugin_Continue; } -public Action WeaponEquip(int client, int weapon) +Action WeaponEquip(int client, int weapon) { if (!IsValidEntity(weapon)) { return Plugin_Continue; @@ -283,7 +283,7 @@ public Action WeaponEquip(int client, int weapon) return Plugin_Continue; } -public Action WeaponDrop(int client, int weapon) +Action WeaponDrop(int client, int weapon) { if (!IsValidEntity(weapon)) { return Plugin_Continue; @@ -419,7 +419,7 @@ void HookValidClient(int client, bool Hook) // Cvar Changes! | // | // -------------------------------*/ -public void CVarChanged(ConVar cvar, const char[] oldValue, const char[] newValue) +void CVarChanged(ConVar cvar, const char[] oldValue, const char[] newValue) { IncapFlags = hIncapPickupFlags.IntValue; SwitchFlags = hSwitchFlags.IntValue; diff --git a/addons/sourcemod/scripting/l4d2_riotcops.sp b/addons/sourcemod/scripting/l4d2_riotcops.sp index eca984ba3..fa9041c57 100644 --- a/addons/sourcemod/scripting/l4d2_riotcops.sp +++ b/addons/sourcemod/scripting/l4d2_riotcops.sp @@ -60,14 +60,14 @@ public void OnEntityCreated(int iEntity, const char[] sClassName) } } -public void RiotCopSpawn(int iEntity) +void RiotCopSpawn(int iEntity) { if (IsRiotCop(iEntity)) { SDKHook(iEntity, SDKHook_TraceAttack, RiotCopTraceAttack); } } -public Action RiotCopTraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType, \ +Action RiotCopTraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType, \ int &iAmmoType, int iHitBox, int iHitGroup) { if (iHitGroup != HITGROUP_HEAD || !IsRiotCop(iVictim)) { diff --git a/addons/sourcemod/scripting/l4d2_saferoom_detect.sp b/addons/sourcemod/scripting/l4d2_saferoom_detect.sp index 6b0ec991b..b392e76e2 100644 --- a/addons/sourcemod/scripting/l4d2_saferoom_detect.sp +++ b/addons/sourcemod/scripting/l4d2_saferoom_detect.sp @@ -102,23 +102,25 @@ public OnAllPluginsLoaded() g_bLGOIsAvailable = LibraryExists("confogl"); } -public Native_IsEntityInStartSaferoom(Handle:plugin, numParams) +int Native_IsEntityInStartSaferoom(Handle:plugin, numParams) { new entity = GetNativeCell(1); return _: IsEntityInStartSaferoom(entity); } -public Native_IsEntityInEndSaferoom(Handle:plugin, numParams) + +int Native_IsEntityInEndSaferoom(Handle:plugin, numParams) { new entity = GetNativeCell(1); return _: IsEntityInEndSaferoom(entity); } -public Native_IsPlayerInStartSaferoom(Handle:plugin, numParams) +int Native_IsPlayerInStartSaferoom(Handle:plugin, numParams) { new client = GetNativeCell(1); return _: IsPlayerInStartSaferoom(client); } -public Native_IsPlayerInEndSaferoom(Handle:plugin, numParams) + +int Native_IsPlayerInEndSaferoom(Handle:plugin, numParams) { new client = GetNativeCell(1); return _: IsPlayerInEndSaferoom(client); @@ -157,7 +159,7 @@ public OnMapEnd() // Checks // ------ -public IsEntityInStartSaferoom(entity) +bool IsEntityInStartSaferoom(entity) { if ( !IsValidEntity(entity) || GetEntSendPropOffs(entity, "m_vecOrigin", true) == -1 ) { return false; } @@ -168,7 +170,7 @@ public IsEntityInStartSaferoom(entity) return IsPointInStartSaferoom(location); } -public IsEntityInEndSaferoom(entity) +bool IsEntityInEndSaferoom(entity) { if ( !IsValidEntity(entity) || GetEntSendPropOffs(entity, "m_vecOrigin", true) == -1 ) { return false; } @@ -180,7 +182,7 @@ public IsEntityInEndSaferoom(entity) } -public IsPlayerInStartSaferoom(client) +bool IsPlayerInStartSaferoom(client) { if (client < 1 || client > MaxClients || !IsClientInGame(client)) { return false; } @@ -195,7 +197,7 @@ public IsPlayerInStartSaferoom(client) return bool: (IsPointInStartSaferoom(locationA) || IsPointInStartSaferoom(locationB)); } -public IsPlayerInEndSaferoom(client) +bool IsPlayerInEndSaferoom(client) { if (client < 1 || client > MaxClients || !IsClientInGame(client)) { return false; } @@ -211,7 +213,7 @@ public IsPlayerInEndSaferoom(client) } -IsPointInStartSaferoom(Float:location[3], entity=-1) +bool IsPointInStartSaferoom(Float:location[3], entity=-1) { if (g_iMode == DETMODE_EXACT) { @@ -234,8 +236,10 @@ IsPointInStartSaferoom(Float:location[3], entity=-1) if (g_fStartLocA[1] < g_fStartLocB[1]) { yMin = g_fStartLocA[1]; yMax = g_fStartLocB[1]; } else { yMin = g_fStartLocB[1]; yMax = g_fStartLocA[1]; } if (g_fStartLocA[2] < g_fStartLocB[2]) { zMin = g_fStartLocA[2]; zMax = g_fStartLocB[2]; } else { zMin = g_fStartLocB[2]; zMax = g_fStartLocA[2]; } - PrintDebug("dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); - + #if SR_DEBUG_MODE + PrintDebug("dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); + #endif + inSaferoom = bool: ( location[0] >= xMin && location[0] <= xMax && location[1] >= yMin && location[1] <= yMax && location[2] >= zMin && location[2] <= zMax ); @@ -247,8 +251,10 @@ IsPointInStartSaferoom(Float:location[3], entity=-1) if (g_fStartLocC[1] < g_fStartLocD[1]) { yMin = g_fStartLocC[1]; yMax = g_fStartLocD[1]; } else { yMin = g_fStartLocD[1]; yMax = g_fStartLocC[1]; } if (g_fStartLocC[2] < g_fStartLocD[2]) { zMin = g_fStartLocC[2]; zMax = g_fStartLocD[2]; } else { zMin = g_fStartLocD[2]; zMax = g_fStartLocC[2]; } - PrintDebug("extra dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); - + #if SR_DEBUG_MODE + PrintDebug("extra dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); + #endif + inSaferoom = bool: ( location[0] >= xMin && location[0] <= xMax && location[1] >= yMin && location[1] <= yMax && location[2] >= zMin && location[2] <= zMax ); @@ -278,7 +284,7 @@ IsPointInStartSaferoom(Float:location[3], entity=-1) } -IsPointInEndSaferoom(Float:location[3], entity = -1) +bool IsPointInEndSaferoom(Float:location[3], entity = -1) { if (g_iMode == DETMODE_EXACT) { @@ -302,8 +308,10 @@ IsPointInEndSaferoom(Float:location[3], entity = -1) if (g_fEndLocA[1] < g_fEndLocB[1]) { yMin = g_fEndLocA[1]; yMax = g_fEndLocB[1]; } else { yMin = g_fEndLocB[1]; yMax = g_fEndLocA[1]; } if (g_fEndLocA[2] < g_fEndLocB[2]) { zMin = g_fEndLocA[2]; zMax = g_fEndLocB[2]; } else { zMin = g_fEndLocB[2]; zMax = g_fEndLocA[2]; } - PrintDebug("dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); - + #if SR_DEBUG_MODE + PrintDebug("dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); + #endif + inSaferoom = bool: ( location[0] >= xMin && location[0] <= xMax && location[1] >= yMin && location[1] <= yMax && location[2] >= zMin && location[2] <= zMax ); @@ -315,8 +323,10 @@ IsPointInEndSaferoom(Float:location[3], entity = -1) if (g_fEndLocC[1] < g_fEndLocD[1]) { yMin = g_fEndLocC[1]; yMax = g_fEndLocD[1]; } else { yMin = g_fEndLocD[1]; yMax = g_fEndLocC[1]; } if (g_fEndLocC[2] < g_fEndLocD[2]) { zMin = g_fEndLocC[2]; zMax = g_fEndLocD[2]; } else { zMin = g_fEndLocD[2]; zMax = g_fEndLocC[2]; } - PrintDebug("extra dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); - + #if SR_DEBUG_MODE + PrintDebug("extra dimensions checked: %f - %f (%f) -- %f - %f (%f) -- %f - %f (%f)", xMin, xMax, location[0], yMin, yMax, location[1], zMin, zMax, location[2]); + #endif + inSaferoom = bool: ( location[0] >= xMin && location[0] <= xMax && location[1] >= yMin && location[1] <= yMax && location[2] >= zMin && location[2] <= zMax ); @@ -450,7 +460,8 @@ stock RotatePoint(Float:origin[3], &Float:pointX, &Float:pointY, Float:angle) return; } -public PrintDebug(const String:Message[], any:...) +#if SR_DEBUG_MODE +void PrintDebug(const String:Message[], any:...) { #if SR_DEBUG_MODE decl String:DebugBuff[256]; @@ -459,4 +470,5 @@ public PrintDebug(const String:Message[], any:...) //PrintToServer(DebugBuff); //PrintToChatAll(DebugBuff); #endif -} \ No newline at end of file +} +#endif diff --git a/addons/sourcemod/scripting/l4d2_saferoom_item_remove.sp b/addons/sourcemod/scripting/l4d2_saferoom_item_remove.sp index f8e0e44f8..53eb9c03f 100644 --- a/addons/sourcemod/scripting/l4d2_saferoom_item_remove.sp +++ b/addons/sourcemod/scripting/l4d2_saferoom_item_remove.sp @@ -50,14 +50,14 @@ public void OnPluginStart() HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy); } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_hCvarEnabled.BoolValue) { CreateTimer(DELAY_ROUNDSTART, Timer_DelayedOnRoundStart, _, TIMER_FLAG_NO_MAPCHANGE); } } -public Action Timer_DelayedOnRoundStart(Handle hTimer) +Action Timer_DelayedOnRoundStart(Handle hTimer) { // check for any items in the end saferoom, and remove them char sClassname[128]; diff --git a/addons/sourcemod/scripting/l4d2_scoremod.sp b/addons/sourcemod/scripting/l4d2_scoremod.sp index adb87b919..1642f69c1 100644 --- a/addons/sourcemod/scripting/l4d2_scoremod.sp +++ b/addons/sourcemod/scripting/l4d2_scoremod.sp @@ -69,7 +69,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max return APLRes_Success; } -public int _Native_HealthBonus(Handle plugin, int numParams) +int _Native_HealthBonus(Handle plugin, int numParams) { return SM_CalculateSurvivalBonus(); } @@ -176,7 +176,7 @@ public OnMapStart() SM_fTempMulti[2] = GetConVarFloat(SM_hTempMulti2); } -public SM_ConVarChanged_Enable(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_ConVarChanged_Enable(Handle:convar, const String:oldValue[], const String:newValue[]) { if (StringToInt(newValue) == 0) { @@ -189,32 +189,32 @@ public SM_ConVarChanged_Enable(Handle:convar, const String:oldValue[], const Str SM_bModuleIsEnabled = true; } -public SM_ConVarChanged_TempMulti0(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_ConVarChanged_TempMulti0(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fTempMulti[0] = StringToFloat(newValue); } -public SM_ConVarChanged_TempMulti1(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_ConVarChanged_TempMulti1(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fTempMulti[1] = StringToFloat(newValue); } -public SM_ConVarChanged_TempMulti2(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_ConVarChanged_TempMulti2(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fTempMulti[2] = StringToFloat(newValue); } -public SM_CVChanged_HealthBonusRatio(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_CVChanged_HealthBonusRatio(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fHBRatio = StringToFloat(newValue); } -public SM_CVChanged_SurvivalBonusRatio(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_CVChanged_SurvivalBonusRatio(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fSurvivalBonusRatio = StringToFloat(newValue); } -public SM_ConVarChanged_Health(Handle:convar, const String:oldValue[], const String:newValue[]) +void SM_ConVarChanged_Health(Handle:convar, const String:oldValue[], const String:newValue[]) { SM_fHealPercent = GetConVarFloat(SM_hHealPercent); SM_iPillPercent = GetConVarInt(SM_hPillPercent); @@ -248,7 +248,7 @@ PluginDisable() SM_bHooked = false; } -public Action:SM_DoorClose_Event(Handle:event, const String:name[], bool:dontBroadcast) +void SM_DoorClose_Event(Handle:event, const String:name[], bool:dontBroadcast) { if (!SM_bModuleIsEnabled) return; if (GetEventBool(event, "checkpoint")) @@ -257,7 +257,7 @@ public Action:SM_DoorClose_Event(Handle:event, const String:name[], bool:dontBro } } -public Action:SM_PlayerDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) +void SM_PlayerDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) { if (!SM_bModuleIsEnabled) return; new client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -269,7 +269,7 @@ public Action:SM_PlayerDeath_Event(Handle:event, const String:name[], bool:dontB } -public Action:SM_RoundEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) +void SM_RoundEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) { if (!SM_bModuleIsEnabled) return; if(!SM_bIsFirstRoundOver) @@ -301,7 +301,8 @@ public Action:SM_RoundEnd_Event(Handle:event, const String:name[], bool:dontBroa if (GetConVarBool(SM_hCustomMaxDistance) && GetCustomMapMaxScore() > -1) CPrintToChatAll("{blue}[{default}!{blue}] {default}Custom Max Distance: {olive}%d", GetCustomMapMaxScore()); } } -public Action:SM_RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) + +void SM_RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) { if (!SM_bModuleIsEnabled) return; if(SM_bIsFirstRoundOver) @@ -311,7 +312,7 @@ public Action:SM_RoundStart_Event(Handle:event, const String:name[], bool:dontBr } } -public Action:SM_FinaleVehicleLeaving_Event(Handle:event, const String:name[], bool:dontBroadcast) +void SM_FinaleVehicleLeaving_Event(Handle:event, const String:name[], bool:dontBroadcast) { if (!SM_bModuleIsEnabled) return; @@ -323,9 +324,9 @@ bool:SM_IsPlayerIncap(client) return (GetEntProp(client, Prop_Send, "m_isIncapacitated", 1) > 0); } -public Action:SM_Cmd_Health(client, args) +Action SM_Cmd_Health(client, args) { - if (!SM_bModuleIsEnabled) return; + if (!SM_bModuleIsEnabled) return Plugin_Handled; decl iAliveCount; new Float:fAvgHealth = SM_CalculateAvgHealth(iAliveCount); @@ -360,6 +361,8 @@ public Action:SM_Cmd_Health(client, args) PrintToServer("[ScoreMod] Custom Max Distance: %d", GetCustomMapMaxScore()); } } + + return Plugin_Handled; } stock SM_CalculateSurvivalBonus() @@ -458,7 +461,7 @@ stock Float:SM_CalculateAvgHealth(&iAliveCount=0) return fAvgHealth; } -public Action:SM_Command_Say(client, args) +Action SM_Command_Say(client, args) { if (!SM_bModuleIsEnabled) return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_script_cmd_swap.sp b/addons/sourcemod/scripting/l4d2_script_cmd_swap.sp index 50dbd38de..2ab8a8c48 100644 --- a/addons/sourcemod/scripting/l4d2_script_cmd_swap.sp +++ b/addons/sourcemod/scripting/l4d2_script_cmd_swap.sp @@ -35,7 +35,7 @@ public void OnPluginStart() AddCommandListener(CmdScript, "script"); } -public Action CmdScript(int client, const char[] command, int arg) +Action CmdScript(int client, const char[] command, int arg) { static char args[BUFFER_SIZE]; GetCmdArgString(args, sizeof(args)); diff --git a/addons/sourcemod/scripting/l4d2_setscores.sp b/addons/sourcemod/scripting/l4d2_setscores.sp index 8ccebb1ee..9ada5255b 100644 --- a/addons/sourcemod/scripting/l4d2_setscores.sp +++ b/addons/sourcemod/scripting/l4d2_setscores.sp @@ -95,7 +95,7 @@ void LoadSDK() } //Starting point for the setscores command -public Action Command_SetScores(int client, int args) +Action Command_SetScores(int client, int args) { //Only allow during the first ready up of the round if (!inFirstReadyUpOfRound) { @@ -211,7 +211,7 @@ void SetScores(const int survScore, const int infectScore, const int iAdminIndex } //Handler for the vote -public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { +void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { switch (action) { case BuiltinVoteAction_End: { voteHandler = null; @@ -224,7 +224,7 @@ public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, } //Handles a score vote's results, if a majority voted for the score change then set the scores -public void ScoreVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void ScoreVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { if (item_info[i][BUILTINVOTEINFO_ITEM_INDEX] == BUILTINVOTES_VOTE_YES) { diff --git a/addons/sourcemod/scripting/l4d2_sg552_zoom_fix.sp b/addons/sourcemod/scripting/l4d2_sg552_zoom_fix.sp index a1ca9e415..8c3f2debd 100644 --- a/addons/sourcemod/scripting/l4d2_sg552_zoom_fix.sp +++ b/addons/sourcemod/scripting/l4d2_sg552_zoom_fix.sp @@ -14,7 +14,7 @@ public OnPluginStart() HookEvent("weapon_zoom", WeaponZoom_Event); } -public void WeaponZoom_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void WeaponZoom_Event(Event hEvent, const char[] eName, bool dontBroadcast) { int userid = GetEventInt(hEvent, "userid"); int client = GetClientOfUserId(userid); diff --git a/addons/sourcemod/scripting/l4d2_si_ffblock.sp b/addons/sourcemod/scripting/l4d2_si_ffblock.sp index 0fc87013a..141b5b86f 100644 --- a/addons/sourcemod/scripting/l4d2_si_ffblock.sp +++ b/addons/sourcemod/scripting/l4d2_si_ffblock.sp @@ -66,7 +66,7 @@ public void OnPluginStart() } } -public void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvars_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CvarsToType(); } @@ -78,14 +78,14 @@ void CvarsToType() g_bBlockWitchFF = g_hCvarBlockWitchFF.BoolValue; } -public void Event_WitchSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_WitchSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iWitch = hEvent.GetInt("witchid"); SDKHook(iWitch, SDKHook_OnTakeDamage, Hook_WitchOnTakeDamage); } -public Action Hook_WitchOnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) +Action Hook_WitchOnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) { if (!(iDamagetype & DMG_CLUB) || !g_bBlockWitchFF) { return Plugin_Continue; @@ -112,7 +112,7 @@ public void OnClientPutInServer(int iClient) SDKHook(iClient, SDKHook_OnTakeDamage, Hook_PlayerOnTakeDamage); } -public Action Hook_PlayerOnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) +Action Hook_PlayerOnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) { if (!(iDamagetype & DMG_CLUB) || !g_bFFBlock) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_si_staggers.sp b/addons/sourcemod/scripting/l4d2_si_staggers.sp index ce89253e0..5b22b7a4f 100644 --- a/addons/sourcemod/scripting/l4d2_si_staggers.sp +++ b/addons/sourcemod/scripting/l4d2_si_staggers.sp @@ -58,7 +58,7 @@ public void OnPluginStart() hCvarInfectedFlags.AddChangeHook(PluginActivityChanged); } -public void PluginActivityChanged(ConVar cvar, const char[] oldValue, const char[] newValue) +void PluginActivityChanged(ConVar cvar, const char[] oldValue, const char[] newValue) { iActiveFlags = hCvarInfectedFlags.IntValue; } diff --git a/addons/sourcemod/scripting/l4d2_skill_detect.sp b/addons/sourcemod/scripting/l4d2_skill_detect.sp index ff1daa896..a28d70431 100644 --- a/addons/sourcemod/scripting/l4d2_skill_detect.sp +++ b/addons/sourcemod/scripting/l4d2_skill_detect.sp @@ -574,7 +574,7 @@ public void OnPluginStart() } } -public void OnHookEvent() +void OnHookEvent() { HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy); HookEvent("scavenge_round_start", Event_RoundStart, EventHookMode_PostNoCopy); @@ -610,7 +610,7 @@ public void OnHookEvent() HookEvent("triggered_car_alarm", Event_CarAlarmGoesOff, EventHookMode_Post); } -public void CvarChange_PounceInterrupt(Handle convar, const char[] oldValue, const char[] newValue) +void CvarChange_PounceInterrupt(Handle convar, const char[] oldValue, const char[] newValue) { g_iPounceInterrupt = GetConVarInt(convar); } diff --git a/addons/sourcemod/scripting/l4d2_skill_detect/tracking.sp b/addons/sourcemod/scripting/l4d2_skill_detect/tracking.sp index a5ff37cd2..6d3fa7f69 100644 --- a/addons/sourcemod/scripting/l4d2_skill_detect/tracking.sp +++ b/addons/sourcemod/scripting/l4d2_skill_detect/tracking.sp @@ -3,7 +3,7 @@ #endif #define _skill_detect_tracking_included -public Action Event_RoundStart(Handle event, const char[] name, bool dontBroadcast) +Action Event_RoundStart(Handle event, const char[] name, bool dontBroadcast) { g_iRocksBeingThrownCount = 0; @@ -19,14 +19,14 @@ public Action Event_RoundStart(Handle event, const char[] name, bool dontBroadca return Plugin_Continue; } -public Action Event_RoundEnd(Handle event, const char[] name, bool dontBroadcast) +Action Event_RoundEnd(Handle event, const char[] name, bool dontBroadcast) { // clean trie, new cars will be created ClearTrie(g_hCarTrie); return Plugin_Continue; } -public Action Event_PlayerHurt(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerHurt(Handle event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(GetEventInt(event, "userid")); int attacker = GetClientOfUserId(GetEventInt(event, "attacker")); @@ -266,7 +266,7 @@ public Action Event_PlayerHurt(Handle event, const char[] name, bool dontBroadca return Plugin_Continue; } -public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if (!IsValidInfected(client)) @@ -318,7 +318,7 @@ public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadc } // player about to get incapped -public Action Event_IncapStart(Handle event, const char[] name, bool dontBroadcast) +Action Event_IncapStart(Handle event, const char[] name, bool dontBroadcast) { // test for deathcharges @@ -352,7 +352,7 @@ public Action Event_IncapStart(Handle event, const char[] name, bool dontBroadca } // trace attacks on hunters -public Action TraceAttack_Hunter(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) +Action TraceAttack_Hunter(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) { // track pinning g_iSpecialVictim[victim] = GetEntPropEnt(victim, Prop_Send, "m_pounceVictim"); @@ -369,7 +369,7 @@ public Action TraceAttack_Hunter(int victim, int& attacker, int& inflictor, floa return Plugin_Continue; } -public Action TraceAttack_Charger(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) +Action TraceAttack_Charger(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) { // track pinning int victimA = GetEntPropEnt(victim, Prop_Send, "m_carryVictim"); @@ -382,14 +382,14 @@ public Action TraceAttack_Charger(int victim, int& attacker, int& inflictor, flo return Plugin_Continue; } -public Action TraceAttack_Jockey(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) +Action TraceAttack_Jockey(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) { // track pinning g_iSpecialVictim[victim] = GetEntPropEnt(victim, Prop_Send, "m_jockeyVictim"); return Plugin_Continue; } -public Action Event_PlayerDeath(Handle hEvent, const char[] name, bool dontBroadcast) +Action Event_PlayerDeath(Handle hEvent, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(GetEventInt(hEvent, "userid")); int attacker = GetClientOfUserId(GetEventInt(hEvent, "attacker")); @@ -483,7 +483,7 @@ public Action Event_PlayerDeath(Handle hEvent, const char[] name, bool dontBroad return Plugin_Continue; } -public Action Event_PlayerShoved(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerShoved(Handle event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(GetEventInt(event, "userid")); int attacker = GetClientOfUserId(GetEventInt(event, "attacker")); @@ -534,7 +534,7 @@ public Action Event_PlayerShoved(Handle event, const char[] name, bool dontBroad return Plugin_Continue; } -public Action Event_LungePounce(Handle event, const char[] name, bool dontBroadcast) +Action Event_LungePounce(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -588,7 +588,7 @@ public Action Event_LungePounce(Handle event, const char[] name, bool dontBroadc return Plugin_Continue; } -public Action Timer_HunterDP(Handle timer, Handle pack) +Action Timer_HunterDP(Handle timer, Handle pack) { ResetPack(pack); int client = ReadPackCell(pack); @@ -601,7 +601,7 @@ public Action Timer_HunterDP(Handle timer, Handle pack) return Plugin_Continue; } -public Action Event_PlayerJumped(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerJumped(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -683,7 +683,7 @@ public Action Event_PlayerJumped(Handle event, const char[] name, bool dontBroad return Plugin_Continue; } -public Action Timer_CheckHop(Handle timer, any client) +Action Timer_CheckHop(Handle timer, any client) { // player back to ground = end of hop (streak)? @@ -710,7 +710,7 @@ public Action Timer_CheckHop(Handle timer, any client) return Plugin_Continue; } -public Action Timer_CheckHopStreak(Handle timer, any client) +Action Timer_CheckHopStreak(Handle timer, any client) { if (!IsValidClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Continue; @@ -729,7 +729,7 @@ public Action Timer_CheckHopStreak(Handle timer, any client) return Plugin_Continue; } -public Action Event_PlayerJumpApex(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerJumpApex(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -748,7 +748,7 @@ public Action Event_PlayerJumpApex(Handle event, const char[] name, bool dontBro return Plugin_Continue; } -public Action Event_JockeyRide(Handle event, const char[] name, bool dontBroadcast) +Action Event_JockeyRide(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -773,7 +773,7 @@ public Action Event_JockeyRide(Handle event, const char[] name, bool dontBroadca return Plugin_Continue; } -public Action Event_AbilityUse(Handle event, const char[] name, bool dontBroadcast) +Action Event_AbilityUse(Handle event, const char[] name, bool dontBroadcast) { // track hunters pouncing int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -810,7 +810,7 @@ public Action Event_AbilityUse(Handle event, const char[] name, bool dontBroadca } // charger carrying -public Action Event_ChargeCarryStart(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChargeCarryStart(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -840,7 +840,7 @@ public Action Event_ChargeCarryStart(Handle event, const char[] name, bool dontB return Plugin_Continue; } -public Action Event_ChargeImpact(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChargeImpact(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -860,7 +860,7 @@ public Action Event_ChargeImpact(Handle event, const char[] name, bool dontBroad return Plugin_Continue; } -public Action Event_ChargePummelStart(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChargePummelStart(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -871,7 +871,7 @@ public Action Event_ChargePummelStart(Handle event, const char[] name, bool dont return Plugin_Continue; } -public Action Event_ChargeCarryEnd(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChargeCarryEnd(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -885,14 +885,14 @@ public Action Event_ChargeCarryEnd(Handle event, const char[] name, bool dontBro return Plugin_Continue; } -public Action Timer_ChargeCarryEnd(Handle timer, any client) +Action Timer_ChargeCarryEnd(Handle timer, any client) { // set charge time to 0 to avoid deathcharge timer continuing g_iChargeVictim[client] = 0; // unset this so the repeated timer knows to stop for an ongroundcheck return Plugin_Continue; } -public Action Timer_ChargeCheck(Handle timer, any client) +Action Timer_ChargeCheck(Handle timer, any client) { // if something went wrong with the survivor or it was too long ago, forget about it if (!IsValidSurvivor(client) || !g_iVictimCharger[client] || g_fChargeTime[client] == 0.0 || (GetGameTime() - g_fChargeTime[client]) > MAX_CHARGE_TIME) @@ -924,7 +924,7 @@ public Action Timer_ChargeCheck(Handle timer, any client) return Plugin_Continue; } -public Action Timer_DeathChargeCheck(Handle timer, any client) +Action Timer_DeathChargeCheck(Handle timer, any client) { if (!IsValidClientInGame(client)) return Plugin_Continue; @@ -1031,7 +1031,7 @@ public void OnEntityCreated(int entity, const char[] classname) } } -public void OnEntitySpawned_CarAlarm(int entity) +void OnEntitySpawned_CarAlarm(int entity) { if (!IsValidEntity(entity)) return; @@ -1047,7 +1047,7 @@ public void OnEntitySpawned_CarAlarm(int entity) HookSingleEntityOutput(entity, "OnCarAlarmStart", Hook_CarAlarmStart); } -public void OnEntitySpawned_CarAlarmGlass(int entity) +void OnEntitySpawned_CarAlarmGlass(int entity) { if (!IsValidEntity(entity)) return; @@ -1107,7 +1107,7 @@ public void OnEntityDestroyed(int entity) } } -public Action Timer_WitchKeyDelete(Handle timer, any witch) +Action Timer_WitchKeyDelete(Handle timer, any witch) { char witch_key[10]; FormatEx(witch_key, sizeof(witch_key), "%x", witch); @@ -1115,7 +1115,7 @@ public Action Timer_WitchKeyDelete(Handle timer, any witch) return Plugin_Continue; } -public Action Timer_CheckRockSkeet(Handle timer, any rock) +Action Timer_CheckRockSkeet(Handle timer, any rock) { int rock_array[3]; char rock_key[10]; @@ -1134,7 +1134,7 @@ public Action Timer_CheckRockSkeet(Handle timer, any rock) } // boomer got somebody -public Action Event_PlayerBoomed(Handle event, const char[] name, bool dontBroadcast) +Action Event_PlayerBoomed(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "attacker")); bool byBoom = GetEventBool(event, "by_boomer"); @@ -1167,7 +1167,7 @@ public Action Timer_BoomVomitCheck(Handle timer, any client) } // boomers that didn't bile anyone -public Action Event_BoomerExploded(Handle event, const char[] name, bool dontBroadcast) +Action Event_BoomerExploded(Handle event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); bool biled = GetEventBool(event, "splashedbile"); @@ -1181,7 +1181,7 @@ public Action Event_BoomerExploded(Handle event, const char[] name, bool dontBro } // crown tracking -public Action Event_WitchSpawned(Handle event, const char[] name, bool dontBroadcast) +Action Event_WitchSpawned(Handle event, const char[] name, bool dontBroadcast) { int witch = GetEventInt(event, "witchid"); @@ -1195,7 +1195,7 @@ public Action Event_WitchSpawned(Handle event, const char[] name, bool dontBroad return Plugin_Continue; } -public Action Event_WitchKilled(Handle event, const char[] name, bool dontBroadcast) +Action Event_WitchKilled(Handle event, const char[] name, bool dontBroadcast) { int witch = GetEventInt(event, "witchid"); int attacker = GetClientOfUserId(GetEventInt(event, "userid")); @@ -1216,7 +1216,7 @@ public Action Event_WitchKilled(Handle event, const char[] name, bool dontBroadc return Plugin_Continue; } -public Action Event_WitchHarasserSet(Handle event, const char[] name, bool dontBroadcast) +Action Event_WitchHarasserSet(Handle event, const char[] name, bool dontBroadcast) { int witch = GetEventInt(event, "witchid"); @@ -1242,7 +1242,7 @@ public Action Event_WitchHarasserSet(Handle event, const char[] name, bool dontB return Plugin_Continue; } -public Action OnTakeDamageByWitch(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) +Action OnTakeDamageByWitch(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) { // if a survivor is hit by a witch, note it in the witch damage array (maxplayers+2 = 1) if (IsValidSurvivor(victim) && damage > 0.0) @@ -1274,7 +1274,7 @@ public Action OnTakeDamageByWitch(int victim, int& attacker, int& inflictor, flo return Plugin_Continue; } -public void OnTakeDamagePost_Witch(int victim, int attacker, int inflictor, float damage, int damagetype) +void OnTakeDamagePost_Witch(int victim, int attacker, int inflictor, float damage, int damagetype) { // only called for witches, so no check required @@ -1322,7 +1322,7 @@ public void OnTakeDamagePost_Witch(int victim, int attacker, int inflictor, floa } } -public Action Timer_CheckWitchCrown(Handle timer, Handle pack) +Action Timer_CheckWitchCrown(Handle timer, Handle pack) { ResetPack(pack); int attacker = ReadPackCell(pack); @@ -1334,7 +1334,7 @@ public Action Timer_CheckWitchCrown(Handle timer, Handle pack) return Plugin_Continue; } -stock void CheckWitchCrown(int witch, int attacker, bool bOneShot = false) +void CheckWitchCrown(int witch, int attacker, bool bOneShot = false) { char witch_key[10]; FormatEx(witch_key, sizeof(witch_key), "%x", witch); @@ -1424,7 +1424,7 @@ stock void CheckWitchCrown(int witch, int attacker, bool bOneShot = false) } // tank rock -public Action TraceAttack_Rock(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) +Action TraceAttack_Rock(int victim, int& attacker, int& inflictor, float& damage, int& damagetype, int& ammotype, int hitbox, int hitgroup) { if (IsValidSurvivor(attacker)) { @@ -1443,7 +1443,7 @@ public Action TraceAttack_Rock(int victim, int& attacker, int& inflictor, float& return Plugin_Continue; } -public void OnTouch_Rock(int entity) +void OnTouch_Rock(int entity) { // remember that the rock wasn't shot char rock_key[10]; @@ -1456,7 +1456,7 @@ public void OnTouch_Rock(int entity) } // smoker tongue cutting & self clears -public Action Event_TonguePullStopped(Handle event, const char[] name, bool dontBroadcast) +Action Event_TonguePullStopped(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -1493,7 +1493,7 @@ public Action Event_TonguePullStopped(Handle event, const char[] name, bool dont return Plugin_Continue; } -public Action Event_TongueGrab(Handle event, const char[] name, bool dontBroadcast) +Action Event_TongueGrab(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -1512,7 +1512,7 @@ public Action Event_TongueGrab(Handle event, const char[] name, bool dontBroadca return Plugin_Continue; } -public Action Event_ChokeStart(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChokeStart(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "userid")); @@ -1521,7 +1521,7 @@ public Action Event_ChokeStart(Handle event, const char[] name, bool dontBroadca return Plugin_Continue; } -public Action Event_ChokeStop(Handle event, const char[] name, bool dontBroadcast) +Action Event_ChokeStop(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "userid")); int victim = GetClientOfUserId(GetEventInt(event, "victim")); @@ -1541,7 +1541,7 @@ public Action Event_ChokeStop(Handle event, const char[] name, bool dontBroadcas } // car alarm handling -public void Hook_CarAlarmStart(const char[] output, int caller, int activator, float delay) +void Hook_CarAlarmStart(const char[] output, int caller, int activator, float delay) { // char car_key[10]; // FormatEx(car_key, sizeof(car_key), "%x", entity); @@ -1549,13 +1549,13 @@ public void Hook_CarAlarmStart(const char[] output, int caller, int activator, f PrintDebug("calarm trigger: caller %i / activator %i / delay: %.2f", caller, activator, delay); } -public Action Event_CarAlarmGoesOff(Handle event, const char[] name, bool dontBroadcast) +Action Event_CarAlarmGoesOff(Handle event, const char[] name, bool dontBroadcast) { g_fLastCarAlarm = GetGameTime(); return Plugin_Continue; } -public Action OnTakeDamage_Car(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) +Action OnTakeDamage_Car(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) { if (!IsValidSurvivor(attacker)) return Plugin_Continue; @@ -1593,7 +1593,7 @@ public Action OnTakeDamage_Car(int victim, int& attacker, int& inflictor, float& return Plugin_Continue; } -public void OnTouch_Car(int entity, int client) +void OnTouch_Car(int entity, int client) { if (!IsValidSurvivor(client)) return; @@ -1609,7 +1609,7 @@ public void OnTouch_Car(int entity, int client) return; } -public Action OnTakeDamage_CarGlass(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) +Action OnTakeDamage_CarGlass(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) { // check for either: boomer pop or survivor if (!IsValidSurvivor(attacker)) @@ -1645,7 +1645,7 @@ public Action OnTakeDamage_CarGlass(int victim, int& attacker, int& inflictor, f return Plugin_Continue; } -public void OnTouch_CarGlass(int entity, int client) +void OnTouch_CarGlass(int entity, int client) { if (!IsValidSurvivor(client)) return; @@ -1666,7 +1666,7 @@ public void OnTouch_CarGlass(int entity, int client) return; } -public Action Timer_CheckAlarm(Handle timer, any entity) +Action Timer_CheckAlarm(Handle timer, any entity) { // PrintToChatAll( "checking alarm: time: %.3f", GetGameTime() - g_fLastCarAlarm ); diff --git a/addons/sourcemod/scripting/l4d2_slowdown_control.sp b/addons/sourcemod/scripting/l4d2_slowdown_control.sp index 69b07393e..a03c66f74 100644 --- a/addons/sourcemod/scripting/l4d2_slowdown_control.sp +++ b/addons/sourcemod/scripting/l4d2_slowdown_control.sp @@ -127,7 +127,7 @@ public void OnConfigsExecuted() CvarsToType(); } -public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { CvarsToType(); } @@ -143,7 +143,7 @@ void CvarsToType() fJockeyMinMountedSpeed = hCvarJockeyMinMoundedSpeed.FloatValue; } -public void TankSpawn(Event event, const char[] name, bool dontBroadcast) +void TankSpawn(Event event, const char[] name, bool dontBroadcast) { if (!tankInPlay) { tankInPlay = true; @@ -153,7 +153,7 @@ public void TankSpawn(Event event, const char[] name, bool dontBroadcast) } } -public void TankDeath(Event event, const char[] name, bool dontBroadcast) +void TankDeath(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if (client > 0 && IsInfected(client) && IsTank(client)) { @@ -161,7 +161,7 @@ public void TankDeath(Event event, const char[] name, bool dontBroadcast) } } -public Action Timer_CheckTank(Handle timer) +Action Timer_CheckTank(Handle timer) { int tankclient = FindTankClient(); if (!tankclient || !IsPlayerAlive(tankclient)) { @@ -174,14 +174,14 @@ public Action Timer_CheckTank(Handle timer) return Plugin_Stop; } -public void RoundStart(Event event, const char[] name, bool dontBroadcast) +void RoundStart(Event event, const char[] name, bool dontBroadcast) { tankInPlay = false; HookCrouchTriggers(); } // Hook trigger_multiple entities that are named "l4d2_slowdown_crouch_speed" -public void HookCrouchTriggers() +void HookCrouchTriggers() { bFoundCrouchTrigger = false; @@ -205,14 +205,14 @@ public void HookCrouchTriggers() } } -public void CrouchSpeedStartTouch(const char[] output, int caller, int activator, float delay) +void CrouchSpeedStartTouch(const char[] output, int caller, int activator, float delay) { if (0 < activator <= MaxClients && IsClientInGame(activator)) { bPlayerInCrouchTrigger[activator] = true; } } -public void CrouchSpeedEndTouch(const char[] output, int caller, int activator, float delay) +void CrouchSpeedEndTouch(const char[] output, int caller, int activator, float delay) { if (0 < activator <= MaxClients && IsClientInGame(activator)) { bPlayerInCrouchTrigger[activator] = false; @@ -224,7 +224,7 @@ public void CrouchSpeedEndTouch(const char[] output, int caller, int activator, * Slowdown from gunfire: Tank & SI * **/ -public void PlayerHurt(Event event, const char[] name, bool dontBroadcast) +void PlayerHurt(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if (client > 0 && IsInfected(client)) { diff --git a/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval.sp b/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval.sp index 4dd4e96a6..af60931d4 100644 --- a/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval.sp +++ b/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval.sp @@ -60,12 +60,12 @@ void InitGameData() delete hGamedata; } -public void tongue_choke_damage_amount_ValueChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void tongue_choke_damage_amount_ValueChanged(ConVar convar, const char[] oldValue, const char[] newValue) { convar.SetInt(1); // hack-hack: game tries to change this cvar for some reason, can't be arsed so HARDCODETHATSHIT } -public void OnTongueGrab(Event hEvent, const char[] eName, bool dontBroadcast) +void OnTongueGrab(Event hEvent, const char[] eName, bool dontBroadcast) { int userid = hEvent.GetInt("victim"); int client = GetClientOfUserId(userid); @@ -76,7 +76,7 @@ public void OnTongueGrab(Event hEvent, const char[] eName, bool dontBroadcast) CreateTimer(fTimerUpdate, FixDragInterval, userid, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } -public Action FixDragInterval(Handle hTimer, any userid) +Action FixDragInterval(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); if (client > 0 && GetClientTeam(client) == TEAM_SURVIVOR && IsSurvivorBeingDragged(client)) { diff --git a/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval_zone.sp b/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval_zone.sp index 0280101be..e3122c2fc 100644 --- a/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval_zone.sp +++ b/addons/sourcemod/scripting/l4d2_smoker_drag_damage_interval_zone.sp @@ -68,12 +68,12 @@ void InitGameData() delete hGamedata; } -public void tongue_choke_damage_amount_ValueChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void tongue_choke_damage_amount_ValueChanged(ConVar convar, const char[] oldValue, const char[] newValue) { SetConVarInt(convar, 1); // hack-hack: game tries to change this cvar for some reason, can't be arsed so HARDCODETHATSHIT } -public void OnTongueGrab(Event hEvent, const char[] name, bool dontBroadcast) +void OnTongueGrab(Event hEvent, const char[] name, bool dontBroadcast) { int userid = hEvent.GetInt("victim"); int client = GetClientOfUserId(userid); @@ -96,7 +96,7 @@ void FixDragInterval(int client, int userid) CreateTimer(fTimerUpdate, FixDragIntervalTimer, userid, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } -public Action FirstDamage(Handle hTimer, any userid) +Action FirstDamage(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); if (client > 0 && GetClientTeam(client) == TEAM_SURVIVOR && IsSurvivorBeingDragged(client)) { @@ -113,7 +113,7 @@ public Action FirstDamage(Handle hTimer, any userid) return Plugin_Continue; } -public Action FixDragIntervalTimer(Handle hTimer, any userid) +Action FixDragIntervalTimer(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); if (client > 0 && GetClientTeam(client) == TEAM_SURVIVOR && IsSurvivorBeingDragged(client)) { diff --git a/addons/sourcemod/scripting/l4d2_sniper_bodyshot.sp b/addons/sourcemod/scripting/l4d2_sniper_bodyshot.sp index 035edf37b..d47c9e468 100644 --- a/addons/sourcemod/scripting/l4d2_sniper_bodyshot.sp +++ b/addons/sourcemod/scripting/l4d2_sniper_bodyshot.sp @@ -49,7 +49,7 @@ public void OnClientPutInServer(int iClient) SDKHook(iClient, SDKHook_TraceAttack, TraceAttack); } -public Action TraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, \ +Action TraceAttack(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, \ int &fDamageType, int &iAmmoType, int iHitBox, int iHitGroup) { if (iHitGroup != HITGROUP_STOMACH) { diff --git a/addons/sourcemod/scripting/l4d2_sound_manipulation.sp b/addons/sourcemod/scripting/l4d2_sound_manipulation.sp index 5964006bb..6509eedb2 100644 --- a/addons/sourcemod/scripting/l4d2_sound_manipulation.sp +++ b/addons/sourcemod/scripting/l4d2_sound_manipulation.sp @@ -30,7 +30,7 @@ public void OnPluginStart() AddNormalSoundHook(SoundHook); } -public Action SoundHook(int clients[MAXPLAYERS], int &numClients, char sample[PLATFORM_MAX_PATH],int &entity, int &channel, float &volume, int &level, int &pitch, int &flags,char soundEntry[PLATFORM_MAX_PATH], int &seed) +Action SoundHook(int clients[MAXPLAYERS], int &numClients, char sample[PLATFORM_MAX_PATH],int &entity, int &channel, float &volume, int &level, int &pitch, int &flags,char soundEntry[PLATFORM_MAX_PATH], int &seed) { if (!iSoundFlags) // Are we even blocking sounds? return Plugin_Continue; @@ -48,7 +48,7 @@ public Action SoundHook(int clients[MAXPLAYERS], int &numClients, char sample[PL return Plugin_Continue; } -public void FlagsChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void FlagsChanged(ConVar convar, const char[] oldValue, const char[] newValue) { iSoundFlags = cvarSoundFlags.IntValue; } \ No newline at end of file diff --git a/addons/sourcemod/scripting/l4d2_sounds_blocker.sp b/addons/sourcemod/scripting/l4d2_sounds_blocker.sp index dfeb40869..7de1f07a1 100644 --- a/addons/sourcemod/scripting/l4d2_sounds_blocker.sp +++ b/addons/sourcemod/scripting/l4d2_sounds_blocker.sp @@ -93,7 +93,7 @@ public void OnPluginStart() // ------ Whitelist/Custom ------ -public Action WhitelistPath_Cmd(int args) +Action WhitelistPath_Cmd(int args) { char path[255]; GetCmdArg(1, path, sizeof(path)); @@ -101,7 +101,7 @@ public Action WhitelistPath_Cmd(int args) return Plugin_Handled; } -public Action CustomPath_Cmd(int args) +Action CustomPath_Cmd(int args) { char path[255]; GetCmdArg(1, path, sizeof(path)); @@ -110,17 +110,17 @@ public Action CustomPath_Cmd(int args) } // ------ Sound Blocking ------ -public Action OnNormalSound(int clients[MAXPLAYERS], int &numClients, char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags, char soundEntry[PLATFORM_MAX_PATH], int &seed) +Action OnNormalSound(int clients[MAXPLAYERS], int &numClients, char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags, char soundEntry[PLATFORM_MAX_PATH], int &seed) { return checkSound(sample); } -public Action OnAmbientSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) +Action OnAmbientSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) { return checkSound(sample); } -public Action checkSound(char sample[256]) +Action checkSound(char sample[256]) { // Fireworks if (h_FireWorks.BoolValue) { @@ -222,7 +222,7 @@ int CountValidItemsInArray(char array[255][255]) { return val; } -public Action checkWhitelist(char sample[256]) { +Action checkWhitelist(char sample[256]) { int itemsInArray = CountValidItemsInArray(a_whitelistSoundPaths) + 1; if (itemsInArray > 0) { for (int i = 0; i < itemsInArray; i++) { diff --git a/addons/sourcemod/scripting/l4d2_spitblock.sp b/addons/sourcemod/scripting/l4d2_spitblock.sp index 10913387f..9127cc260 100644 --- a/addons/sourcemod/scripting/l4d2_spitblock.sp +++ b/addons/sourcemod/scripting/l4d2_spitblock.sp @@ -55,7 +55,7 @@ public void OnPluginStart() } } -public Action AddSpitBlockSquare(int iArgs) +Action AddSpitBlockSquare(int iArgs) { float fSquare[4]; char sMapName[MAX_MAP_NAME_SIZE], sBuffer[32], sGetCmd[128]; @@ -83,7 +83,7 @@ public Action AddSpitBlockSquare(int iArgs) return Plugin_Handled; } -public Action RemoveSpitBlockSquare(int iArgs) +Action RemoveSpitBlockSquare(int iArgs) { float fSquare[4]; char sMapName[MAX_MAP_NAME_SIZE], sGetCmd[128]; @@ -130,7 +130,7 @@ public void OnClientPostAdminCheck(int iClient) SDKHook(iClient, SDKHook_OnTakeDamage, stop_spit_dmg); } -public Action stop_spit_dmg(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType) +Action stop_spit_dmg(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType) { if (!g_bIsBlockEnable || !(iDamageType & DMG_TYPE_SPIT)) { //for performance return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_static_shotgun_spread.sp b/addons/sourcemod/scripting/l4d2_static_shotgun_spread.sp index 864e719c8..548395893 100644 --- a/addons/sourcemod/scripting/l4d2_static_shotgun_spread.sp +++ b/addons/sourcemod/scripting/l4d2_static_shotgun_spread.sp @@ -155,19 +155,19 @@ static void HotPatchFactor(int factor) StoreToAddress(pAddr + view_as
(g_FactorOffset[eLinux]), factor, NumberType_Int32); } -public void OnRing1BulletsChange(ConVar hCvar, const char[] oldVal, const char[] newVal) +void OnRing1BulletsChange(ConVar hCvar, const char[] oldVal, const char[] newVal) { int nBullets = StringToInt(newVal); HotPatchBullets(nBullets); } -public void OnRing1FactorChange(ConVar hCvar, const char[] oldVal, const char[] newVal) +void OnRing1FactorChange(ConVar hCvar, const char[] oldVal, const char[] newVal) { int factor = StringToInt(newVal); HotPatchFactor(factor); } -public void OnCenterPelletChange(ConVar hCvar, const char[] oldVal, const char[] newVal) +void OnCenterPelletChange(ConVar hCvar, const char[] oldVal, const char[] newVal) { bool value = !!StringToInt(newVal); HotPatchCenterPellet(value); diff --git a/addons/sourcemod/scripting/l4d2_stats.sp b/addons/sourcemod/scripting/l4d2_stats.sp index 2ff98ff4e..ee4076d60 100644 --- a/addons/sourcemod/scripting/l4d2_stats.sp +++ b/addons/sourcemod/scripting/l4d2_stats.sp @@ -65,7 +65,7 @@ public void OnPluginStart() HookEvent("triggered_car_alarm", Event_AlarmCar); } -public void Event_PlayerSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); if (client == 0 || !IsClientInGame(client)) @@ -102,7 +102,7 @@ public void Event_PlayerSpawn(Event hEvent, const char[] sEventName, bool bDontB } } -public void Event_WeaponFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_WeaponFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); for (int i = 1; i <= MaxClients; i++) @@ -131,7 +131,7 @@ public void OnMapEnd() g_bHasRoundEnded = true; } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_bHasRoundEnded = false; @@ -140,7 +140,7 @@ public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBr BoomerKillTime = 0.0; } -public void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasRoundEnded) { @@ -156,7 +156,7 @@ public void Event_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroa } // Pounce tracking, from skeet announce -public void Event_AbilityUse(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_AbilityUse(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasRoundEnded) { @@ -180,7 +180,7 @@ public void Event_AbilityUse(Event hEvent, const char[] sEventName, bool bDontBr } } -public void Event_LungePounce(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_LungePounce(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int attacker = GetClientOfUserId(hEvent.GetInt("userid")); int zombieclass = GetInfectedClass(attacker); @@ -191,7 +191,7 @@ public void Event_LungePounce(Event hEvent, const char[] sEventName, bool bDontB } } -public Action Timer_GroundedCheck(Handle hTimer, any userid) +Action Timer_GroundedCheck(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); if (client > 0 && !(GetEntityFlags(client) & FL_ONGROUND)) @@ -203,13 +203,13 @@ public Action Timer_GroundedCheck(Handle hTimer, any userid) return Plugin_Stop; } -public Action Timer_KillBoomer(Handle hTimer) +Action Timer_KillBoomer(Handle hTimer) { BoomerKillTime += 0.1; return Plugin_Continue; } -public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasRoundEnded) { @@ -279,7 +279,7 @@ public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBr } } -public void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasRoundEnded) { @@ -483,7 +483,7 @@ public void Event_PlayerDeath(Event hEvent, const char[] sEventName, bool bDontB } } -public Action Timer_BoomerKilledCheck(Handle hTimer) +Action Timer_BoomerKilledCheck(Handle hTimer) { BoomerKillTime = BoomerKillTime - 0.2; @@ -541,7 +541,7 @@ public Action Timer_BoomerKilledCheck(Handle hTimer) return Plugin_Stop; } -public void Event_PlayerShoved(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerShoved(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasRoundEnded) { @@ -580,7 +580,7 @@ public void Event_PlayerShoved(Event hEvent, const char[] sEventName, bool bDont } } -public Action Timer_BoomerShove(Handle hTimer) +Action Timer_BoomerShove(Handle hTimer) { // PrintToChatAll("[DEBUG] BoomerShove timer expired, credit for boomer shutdown is available to anyone at this point!"); g_hBoomerShoveTimer = null; @@ -589,7 +589,7 @@ public Action Timer_BoomerShove(Handle hTimer) return Plugin_Stop; } -public void Event_PlayerBoomed(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerBoomed(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bHasBoomLanded) { @@ -641,7 +641,7 @@ public void Event_PlayerBoomed(Event hEvent, const char[] sEventName, bool bDont * "userid" "short" // person who triggered the car alarm * } */ -public void Event_AlarmCar(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_AlarmCar(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iClient = GetClientOfUserId(hEvent.GetInt("userid")); if (iClient > 0 && GetClientTeam(iClient) == TEAM_SURVIVOR) @@ -669,7 +669,7 @@ void ClearDamage(int client) } } -public int ClientValue2DSortDesc(int[] x, int[] y, const int[][] array, Handle hndl) +int ClientValue2DSortDesc(int[] x, int[] y, const int[][] array, Handle hndl) { if (x[1] > y[1]) { diff --git a/addons/sourcemod/scripting/l4d2_tank_announce.sp b/addons/sourcemod/scripting/l4d2_tank_announce.sp index 04392febf..542a57f41 100644 --- a/addons/sourcemod/scripting/l4d2_tank_announce.sp +++ b/addons/sourcemod/scripting/l4d2_tank_announce.sp @@ -68,7 +68,7 @@ public void L4D_OnSpawnTank_Post(int client, const float vecPos[3], const float EmitSoundToAll(DANG); } -public void Event_PlayerSpawn(Event event, char[] name, bool dontBroadcast) +void Event_PlayerSpawn(Event event, char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); diff --git a/addons/sourcemod/scripting/l4d2_tank_attack_control.sp b/addons/sourcemod/scripting/l4d2_tank_attack_control.sp index 92d5cae33..689f21399 100644 --- a/addons/sourcemod/scripting/l4d2_tank_attack_control.sp +++ b/addons/sourcemod/scripting/l4d2_tank_attack_control.sp @@ -50,14 +50,14 @@ public void OnPluginStart() HookEvent("tank_spawn", TankSpawn_Event); } -public void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (int i = 1; i <= MaxClients; i++) { throwQueuedAt[i] = 0.0; } } -public void TankSpawn_Event(Event event, const char[] name, bool dontBroadcast) +void TankSpawn_Event(Event event, const char[] name, bool dontBroadcast) { int tank = GetClientOfUserId(GetEventInt(event, "userid")); if (IsFakeClient(tank)) return; diff --git a/addons/sourcemod/scripting/l4d2_tank_attack_control_nextmod.sp b/addons/sourcemod/scripting/l4d2_tank_attack_control_nextmod.sp index 78b45b0fa..d4999b48b 100644 --- a/addons/sourcemod/scripting/l4d2_tank_attack_control_nextmod.sp +++ b/addons/sourcemod/scripting/l4d2_tank_attack_control_nextmod.sp @@ -50,14 +50,14 @@ public void OnPluginStart() HookEvent("tank_spawn", TankSpawn_Event); } -public void RoundStartEvent(Event hEvent, char[] sEventName, bool bDontBroadcast) +void RoundStartEvent(Event hEvent, char[] sEventName, bool bDontBroadcast) { for (int i = 1; i <= MaxClients; i++) { throwQueuedAt[i] = 0.0; } } -public void TankSpawn_Event(Event hEvent, char[] sEventName, bool bDontBroadcast) +void TankSpawn_Event(Event hEvent, char[] sEventName, bool bDontBroadcast) { int tank = GetClientOfUserId(hEvent.GetInt("userid")); if (IsFakeClient(tank)) { @@ -215,7 +215,7 @@ void SetClientButtons(int client, int button) } } -public Action ResetJumpRockCooldown(Handle hTimer, any userid) +Action ResetJumpRockCooldown(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); @@ -228,7 +228,7 @@ public Action ResetJumpRockCooldown(Handle hTimer, any userid) return Plugin_Stop; } -public Action Timer_Countdown(Handle hTimer) +Action Timer_Countdown(Handle hTimer) { if (g_fCooldownTime <= 0.0) { return Plugin_Stop; diff --git a/addons/sourcemod/scripting/l4d2_tank_damage_cvars.sp b/addons/sourcemod/scripting/l4d2_tank_damage_cvars.sp index 9a9e43a42..a60f21054 100644 --- a/addons/sourcemod/scripting/l4d2_tank_damage_cvars.sp +++ b/addons/sourcemod/scripting/l4d2_tank_damage_cvars.sp @@ -54,7 +54,7 @@ public void OnClientDisconnect(int iClient) SDKUnhook(iClient, SDKHook_OnTakeDamage, Hook_OnTakeDamage); } -public Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) +Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) { if (iDamagetype != DMG_CLUB) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_tank_horde_monitor.sp b/addons/sourcemod/scripting/l4d2_tank_horde_monitor.sp index cbfb28100..9c75640fe 100644 --- a/addons/sourcemod/scripting/l4d2_tank_horde_monitor.sp +++ b/addons/sourcemod/scripting/l4d2_tank_horde_monitor.sp @@ -87,7 +87,7 @@ void InitGameData() delete hDamedata2; } -public void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) +void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) { ResetWarnings(); TimerCleanUp(); @@ -96,7 +96,7 @@ public void RoundStartEvent(Event hEvent, const char[] name, bool dontBroadcast) fProgressFlowPercent = 0.0; } -public void RoundEndEvent(Event hEvent, const char[] name, bool dontBroadcast) +void RoundEndEvent(Event hEvent, const char[] name, bool dontBroadcast) { ResetWarnings(); TimerCleanUp(); @@ -114,7 +114,7 @@ public void OnMapEnd() fProgressFlowPercent = 0.0; } -public void TankSpawn(Event event, const char[] name, bool dontBroadcast) +void TankSpawn(Event event, const char[] name, bool dontBroadcast) { if (!tankInPlay){ tankInPlay = true; @@ -129,7 +129,7 @@ public void TankSpawn(Event event, const char[] name, bool dontBroadcast) } } -public void TankDeath(Event event, const char[] name, bool dontBroadcast) +void TankDeath(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if (client > 0 && IsInfected(client) && IsTank(client)) { @@ -145,7 +145,7 @@ public void OnClientDisconnect(int client) } } -public Action Timer_CheckTank(Handle timer) +Action Timer_CheckTank(Handle timer) { int tankclient = FindTankClient(); if (!tankclient || !IsPlayerAlive(tankclient)) { @@ -156,7 +156,7 @@ public Action Timer_CheckTank(Handle timer) return Plugin_Stop; } -public void AnnounceTankSpawn() +void AnnounceTankSpawn() { fProgressFlowPercent = GetFlowUntilBypass(fFurthestFlow, fBypassFlow); CPrintToChatAll("<{olive}Horde{default}> Horde has {blue}paused{default} due to tank in play! Progressing by {blue}%0.1f%%{default} will start the horde.", fProgressFlowPercent); @@ -166,7 +166,7 @@ public void AnnounceTankSpawn() g_hFlowCheckTimer = CreateTimer(2.0, FlowCheckTimer, _, TIMER_REPEAT); } -public Action FlowCheckTimer(Handle hTimer) +Action FlowCheckTimer(Handle hTimer) { if (!tankInPlay || announcedHordeResume || announcedHordeMax){ g_hFlowCheckTimer = null; @@ -312,7 +312,7 @@ float GetFlowUntilBypass(float fCurrentFlowValue, float fBypassFlowValue) return result; } -public void TimerCleanUp() +void TimerCleanUp() { if (g_hFlowCheckTimer != null){ delete g_hFlowCheckTimer; @@ -320,7 +320,7 @@ public void TimerCleanUp() } } -public void ResetWarnings() +void ResetWarnings() { tankInPlay = false; tankInPlayDelay = false; diff --git a/addons/sourcemod/scripting/l4d2_tank_melee_fury.sp b/addons/sourcemod/scripting/l4d2_tank_melee_fury.sp index e37b785ca..9a6484904 100644 --- a/addons/sourcemod/scripting/l4d2_tank_melee_fury.sp +++ b/addons/sourcemod/scripting/l4d2_tank_melee_fury.sp @@ -26,7 +26,7 @@ public OnPluginStart() // ResetConVar(FindConVar("tank_swing_miss_interval")); // } -public Action:OnPlayerHurt(Handle:event, String:event_name[], bool:dontBroadcast) +Action:OnPlayerHurt(Handle:event, String:event_name[], bool:dontBroadcast) { new tank = GetClientOfUserId(GetEventInt(event, "userid")); new survivor = GetClientOfUserId(GetEventInt(event, "attacker")); diff --git a/addons/sourcemod/scripting/l4d2_tank_props_glow.sp b/addons/sourcemod/scripting/l4d2_tank_props_glow.sp index cfcf58008..d23f7d561 100644 --- a/addons/sourcemod/scripting/l4d2_tank_props_glow.sp +++ b/addons/sourcemod/scripting/l4d2_tank_props_glow.sp @@ -91,7 +91,7 @@ public void OnLibraryAdded(const char[] name) } } -public void ConVarChanged_Cvars(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) +void ConVarChanged_Cvars(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) { GetCvars(); } @@ -108,7 +108,7 @@ void GetCvars() g_iCvarColor = GetColor(sColor); } -public void TankPropsGlowAllow(Handle hConVar, const char[] sOldValue, const char[] sNewValue) +void TankPropsGlowAllow(Handle hConVar, const char[] sOldValue, const char[] sNewValue) { if (!g_hCvartankPropsGlow.BoolValue) { PluginDisable(); @@ -117,7 +117,7 @@ public void TankPropsGlowAllow(Handle hConVar, const char[] sOldValue, const cha } } -public void ConVarChanged_Glow(Handle hConVar, const char[] sOldValue, const char[] sNewValue) +void ConVarChanged_Glow(Handle hConVar, const char[] sOldValue, const char[] sNewValue) { GetCvars(); @@ -140,7 +140,7 @@ public void ConVarChanged_Glow(Handle hConVar, const char[] sOldValue, const cha } } -public void ConVarChanged_Range(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void ConVarChanged_Range(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { GetCvars(); @@ -162,7 +162,7 @@ public void ConVarChanged_Range(ConVar hConVar, const char[] sOldValue, const ch } } -public void ConVarChanged_RangeMin(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void ConVarChanged_RangeMin(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { GetCvars(); @@ -248,7 +248,7 @@ public void OnMapEnd() g_hTankPropsHit.Clear(); } -public void TankPropRoundReset(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void TankPropRoundReset(Event hEvent, const char[] sEventName, bool bDontBroadcast) { DHookRemoveEntityListener(ListenType_Created, PossibleTankPropCreated); @@ -258,7 +258,7 @@ public void TankPropRoundReset(Event hEvent, const char[] sEventName, bool bDont g_hTankPropsHit.Clear(); } -public void TankPropTankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void TankPropTankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (g_bTankSpawned) { return; @@ -274,7 +274,8 @@ public void TankPropTankSpawn(Event hEvent, const char[] sEventName, bool bDontB g_bTankSpawned = true; } -public void PD_ev_EntityKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) +/* // error 203: symbol is never used: "PD_ev_EntityKilled" +void PD_ev_EntityKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bTankSpawned) { return; @@ -286,8 +287,9 @@ public void PD_ev_EntityKilled(Event hEvent, const char[] sEventName, bool bDont CreateTimer(1.5, TankDeadCheck, _, TIMER_FLAG_NO_MAPCHANGE); } } +*/ -public void TankPropTankKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void TankPropTankKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bTankSpawned) { return; @@ -296,7 +298,7 @@ public void TankPropTankKilled(Event hEvent, const char[] sEventName, bool bDont CreateTimer(0.5, TankDeadCheck, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action TankDeadCheck(Handle hTimer) +Action TankDeadCheck(Handle hTimer) { if (GetTankClient() == -1) { CreateTimer(g_hCvarTankPropsBeGone.FloatValue, TankPropsBeGone); @@ -309,14 +311,14 @@ public Action TankDeadCheck(Handle hTimer) return Plugin_Stop; } -public Action TankPropsBeGone(Handle hTimer) +Action TankPropsBeGone(Handle hTimer) { UnhookTankProps(); return Plugin_Stop; } -public void PropDamaged(int iVictim, int iAttacker, int iInflictor, float fDamage, int iDamageType) +void PropDamaged(int iVictim, int iAttacker, int iInflictor, float fDamage, int iDamageType) { if (IsValidAliveTank(iAttacker) || g_hTankPropsHit.FindValue(iInflictor) != -1) { //PrintToChatAll("tank hit %d", iVictim); @@ -377,7 +379,7 @@ void CreateTankPropGlow(int iTarget) SetEdictFlags(iTarget, GetEdictFlags(iTarget) | FL_EDICT_ALWAYS); } -public Action OnTransmit(int iEntity, int iClient) +Action OnTransmit(int iEntity, int iClient) { switch (GetClientTeam(iClient)) { case TEAM_INFECTED: { @@ -473,7 +475,7 @@ void UnhookTankProps() } //analogue public void OnEntityCreated(int iEntity, const char[] sClassName) -public void PossibleTankPropCreated(int iEntity, const char[] sClassName) +void PossibleTankPropCreated(int iEntity, const char[] sClassName) { if (sClassName[0] != 'p') { return; @@ -488,7 +490,7 @@ public void PossibleTankPropCreated(int iEntity, const char[] sClassName) SDKHook(iEntity, SDKHook_SpawnPost, Hook_PropSpawned); } -public void Hook_PropSpawned(int iEntity) +void Hook_PropSpawned(int iEntity) { if (iEntity < MaxClients || !IsValidEntity(iEntity)) { return; diff --git a/addons/sourcemod/scripting/l4d2_tank_spawn_antirock_protect.sp b/addons/sourcemod/scripting/l4d2_tank_spawn_antirock_protect.sp index 533551831..4d24d5143 100644 --- a/addons/sourcemod/scripting/l4d2_tank_spawn_antirock_protect.sp +++ b/addons/sourcemod/scripting/l4d2_tank_spawn_antirock_protect.sp @@ -21,7 +21,7 @@ public void OnPluginStart() g_cvAntiRockProtectTime = CreateConVar("l4d2_antirock_protect_time", "1.5", "Protection time to avoid Tank throwing a rock by accident"); } -public void Event_TankSpawn(Event event, const char[] name, bool dontBroadcast) +void Event_TankSpawn(Event event, const char[] name, bool dontBroadcast) { int tank = GetClientOfUserId(event.GetInt("userid")); g_fSpawnTime[tank] = GetGameTime(); diff --git a/addons/sourcemod/scripting/l4d2_tankrage.sp b/addons/sourcemod/scripting/l4d2_tankrage.sp index 0f8aab2df..4b91b9dd3 100644 --- a/addons/sourcemod/scripting/l4d2_tankrage.sp +++ b/addons/sourcemod/scripting/l4d2_tankrage.sp @@ -61,7 +61,7 @@ public void L4D_OnFirstSurvivorLeftSafeArea_Post() tankSpawnedSurvivorFlow = L4D2Direct_GetVSTankFlowPercent(InSecondHalfOfRound()) ? RoundToNearest(L4D2Direct_GetVSTankFlowPercent(InSecondHalfOfRound()) * 100.0) : 0; } -public void Event_TankSpawn(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_TankSpawn(Event hEvent, char[] sEventName, bool dontBroadcast) { iTank = GetClientOfUserId(hEvent.GetInt("userid")); @@ -92,7 +92,7 @@ public void Event_TankSpawn(Event hEvent, char[] sEventName, bool dontBroadcast) } } -public void Event_ResetTank(Event hEvent, char[] sEventName, bool dontBroadcast) +void Event_ResetTank(Event hEvent, char[] sEventName, bool dontBroadcast) { if (strcmp(sEventName, "player_death") == 0) { @@ -115,7 +115,7 @@ public void Event_ResetTank(Event hEvent, char[] sEventName, bool dontBroadcast) delete hTankTimer; } -public Action timerTank(Handle timer) +Action timerTank(Handle timer) { if (IsClientInGame(iTank) && !IsFakeClient(iTank)) { diff --git a/addons/sourcemod/scripting/l4d2_tongue_timer.sp b/addons/sourcemod/scripting/l4d2_tongue_timer.sp index 92bc2e3cc..e167085e5 100644 --- a/addons/sourcemod/scripting/l4d2_tongue_timer.sp +++ b/addons/sourcemod/scripting/l4d2_tongue_timer.sp @@ -67,7 +67,7 @@ public void OnClientPutInServer(int client) SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); } -public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3]) +Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3]) { if (!IsValidClient(victim)) return Plugin_Continue; if (!IsValidClient(attacker)) return Plugin_Continue; @@ -103,7 +103,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam // EVENTS // // ---------------------------------------------- -public void Event_TongueGrab(Event event, const char[] name, bool dontBroadcast) +void Event_TongueGrab(Event event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(event.GetInt("victim")); @@ -113,7 +113,7 @@ public void Event_TongueGrab(Event event, const char[] name, bool dontBroadcast) } } -public void Event_TonguePullStopped(Event event, const char[] name, bool dontBroadcast) +void Event_TonguePullStopped(Event event, const char[] name, bool dontBroadcast) { int victim = GetClientOfUserId(event.GetInt("victim")); int smoker = GetClientOfUserId(event.GetInt("smoker")); @@ -124,12 +124,12 @@ public void Event_TonguePullStopped(Event event, const char[] name, bool dontBro } } -public void Event_TongueRelease(Event event, const char[] name, bool dontBroadcast) +void Event_TongueRelease(Event event, const char[] name, bool dontBroadcast) { RequestFrame(OnNextFrame); } -public void Event_Replace(Event event, const char[] name, bool dontBroadcast) +void Event_Replace(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")); int player = GetClientOfUserId(event.GetInt("player")); @@ -151,9 +151,9 @@ public void Event_Replace(Event event, const char[] name, bool dontBroadcast) } } -public void ClearPulls() +void ClearPulls() { - for(int i = 1; i <= MaxClients; i++) + for (int i = 1; i <= MaxClients; i++) { bPlayerPulled[i] = false; } @@ -170,7 +170,7 @@ void OnNextFrame(any victim) ClearPulls(); } -public void OnSmokerSurvivorClear(any smoker) +void OnSmokerSurvivorClear(any smoker) { if (IsValidAliveSmoker(smoker)) { @@ -197,7 +197,7 @@ public void OnSmokerSurvivorClear(any smoker) // CONVARS // // ---------------------------------------------- -public void ConvarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void ConvarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { fTongueDelayTank = convarTongueDelayTank.FloatValue; fTongueDelaySurvivor = convarTongueDelaySurvivor.FloatValue; diff --git a/addons/sourcemod/scripting/l4d2_ultra_witch.sp b/addons/sourcemod/scripting/l4d2_ultra_witch.sp index 6657d2fe9..a4c96cc87 100644 --- a/addons/sourcemod/scripting/l4d2_ultra_witch.sp +++ b/addons/sourcemod/scripting/l4d2_ultra_witch.sp @@ -87,7 +87,7 @@ public void OnClientDisconnect(int iClient) SDKUnhook(iClient, SDKHook_OnTakeDamage, OnTakeDamage); } -public Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType) +Action OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamageType) { if (!(iDamageType & DMG_SLASH)) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_uncommon_blocker.sp b/addons/sourcemod/scripting/l4d2_uncommon_blocker.sp index 9c4d092fa..d29dd4123 100644 --- a/addons/sourcemod/scripting/l4d2_uncommon_blocker.sp +++ b/addons/sourcemod/scripting/l4d2_uncommon_blocker.sp @@ -76,7 +76,7 @@ #define DEBUG 0 #define UNCOMMON_INFECTED_AMOUNT 7 -public const char sUncommon[][] = +stock const char sUncommon[][] = { "ceda", "crawler", @@ -116,7 +116,7 @@ public void OnPluginStart() RegAdminCmd("sm_uncinfblock_check", Cmd_UncInfBlock_Check, ADMFLAG_GENERIC); } -public Action Cmd_UncInfBlock_Check(int iClient, int iArgs) +Action Cmd_UncInfBlock_Check(int iClient, int iArgs) { for (int i = 0; i < UNCOMMON_INFECTED_AMOUNT; i++) { ReplyToCommand(iClient, "Uncommon class '%s' %s. Uncommon infected Flag: %d.", sUncommon[i], (IsUncommonInfectedBlocked(i)) ? "blocked" : "unblocked", (1 << i)); @@ -136,12 +136,12 @@ public void OnEntityCreated(int iEntity, const char[] sClassName) } } -public void Hook_OnEntitySpawned(int iEntity) +void Hook_OnEntitySpawned(int iEntity) { RequestFrame(OnNextFrame, EntIndexToEntRef(iEntity)); } -public void OnNextFrame(int iEntity) +void OnNextFrame(int iEntity) { if (EntRefToEntIndex(iEntity) == INVALID_ENT_REFERENCE || !IsValidEdict(iEntity)) { return; diff --git a/addons/sourcemod/scripting/l4d2_uniform_spit.sp b/addons/sourcemod/scripting/l4d2_uniform_spit.sp index 1e4428ca6..f4ec1ab7c 100644 --- a/addons/sourcemod/scripting/l4d2_uniform_spit.sp +++ b/addons/sourcemod/scripting/l4d2_uniform_spit.sp @@ -105,7 +105,7 @@ void InitGameData() delete hGamedata; } -public void CvarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void CvarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { CvarsToType(); } @@ -123,7 +123,7 @@ void CvarsToType() g_iGodframeTicks = g_hCvarGodframeTicks.IntValue; } -public void Event_RoundReset(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundReset(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_hPuddles.Clear(); } @@ -174,7 +174,7 @@ public void OnEntityDestroyed(int iEntity) * return 263168; //DMG_RADIATION|DMG_ENERGYBEAM * } */ -public Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &fDamageType) +Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &fDamageType) { if (!(fDamageType & DMG_TYPE_SPIT)) { //for performance return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_unsilent_jockey.sp b/addons/sourcemod/scripting/l4d2_unsilent_jockey.sp index 93f049a04..88f47a9cb 100644 --- a/addons/sourcemod/scripting/l4d2_unsilent_jockey.sp +++ b/addons/sourcemod/scripting/l4d2_unsilent_jockey.sp @@ -38,7 +38,7 @@ ConVar Handle g_hJockeySoundTimer[MAXPLAYERS + 1] = {null, ...}; -public const char g_sJockeySound[][] = +stock const char g_sJockeySound[][] = { "player/jockey/voice/idle/jockey_recognize02.wav", "player/jockey/voice/idle/jockey_recognize06.wav", @@ -94,7 +94,7 @@ public void L4D_OnEnterGhostState(int client) ChangeJockeyTimerStatus(client, false); } -public void PlayerSpawn_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerSpawn_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -118,7 +118,7 @@ public void PlayerSpawn_Event(Event event, const char[] name, bool dontBroadcast RequestFrame(JockeyRideEnd_NextFrame, GetClientUserId(client)); } -public void PlayerDeath_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerDeath_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -131,7 +131,7 @@ public void PlayerDeath_Event(Event event, const char[] name, bool dontBroadcast ChangeJockeyTimerStatus(client, false); } -public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -144,7 +144,7 @@ public void PlayerTeam_Event(Event event, const char[] name, bool dontBroadcast) ChangeJockeyTimerStatus(client, false); } -public void JockeyRideStart_Event(Event event, const char[] name, bool dontBroadcast) +void JockeyRideStart_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -152,7 +152,7 @@ public void JockeyRideStart_Event(Event event, const char[] name, bool dontBroad ChangeJockeyTimerStatus(client, false); } -public void JockeyRideEnd_Event(Event event, const char[] name, bool dontBroadcast) +void JockeyRideEnd_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); diff --git a/addons/sourcemod/scripting/l4d2_weapon_attributes.sp b/addons/sourcemod/scripting/l4d2_weapon_attributes.sp index 5a6d05f81..68717ec5e 100644 --- a/addons/sourcemod/scripting/l4d2_weapon_attributes.sp +++ b/addons/sourcemod/scripting/l4d2_weapon_attributes.sp @@ -303,7 +303,7 @@ void OnReloadDurationEnableAttriChanged(bool newValue) } } -public Action Cmd_Weapon(int args) +Action Cmd_Weapon(int args) { if (args < 3) { PrintDebug(eLogError|eServerPrint, "Syntax: sm_weapon ."); @@ -422,7 +422,7 @@ public Action Cmd_Weapon(int args) return Plugin_Handled; } -public Action Cmd_WeaponAttributes(int client, int args) +Action Cmd_WeaponAttributes(int client, int args) { int iCvarValue = hHideWeaponAttributes.IntValue; @@ -505,7 +505,7 @@ public Action Cmd_WeaponAttributes(int client, int args) return Plugin_Handled; } -public Action Cmd_WeaponAttributesReset(int args) +Action Cmd_WeaponAttributesReset(int args) { OnTankDamageEnableAttriChanged(false); @@ -548,7 +548,7 @@ bool __cdecl CDirector::IsTankInPlay(CDirector *this) return *((_DWORD *)this + 64) > 0; } */ -public Action DamageBuffVsTank(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) +Action DamageBuffVsTank(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { if (!(damagetype & DMG_BULLET) && !(damagetype & DMG_CLUB)) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d2_weaponrules.sp b/addons/sourcemod/scripting/l4d2_weaponrules.sp index 0302f7d67..e19eb9971 100644 --- a/addons/sourcemod/scripting/l4d2_weaponrules.sp +++ b/addons/sourcemod/scripting/l4d2_weaponrules.sp @@ -55,7 +55,7 @@ public void OnPluginStart() ResetWeaponRules(); } -public Action ResetWeaponRulesCb(int args) +Action ResetWeaponRulesCb(int args) { ResetWeaponRules(); @@ -69,7 +69,7 @@ void ResetWeaponRules() } } -public void RoundStartCb(Event hEvent, const char[] eName, bool dontBroadcast) +void RoundStartCb(Event hEvent, const char[] eName, bool dontBroadcast) { CreateTimer(0.3, RoundStartDelay, _, TIMER_FLAG_NO_MAPCHANGE); } @@ -89,7 +89,7 @@ public void OnConfigsExecuted() } } -public Action RoundStartDelay(Handle hTimer) +Action RoundStartDelay(Handle hTimer) { g_bRoundStartHit = true; @@ -100,7 +100,7 @@ public Action RoundStartDelay(Handle hTimer) return Plugin_Stop; } -public Action AddWeaponRuleCb(int args) +Action AddWeaponRuleCb(int args) { if (args < 2) { PrintToServer("Usage: l4d2_addweaponrule "); diff --git a/addons/sourcemod/scripting/l4d2lib.sp b/addons/sourcemod/scripting/l4d2lib.sp index c56d57d7a..0d4f35659 100644 --- a/addons/sourcemod/scripting/l4d2lib.sp +++ b/addons/sourcemod/scripting/l4d2lib.sp @@ -157,14 +157,14 @@ public void OnMapEnd() /* Events */ #if MODULE_ROUNDS -public void RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Rounds_OnRoundEnd_Update(); } #endif #if MODULE_ROUNDS || MODULE_TANKS || MODULE_SURVIVORS -public void RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { #if MODULE_ROUNDS Rounds_OnRoundStart_Update(); @@ -181,19 +181,19 @@ public void RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBr #endif #if MODULE_TANKS -public void TankSpawn_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void TankSpawn_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Tanks_TankSpawn(hEvent); } -public void ItemPickup_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void ItemPickup_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Tanks_ItemPickup(hEvent); } #endif #if MODULE_TANKS || MODULE_SURVIVORS -public void PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { #if MODULE_TANKS Tanks_PlayerDeath(hEvent); @@ -206,7 +206,7 @@ public void PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontB #endif #if MODULE_SURVIVORS || MODULE_MAPINFO -public void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { #if MODULE_SURVIVORS Survivors_RebuildArray(); @@ -219,29 +219,28 @@ public void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool b #endif #if MODULE_SURVIVORS -public void PlayerSpawn_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerSpawn_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Survivors_RebuildArray(); } -public void PlayerBotReplace_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerBotReplace_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Survivors_RebuildArray(); } -public void BotPlayerReplace_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void BotPlayerReplace_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Survivors_RebuildArray(); } -public void DefibrillatorUsed_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void DefibrillatorUsed_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Survivors_RebuildArray(); } -public void PlayerTeam_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerTeam_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Survivors_RebuildArray_Delay(); } #endif - diff --git a/addons/sourcemod/scripting/l4d2lib/mapinfo.sp b/addons/sourcemod/scripting/l4d2lib/mapinfo.sp index d1dbe27c8..22be75602 100644 --- a/addons/sourcemod/scripting/l4d2lib/mapinfo.sp +++ b/addons/sourcemod/scripting/l4d2lib/mapinfo.sp @@ -89,7 +89,7 @@ void MapInfo_PlayerDisconnect_Event(Event hEvent) } } -public Action MI_KV_CmdSave(int iClient, int iArgs) +Action MI_KV_CmdSave(int iClient, int iArgs) { char sCurMap[128]; GetCurrentMap(sCurMap, sizeof(sCurMap)); @@ -117,7 +117,7 @@ public Action MI_KV_CmdSave(int iClient, int iArgs) return Plugin_Handled; } -public Action MI_KV_CmdSaveLoc(int iClient, int iArgs) +Action MI_KV_CmdSaveLoc(int iClient, int iArgs) { bool bUpdateInfo; char sCurMap[128]; @@ -338,17 +338,17 @@ static int IsEntityInSaferoom(int iEntity) return iResult; } -public int _native_IsMapDataAvailable(Handle hPlugin, int iNumParams) +int _native_IsMapDataAvailable(Handle hPlugin, int iNumParams) { return g_bMapDataAvailable; } -public int _native_IsEntityInSaferoom(Handle hPlugin, int iNumParams) +int _native_IsEntityInSaferoom(Handle hPlugin, int iNumParams) { return IsEntityInSaferoom(GetNativeCell(1)); } -public int _native_GetMapStartOrigin(Handle hPlugin, int iNumParams) +int _native_GetMapStartOrigin(Handle hPlugin, int iNumParams) { float fOrigin[3]; GetNativeArray(1, fOrigin, sizeof(fOrigin)); @@ -362,7 +362,7 @@ public int _native_GetMapStartOrigin(Handle hPlugin, int iNumParams) return 1; } -public int _native_GetMapEndOrigin(Handle hPlugin, int iNumParams) +int _native_GetMapEndOrigin(Handle hPlugin, int iNumParams) { float fOrigin[3]; GetNativeArray(1, fOrigin, sizeof(fOrigin)); @@ -376,22 +376,22 @@ public int _native_GetMapEndOrigin(Handle hPlugin, int iNumParams) return 1; } -public int _native_GetMapStartDist(Handle hPlugin, int iNumParams) +int _native_GetMapStartDist(Handle hPlugin, int iNumParams) { return view_as(g_fStartDist); } -public int _native_GetMapStartExtraDist(Handle hPlugin, int iNumParams) +int _native_GetMapStartExtraDist(Handle hPlugin, int iNumParams) { return view_as(g_fStartExtraDist); } -public int _native_GetMapEndDist(Handle hPlugin, int iNumParams) +int _native_GetMapEndDist(Handle hPlugin, int iNumParams) { return view_as(g_fEndDist); } -public int _native_GetMapValueInt(Handle hPlugin, int iNumParams) +int _native_GetMapValueInt(Handle hPlugin, int iNumParams) { int iLen; GetNativeStringLength(1, iLen); @@ -404,7 +404,7 @@ public int _native_GetMapValueInt(Handle hPlugin, int iNumParams) return KvGetNum(g_hMIData, sKey, iDefVal); } -public int _native_GetMapValueFloat(Handle hPlugin, int iNumParams) +int _native_GetMapValueFloat(Handle hPlugin, int iNumParams) { int iLen; GetNativeStringLength(1, iLen); @@ -418,7 +418,7 @@ public int _native_GetMapValueFloat(Handle hPlugin, int iNumParams) return view_as(KvGetFloat(g_hMIData, sKey, fDefVal)); } -public int _native_GetMapValueVector(Handle hPlugin, int iNumParams) +int _native_GetMapValueVector(Handle hPlugin, int iNumParams) { int iLen; GetNativeStringLength(1, iLen); @@ -436,7 +436,7 @@ public int _native_GetMapValueVector(Handle hPlugin, int iNumParams) return 1; } -public int _native_GetMapValueString(Handle hPlugin, int iNumParams) +int _native_GetMapValueString(Handle hPlugin, int iNumParams) { int iLen; GetNativeStringLength(1, iLen); @@ -461,7 +461,7 @@ public int _native_GetMapValueString(Handle hPlugin, int iNumParams) return 1; } -public int _native_CopyMapSubsection(Handle hPlugin, int iNumParams) +int _native_CopyMapSubsection(Handle hPlugin, int iNumParams) { int iLen; GetNativeStringLength(2, iLen); diff --git a/addons/sourcemod/scripting/l4d2lib/rounds.sp b/addons/sourcemod/scripting/l4d2lib/rounds.sp index c2b55e00e..56beec3a1 100644 --- a/addons/sourcemod/scripting/l4d2lib/rounds.sp +++ b/addons/sourcemod/scripting/l4d2lib/rounds.sp @@ -51,12 +51,12 @@ void Rounds_OnMapEnd_Update() g_bInRound = false; } -public int _native_GetCurrentRound(Handle hPlugin, int iNumParams) +int _native_GetCurrentRound(Handle hPlugin, int iNumParams) { return g_iRoundNumber; } -public int _native_CurrentlyInRound(Handle hPlugin, int iNumParams) +int _native_CurrentlyInRound(Handle hPlugin, int iNumParams) { return g_bInRound; } diff --git a/addons/sourcemod/scripting/l4d2lib/survivors.sp b/addons/sourcemod/scripting/l4d2lib/survivors.sp index 275d5dbd9..8cb3fb613 100644 --- a/addons/sourcemod/scripting/l4d2lib/survivors.sp +++ b/addons/sourcemod/scripting/l4d2lib/survivors.sp @@ -19,7 +19,7 @@ void Survivors_RebuildArray_Delay() CreateTimer(0.3, BuildArray_Timer); } -public Action BuildArray_Timer(Handle hTimer) +Action BuildArray_Timer(Handle hTimer) { Survivors_RebuildArray(); } @@ -42,12 +42,12 @@ void Survivors_RebuildArray() } } -public int _native_GetSurvivorCount(Handle hPlugin, int iNumParams) +int _native_GetSurvivorCount(Handle hPlugin, int iNumParams) { return g_iSurvivorCount; } -public int _native_GetSurvivorOfIndex(Handle hPlugin, int iNumParams) +int _native_GetSurvivorOfIndex(Handle hPlugin, int iNumParams) { int iClient = GetNativeCell(1); diff --git a/addons/sourcemod/scripting/l4d2lib/tanks.sp b/addons/sourcemod/scripting/l4d2lib/tanks.sp index 463e08eca..7bb1e5dfb 100644 --- a/addons/sourcemod/scripting/l4d2lib/tanks.sp +++ b/addons/sourcemod/scripting/l4d2lib/tanks.sp @@ -91,7 +91,7 @@ void Tanks_PlayerDeath(Event hEvent) g_hTankDeathTimer = CreateTimer(0.5, TankDeath_Timer); } -public Action TankDeath_Timer(Handle hTimer) +Action TankDeath_Timer(Handle hTimer) { Call_StartForward(g_hFwdTankDeath); Call_PushCell(g_iTankClient); diff --git a/addons/sourcemod/scripting/l4d_backjump_fix.sp b/addons/sourcemod/scripting/l4d_backjump_fix.sp index dcb6c484b..df37fa6ff 100644 --- a/addons/sourcemod/scripting/l4d_backjump_fix.sp +++ b/addons/sourcemod/scripting/l4d_backjump_fix.sp @@ -45,7 +45,7 @@ public void OnPluginStart() HookEvent("player_spawn", Event_PlayerSpawn); } -public void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if (!client || GetClientTeam(client) != 3 || GetEntProp(client, Prop_Send, "m_zombieClass") != 3) @@ -58,7 +58,7 @@ public void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast } } -public MRESReturn CLunge_OnTouch(int pThis, Handle hParams) +MRESReturn CLunge_OnTouch(int pThis, Handle hParams) { int other = DHookGetParam(hParams, 1); if (other <= 0) return MRES_Ignored; diff --git a/addons/sourcemod/scripting/l4d_bash_kills.sp b/addons/sourcemod/scripting/l4d_bash_kills.sp index d0de10ff6..10f7a32f2 100644 --- a/addons/sourcemod/scripting/l4d_bash_kills.sp +++ b/addons/sourcemod/scripting/l4d_bash_kills.sp @@ -48,7 +48,7 @@ public void OnPluginStart() } } -public void BashKills_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void BashKills_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { g_bIsEnabled = hConVar.BoolValue; } @@ -58,7 +58,7 @@ public void OnClientPutInServer(int iClient) SDKHook(iClient, SDKHook_OnTakeDamage, Hook_OnTakeDamage); } -public Action Hook_OnTakeDamage(int iVictim, int& iAttacker, int& iInflictor, float& fDamage, \ +Action Hook_OnTakeDamage(int iVictim, int& iAttacker, int& iInflictor, float& fDamage, \ int& iDamageType, int& iWeapon, float fDamageForce[3], float fDamagePosition[3]) { if (!g_bIsEnabled) { diff --git a/addons/sourcemod/scripting/l4d_blackandwhite.sp b/addons/sourcemod/scripting/l4d_blackandwhite.sp index 74391852b..3cb348503 100644 --- a/addons/sourcemod/scripting/l4d_blackandwhite.sp +++ b/addons/sourcemod/scripting/l4d_blackandwhite.sp @@ -56,7 +56,7 @@ public OnPluginStart() HookConVarChange(h_cvarGlowEnable, ChangeVars); } -public EventReviveSuccess(Handle:event, const String:name[], bool:dontBroadcast) +void EventReviveSuccess(Handle:event, const String:name[], bool:dontBroadcast) { if(GetEventBool(event, "lastlife")) { @@ -159,7 +159,7 @@ public EventReviveSuccess(Handle:event, const String:name[], bool:dontBroadcast) return; } -public EventHealSuccess(Handle:event, const String:name[], bool:dontBroadcast) +void EventHealSuccess(Handle:event, const String:name[], bool:dontBroadcast) { new healeeID = GetEventInt(event, "subject"); new healee = GetClientOfUserId(healeeID); @@ -212,7 +212,7 @@ public EventHealSuccess(Handle:event, const String:name[], bool:dontBroadcast) return; } -public EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) +void EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) { new deadID = GetEventInt(event, "userid"); new dead = GetClientOfUserId(deadID); @@ -263,7 +263,7 @@ public EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) //failing that, hook player_team? //get cvar changes during game -public ChangeVars(Handle:cvar, const String:oldVal[], const String:newVal[]) +void ChangeVars(Handle:cvar, const String:oldVal[], const String:newVal[]) { //read values from convars bandw_notice = GetConVarInt(h_cvarNoticeType); diff --git a/addons/sourcemod/scripting/l4d_boss_percent.sp b/addons/sourcemod/scripting/l4d_boss_percent.sp index 4037d1ea2..60732ffa1 100644 --- a/addons/sourcemod/scripting/l4d_boss_percent.sp +++ b/addons/sourcemod/scripting/l4d_boss_percent.sp @@ -112,7 +112,7 @@ public void OnPluginStart() HookEvent("player_say", DKRWorkaround, EventHookMode_Post); // Called when a message is sent in chat. Used to grab the Dark Carnival: Remix boss percentages. } -public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { GetCvars(); } @@ -136,7 +136,7 @@ void GetCvars() */ // Allows other plugins to update boss percentages -public int Native_UpdateBossPercents(Handle plugin, int numParams) +int Native_UpdateBossPercents(Handle plugin, int numParams) { CreateTimer(0.1, GetBossPercents); UpdateReadyUpFooter(0.2); @@ -145,14 +145,14 @@ public int Native_UpdateBossPercents(Handle plugin, int numParams) } // Used for other plugins to check if the current map is Dark Carnival: Remix (It tends to break things when it comes to bosses) -public int Native_IsDarkCarniRemix(Handle plugin, int numParams) +int Native_IsDarkCarniRemix(Handle plugin, int numParams) { return g_bIsRemix; } // Other plugins can use this to set the witch as "disabled" on the ready up, and when the !boss command is used // YOU NEED TO SET THIS EVERY MAP -public int Native_SetWitchDisabled(Handle plugin, int numParams) +int Native_SetWitchDisabled(Handle plugin, int numParams) { g_bWitchDisabled = view_as(GetNativeCell(1)); UpdateReadyUpFooter(); @@ -162,7 +162,7 @@ public int Native_SetWitchDisabled(Handle plugin, int numParams) // Other plugins can use this to set the tank as "disabled" on the ready up, and when the !boss command is used // YOU NEED TO SET THIS EVERY MAP -public int Native_SetTankDisabled(Handle plugin, int numParams) +int Native_SetTankDisabled(Handle plugin, int numParams) { g_bTankDisabled = view_as(GetNativeCell(1)); UpdateReadyUpFooter(); @@ -171,7 +171,7 @@ public int Native_SetTankDisabled(Handle plugin, int numParams) } // Used for other plugins to get the stored witch percent -public int Native_GetStoredWitchPercent(Handle plugin, int numParams) +int Native_GetStoredWitchPercent(Handle plugin, int numParams) { return g_fWitchPercent; } @@ -183,14 +183,14 @@ public int Native_GetStoredTankPercent(Handle plugin, int numParams) } // Used for other plugins to get the ready footer index of the boss percents -public int Native_GetReadyUpFooterIndex(Handle plugin, int numParams) +int Native_GetReadyUpFooterIndex(Handle plugin, int numParams) { if (g_ReadyUpAvailable) return g_iReadyUpFooterIndex; else return -1; } // Used for other plugins to refresh the boss percents on the ready up -public int Native_RefreshReadyUp(Handle plugin, int numParams) +int Native_RefreshReadyUp(Handle plugin, int numParams) { if (g_ReadyUpAvailable) { @@ -266,7 +266,7 @@ public void OnMapEnd() * If the Ready Up plugin is not available, we use this. * It will print boss percents upon survivors leaving the saferoom. */ -public void LeftStartAreaEvent(Event event, const char[] name, bool dontBroadcast) +void LeftStartAreaEvent(Event event, const char[] name, bool dontBroadcast) { if (!g_ReadyUpAvailable) { @@ -300,7 +300,7 @@ public void OnRoundIsLive() /* Called when a new round starts (twice each map) * Here we will need to refresh the boss percents. */ -public void RoundStartEvent(Event event, const char[] name, bool dontBroadcast) +void RoundStartEvent(Event event, const char[] name, bool dontBroadcast) { // Reset Ready Up Variables g_bReadyUpFooterAdded = false; @@ -377,7 +377,7 @@ int GetPercentageFromText(const char[] text) * From there we can add them to our Ready Up menu and to our !boss commands * */ -public void DKRWorkaround(Event event, const char[] name, bool dontBroadcast) +void DKRWorkaround(Event event, const char[] name, bool dontBroadcast) { // If the current map is not part of the Dark Carnival: Remix campaign, don't continue if (!g_bIsRemix) return; @@ -477,7 +477,7 @@ stock float GetWitchFlow(int round) * This method will be called upon every new round * */ -public Action GetBossPercents(Handle timer) +Action GetBossPercents(Handle timer) { // We need to do things a little differently if it's Dark Carnival: Remix if (g_bIsRemix) @@ -597,7 +597,7 @@ void UpdateReadyUpFooter(float interval = 0.1) g_hUpdateFooterTimer = CreateTimer(interval, Timer_UpdateReadyUpFooter); } -public Action Timer_UpdateReadyUpFooter(Handle timer) +Action Timer_UpdateReadyUpFooter(Handle timer) { g_hUpdateFooterTimer = null; @@ -694,7 +694,7 @@ public Action Timer_UpdateReadyUpFooter(Handle timer) * * vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */ -public Action BossCmd(int client, int args) +Action BossCmd(int client, int args) { // Show our boss percents if (client) @@ -706,7 +706,7 @@ public Action BossCmd(int client, int args) return Plugin_Handled; } -public void PrintCurrent(int userid) +void PrintCurrent(int userid) { int client = GetClientOfUserId(userid); if (client) FakeClientCommand(client, "say /current"); diff --git a/addons/sourcemod/scripting/l4d_boss_vote.sp b/addons/sourcemod/scripting/l4d_boss_vote.sp index f3cbbf3d1..e7076d739 100644 --- a/addons/sourcemod/scripting/l4d_boss_vote.sp +++ b/addons/sourcemod/scripting/l4d_boss_vote.sp @@ -80,7 +80,7 @@ bool RunVoteChecks(int client) return true; } -public Action VoteBossCmd(int client, int args) +Action VoteBossCmd(int client, int args) { if (!GetConVarBool(g_hCvarBossVoting)) { return Plugin_Handled; @@ -219,7 +219,7 @@ public Action VoteBossCmd(int client, int args) return Plugin_Handled; } -public void BossVoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) +void BossVoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { switch (action) { @@ -234,7 +234,7 @@ public void BossVoteActionHandler(Handle vote, BuiltinVoteAction action, int par } } -public void BossVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void BossVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i=0; i -public Plugin myinfo = { - +public Plugin myinfo = +{ name = "Common Ragdolls be gone", author = "Sir", description = "Make ragdolls for common infected vanish into thin air server-side on death.", - version = "1.0", - url = "Nah" + version = "1.1", + url = "https://github.com/SirPlease/L4D2-Competitive-Rework" }; -public void OnPluginStart() { +public void OnPluginStart() +{ HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre); } -public Action Event_PlayerDeath(Event hEvent, char[] name, bool dontBroadcast) { - +Action Event_PlayerDeath(Event hEvent, char[] name, bool dontBroadcast) +{ int victimuserid = hEvent.GetInt("userid"); - if(!victimuserid) { - + if (victimuserid < 1) { int victimentityid = hEvent.GetInt("entityid"); if (IsCommonInfected(victimentityid)) { @@ -34,11 +34,11 @@ public Action Event_PlayerDeath(Event hEvent, char[] name, bool dontBroadcast) { bool IsCommonInfected(int iEntity) { - if(iEntity > 0 && IsValidEntity(iEntity) && IsValidEdict(iEntity)) - { - char strClassName[64]; - GetEdictClassname(iEntity, strClassName, sizeof(strClassName)); - return StrEqual(strClassName, "infected"); - } - return false; -} \ No newline at end of file + if (iEntity <= MaxClients || !IsValidEdict(iEntity)) { + return false; + } + + char sClassName[64]; + GetEdictClassname(iEntity, sClassName, sizeof(sClassName)); + return (strcmp(sClassName, "infected") == 0); +} diff --git a/addons/sourcemod/scripting/l4d_fix_deathfall_cam.sp b/addons/sourcemod/scripting/l4d_fix_deathfall_cam.sp index 1ee653a07..80aa00dc8 100644 --- a/addons/sourcemod/scripting/l4d_fix_deathfall_cam.sp +++ b/addons/sourcemod/scripting/l4d_fix_deathfall_cam.sp @@ -22,7 +22,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max return APLRes_Success; } -public any Ntv_ReleaseFromViewControl(Handle plugin, int numParams) +any Ntv_ReleaseFromViewControl(Handle plugin, int numParams) { ReleaseFromViewControl(_, GetNativeCell(1)); diff --git a/addons/sourcemod/scripting/l4d_jockey_ledgehang.sp b/addons/sourcemod/scripting/l4d_jockey_ledgehang.sp index 94b99f8a8..8a4c3658b 100644 --- a/addons/sourcemod/scripting/l4d_jockey_ledgehang.sp +++ b/addons/sourcemod/scripting/l4d_jockey_ledgehang.sp @@ -29,12 +29,12 @@ public void OnPluginStart() HookEvent("jockey_ride_end", JockeyRideEnd, EventHookMode_Post); } -public void JockeyLedgeHangChange(ConVar cVar, const char[] oldValue, const char[] newValue) +void JockeyLedgeHangChange(ConVar cVar, const char[] oldValue, const char[] newValue) { fLedgeHangInterval = hCvarJockeyLedgeHang.FloatValue; } -public void JockeyRideEnd(Event hEvent, const char[] name, bool dontBroadcast) +void JockeyRideEnd(Event hEvent, const char[] name, bool dontBroadcast) { int jockeyVictim = GetClientOfUserId(GetEventInt(hEvent, "victim")); diff --git a/addons/sourcemod/scripting/l4d_mapbased_cvars.sp b/addons/sourcemod/scripting/l4d_mapbased_cvars.sp index 6e8b1dd4a..bdbb137ac 100644 --- a/addons/sourcemod/scripting/l4d_mapbased_cvars.sp +++ b/addons/sourcemod/scripting/l4d_mapbased_cvars.sp @@ -55,7 +55,7 @@ public OnPluginEnd() { } -public CvarConfigChange( Handle:cvar, const String:oldValue[], const String:newValue[] ) { +void CvarConfigChange( Handle:cvar, const String:oldValue[], const String:newValue[] ) { strcopy(g_sUseConfigDir, MAX_CONFIG_LEN, newValue); #if DEBUG @@ -75,7 +75,7 @@ public OnMapEnd() { } -public GetThisMapPrefs() +int GetThisMapPrefs() { new iNumChanged = 0; // how many cvars were changed for this map @@ -204,7 +204,7 @@ public GetThisMapPrefs() return iNumChanged; } -public ResetMapPrefs() +void ResetMapPrefs() { KvRewind(g_hKvOrig); diff --git a/addons/sourcemod/scripting/l4d_no_cans.sp b/addons/sourcemod/scripting/l4d_no_cans.sp index 7ca8cced8..8084dba0e 100644 --- a/addons/sourcemod/scripting/l4d_no_cans.sp +++ b/addons/sourcemod/scripting/l4d_no_cans.sp @@ -37,14 +37,14 @@ public void OnPluginStart() HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy); } -public void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { CreateTimer(1.0, Timer_RoundStartDelay, _, TIMER_FLAG_NO_MAPCHANGE); // Some canisters will spawn much later. For example a map c2m1_highway CreateTimer(10.0, Timer_RoundStartDelay, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action Timer_RoundStartDelay(Handle hTimer) +Action Timer_RoundStartDelay(Handle hTimer) { int iEntity = -1; diff --git a/addons/sourcemod/scripting/l4d_pause_message.sp b/addons/sourcemod/scripting/l4d_pause_message.sp index ce82277e3..175259253 100644 --- a/addons/sourcemod/scripting/l4d_pause_message.sp +++ b/addons/sourcemod/scripting/l4d_pause_message.sp @@ -25,13 +25,13 @@ public void OnPluginStart() AddCommandListener(pauseCmd, "unpause"); } -public Action pauseCmd(int client, const char[] command, int argc) +Action pauseCmd(int client, const char[] command, int argc) { if (!bPausable) return Plugin_Handled; return Plugin_Continue; } -public void PauseChange(Handle convar, const char[] oldValue, const char[] newValue) +void PauseChange(Handle convar, const char[] oldValue, const char[] newValue) { int Value = StringToInt(newValue); diff --git a/addons/sourcemod/scripting/l4d_pounceprotect.sp b/addons/sourcemod/scripting/l4d_pounceprotect.sp index 0775e2078..85dacc4ed 100644 --- a/addons/sourcemod/scripting/l4d_pounceprotect.sp +++ b/addons/sourcemod/scripting/l4d_pounceprotect.sp @@ -47,7 +47,7 @@ public void OnEntityCreated(int entity, const char[] classname) // During this function call the game simply validates the owner entity // and then sets a bool saying you can't pounce again if you're already mid-pounce. // afaik -public MRESReturn CBaseAbility_OnOwnerTakeDamage(Handle hParams) +MRESReturn CBaseAbility_OnOwnerTakeDamage(Handle hParams) { // Skip the whole function plox return MRES_Supercede; diff --git a/addons/sourcemod/scripting/l4d_rock_lagcomp.sp b/addons/sourcemod/scripting/l4d_rock_lagcomp.sp index deb7c8f4e..53f83ae6a 100644 --- a/addons/sourcemod/scripting/l4d_rock_lagcomp.sp +++ b/addons/sourcemod/scripting/l4d_rock_lagcomp.sp @@ -222,7 +222,7 @@ public void OnEntityDestroyed(int entity) /* * Turn off all damage dealt to the rock, since we're using a custom hitbox. */ -public Action PreventDamage(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) { +Action PreventDamage(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) { if (ROCK_HITBOX_ENABLED) { damage = 0.0; return Plugin_Handled; @@ -269,7 +269,7 @@ public void OnGameFrame() * @param array array of rocks * @param entity entity index of the rock */ -public void Array_AddNewRock(ArrayList array, int entity) +void Array_AddNewRock(ArrayList array, int entity) { new index = array.Push(entity); array.Set(index, CreateArray(3, MAX_HISTORY_FRAMES), BLOCK_POS_HISTORY); @@ -283,7 +283,7 @@ public void Array_AddNewRock(ArrayList array, int entity) * @param array array of rocks * @param entity entity index of the rock */ -public void Array_RemoveRock(ArrayList array, int rockEntity) +void Array_RemoveRock(ArrayList array, int rockEntity) { new rockIndex = Array_SearchRock(array, rockEntity); @@ -317,7 +317,7 @@ public int Array_SearchRock(ArrayList array, rockEntity) /* * Checks if rock is allowed to be dealt damage. */ -public bool Array_IsRockAllowedDmg(rockIndex) +bool Array_IsRockAllowedDmg(rockIndex) { return CURR_GAME_TIME - rockEntitiesArray.Get(rockIndex, BLOCK_START_TIME) >= ROCK_GODFRAMES_TIME; } @@ -330,8 +330,7 @@ public bool Array_IsRockAllowedDmg(rockIndex) * Handles the weapon_fire event. Calculates a line-sphere intersection between * the shooting survivors and the rock(s). Deals damages accordingly. */ -public Action ProcessRockHitboxes(Event event, const char[] name, - bool dontBroadcast) +Action ProcessRockHitboxes(Event event, const char[] name, bool dontBroadcast) { if (rockEntitiesArray.Length == 0) { return Plugin_Handled; @@ -397,7 +396,7 @@ public Action ProcessRockHitboxes(Event event, const char[] name, - GetVectorLength(o_Minus_c, true) + radius*radius; if (delta >= 0.0) { - ApplyDamageOnRock(i, client, eyePos, c, event, entity); + ApplyDamageOnRock(i, eyePos, c, event, entity); } } } @@ -408,8 +407,7 @@ public Action ProcessRockHitboxes(Event event, const char[] name, /* * Apply damage on rock depending on weapon and distance. */ -public void ApplyDamageOnRock(rockIndex, client, float eyePos[3], float c[3], Event event, - rockEntity) +void ApplyDamageOnRock(rockIndex, float eyePos[3], float c[3], Event event, rockEntity) { new String:weaponName[MAX_STR_LEN]; event.GetString("weapon", weaponName, MAX_STR_LEN); @@ -463,7 +461,7 @@ public void ApplyDamageOnRock(rockIndex, client, float eyePos[3], float c[3], Ev /* * Applies a single bullet damage to a single rock. */ -public void ApplyBulletToRock(rockIndex, rockEntity, float damage, float range) +void ApplyBulletToRock(rockIndex, rockEntity, float damage, float range) { new Float:rockDamage = float(rockEntitiesArray.Get(rockIndex, BLOCK_DMG_DEALT)); rockDamage += damage / range * 100; @@ -479,17 +477,17 @@ public void ApplyBulletToRock(rockIndex, rockEntity, float damage, float range) } } -public bool IsPistol(const char[] weaponName) +bool IsPistol(const char[] weaponName) { return StrEqual(weaponName, "pistol"); } -public bool IsMagnum(const char[] weaponName) +bool IsMagnum(const char[] weaponName) { return StrEqual("pistol_magnum", weaponName); } -public bool IsShotgun(const char[] weaponName) +bool IsShotgun(const char[] weaponName) { return StrEqual(weaponName, "shotgun_chrome") || StrEqual(weaponName, "shotgun_spas") @@ -497,14 +495,14 @@ public bool IsShotgun(const char[] weaponName) || StrEqual(weaponName, "pumpshotgun"); } -public bool IsSmg(const char[] weaponName) +bool IsSmg(const char[] weaponName) { return StrEqual(weaponName, "smg") || StrEqual(weaponName, "smg_silenced") || StrEqual(weaponName, "smg_mp5"); } -public bool IsRifle(const char[] weaponName) +bool IsRifle(const char[] weaponName) { return StrEqual(weaponName, "rifle") || StrEqual(weaponName, "rifle_ak47") @@ -513,13 +511,13 @@ public bool IsRifle(const char[] weaponName) || StrEqual(weaponName, "rifle_sg552"); } -public bool IsMelee(const char[] weaponName) +bool IsMelee(const char[] weaponName) { return StrEqual(weaponName, "chainsaw") || StrEqual(weaponName, "melee"); } -public bool IsSniper(const char[] weaponName) +bool IsSniper(const char[] weaponName) { return StrEqual(weaponName, "sniper_awp") || StrEqual(weaponName, "sniper_military") @@ -527,14 +525,14 @@ public bool IsSniper(const char[] weaponName) || StrEqual(weaponName, "hunting_rifle"); } -public bool IsMiniGun(const char[] weaponName) +bool IsMiniGun(const char[] weaponName) { return StrEqual(weaponName, "prop_minigun_l4d1") || StrEqual(weaponName, "prop_minigun"); } -public bool IsMountedMachineGun(const char[] weaponName) +bool IsMountedMachineGun(const char[] weaponName) { return StrEqual(weaponName, "prop_mounted_machine_gun"); } @@ -543,7 +541,7 @@ public bool IsMountedMachineGun(const char[] weaponName) * Print Methods */ -public void PrintEntityLocation(int entity) +stock void PrintEntityLocation(int entity) { if (IsValidEntity(entity)) { new String:classname[MAX_STR_LEN]; @@ -555,7 +553,7 @@ public void PrintEntityLocation(int entity) } } -public bool IsRock(int entity) +bool IsRock(int entity) { if (IsValidEntity(entity)) { new String:classname[MAX_STR_LEN]; @@ -598,7 +596,7 @@ CTankRock__Detonate(rock) * Vector functions */ -public void Vector_Print(float v[3]) +stock void Vector_Print(float v[3]) { PrintToChatAll("(%.2f, %.2f, %.2f)", v[0],v[1],v[2]); } @@ -612,7 +610,7 @@ bool:IsSurvivor(client) return (client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2); } -public float Clamp(float value, float valueMin, float valueMax) +float Clamp(float value, float valueMin, float valueMax) { if (value < valueMin) { return valueMin; diff --git a/addons/sourcemod/scripting/l4d_skip_intro.sp b/addons/sourcemod/scripting/l4d_skip_intro.sp index cf610f0d2..1f64c9824 100644 --- a/addons/sourcemod/scripting/l4d_skip_intro.sp +++ b/addons/sourcemod/scripting/l4d_skip_intro.sp @@ -167,7 +167,7 @@ public void OnMapEnd() g_bMapStarted = false; } -public void ConVarChanged_Allow(Handle convar, const char[] oldValue, const char[] newValue) +void ConVarChanged_Allow(Handle convar, const char[] oldValue, const char[] newValue) { IsAllowed(); } @@ -246,7 +246,7 @@ bool IsAllowedGameMode() return true; } -public void OnGamemode(const char[] output, int caller, int activator, float delay) +void OnGamemode(const char[] output, int caller, int activator, float delay) { if( strcmp(output, "OnCoop") == 0 ) g_iCurrentMode = 1; @@ -263,7 +263,7 @@ public void OnGamemode(const char[] output, int caller, int activator, float del // ==================================================================================================== // EVENTS // ==================================================================================================== -public void Event_NoDraw(Event event, const char[] name, bool dontBroadcast) +void Event_NoDraw(Event event, const char[] name, bool dontBroadcast) { if( g_bCvarAllow && (!g_bLeft4DHooks || L4D_IsFirstMapInScenario()) ) { @@ -285,7 +285,7 @@ public void Event_NoDraw(Event event, const char[] name, bool dontBroadcast) } } -public Action TimerStart(Handle timer) +Action TimerStart(Handle timer) { char buffer[128]; // 128 should be long enough, 3rd party maps could be longer than Valves ~52 chars (including OnUser1 below)? diff --git a/addons/sourcemod/scripting/l4d_tank_control_eq.sp b/addons/sourcemod/scripting/l4d_tank_control_eq.sp index 65aa350d9..20ab7b916 100644 --- a/addons/sourcemod/scripting/l4d_tank_control_eq.sp +++ b/addons/sourcemod/scripting/l4d_tank_control_eq.sp @@ -46,7 +46,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max return APLRes_Success; } -public int Native_GetTankSelection(Handle plugin, int numParams) { return getInfectedPlayerBySteamId(queuedTankSteamId); } +int Native_GetTankSelection(Handle plugin, int numParams) { return getInfectedPlayerBySteamId(queuedTankSteamId); } public Plugin myinfo = { @@ -150,7 +150,7 @@ public Action L4D_OnTryOfferingTankBot(int tank_index, bool &enterStatis) strcopy(queuedTankSteamId, sizeof(queuedTankSteamId), sOverrideTank); // If we don't have a queued tank, choose one - if (!strcmp(queuedTankSteamId, "")) + if (strcmp(queuedTankSteamId, "") == 0) chooseTank(0); // Mark the player as having had tank @@ -172,7 +172,7 @@ public Action L4D_OnTryOfferingTankBot(int tank_index, bool &enterStatis) /** * When a new game starts, reset the tank pool. */ -public void RoundStart_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void RoundStart_Event(Event hEvent, const char[] eName, bool dontBroadcast) { CreateTimer(10.0, newGame); dcedTankFrustration = -1; @@ -198,7 +198,7 @@ Action newGame(Handle timer) /** * When the round ends, reset the active tank. */ -public void RoundEnd_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void RoundEnd_Event(Event hEvent, const char[] eName, bool dontBroadcast) { queuedTankSteamId = ""; tankInitiallyChosen = ""; @@ -207,7 +207,7 @@ public void RoundEnd_Event(Event hEvent, const char[] eName, bool dontBroadcast) /** * When a player leaves the start area, choose a tank and output to all. */ -public void PlayerLeftStartArea_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void PlayerLeftStartArea_Event(Event hEvent, const char[] eName, bool dontBroadcast) { tankInitiallyChosen = ""; @@ -218,7 +218,7 @@ public void PlayerLeftStartArea_Event(Event hEvent, const char[] eName, bool don /** * When the queued tank switches teams, choose a new one */ -public void PlayerTeam_Event(Event hEvent, const char[] name, bool dontBroadcast) +void PlayerTeam_Event(Event hEvent, const char[] name, bool dontBroadcast) { int team = hEvent.GetInt("team"); int oldTeam = hEvent.GetInt("oldteam"); @@ -320,7 +320,7 @@ void ReplaceTank(int deservingTank) /** * When the tank dies, requeue a player to become tank (for finales) */ -public void PlayerDeath_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void PlayerDeath_Event(Event hEvent, const char[] eName, bool dontBroadcast) { int victim = GetClientOfUserId(hEvent.GetInt("userid")); @@ -338,7 +338,7 @@ public void PlayerDeath_Event(Event hEvent, const char[] eName, bool dontBroadca } } -public void TankKilled_Event(Event hEvent, const char[] eName, bool dontBroadcast) +void TankKilled_Event(Event hEvent, const char[] eName, bool dontBroadcast) { if (hTankDebug.BoolValue) PrintToConsoleAll("[TC] Tank died(2), choosing a new tank"); @@ -361,7 +361,7 @@ public void TankKilled_Event(Event hEvent, const char[] eName, bool dontBroadcas Action Tank_Cmd(int client, int args) { // Only output if client is in-game and we have a queued tank - if (!IsClientInGame(client) || strcmp(queuedTankSteamId, "")) + if (!IsClientInGame(client) || strcmp(queuedTankSteamId, "") == 0) return Plugin_Handled; int tankClientId = getInfectedPlayerBySteamId(queuedTankSteamId); diff --git a/addons/sourcemod/scripting/l4d_tank_damage_announce.sp b/addons/sourcemod/scripting/l4d_tank_damage_announce.sp index 4eee5f62a..4aff9c11a 100644 --- a/addons/sourcemod/scripting/l4d_tank_damage_announce.sp +++ b/addons/sourcemod/scripting/l4d_tank_damage_announce.sp @@ -94,17 +94,17 @@ public OnClientDisconnect_Post(client) CreateTimer(0.1, Timer_CheckTank, client); // Use a delayed timer due to bugs where the tank passes to another player } -public Cvar_Enabled(Handle:convar, const String:oldValue[], const String:newValue[]) +void Cvar_Enabled(Handle:convar, const String:oldValue[], const String:newValue[]) { g_bEnabled = StringToInt(newValue) > 0 ? true:false; } -public Cvar_SurvivorLimit(Handle:convar, const String:oldValue[], const String:newValue[]) +void Cvar_SurvivorLimit(Handle:convar, const String:oldValue[], const String:newValue[]) { g_iSurvivorLimit = StringToInt(newValue); } -public Cvar_TankHealth(Handle:convar, const String:oldValue[], const String:newValue[]) +void Cvar_TankHealth(Handle:convar, const String:oldValue[], const String:newValue[]) { CalculateTankHealth(); } @@ -135,7 +135,7 @@ CalculateTankHealth() } } -public Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) +void Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) { if (!g_bIsTankInPlay) return; // No tank in play; no damage to record @@ -156,7 +156,7 @@ public Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast) g_iLastTankHealth = GetEventInt(event, "health"); } -public Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) +void Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) { if (!g_bIsTankInPlay) return; // No tank in play; no damage to record @@ -176,7 +176,7 @@ public Event_PlayerKilled(Handle:event, const String:name[], bool:dontBroadcast) CreateTimer(0.1, Timer_CheckTank, victim); // Use a delayed timer due to bugs where the tank passes to another player } -public Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) +void Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); g_iTankClient = client; @@ -191,7 +191,7 @@ public Event_TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) g_iLastTankHealth = GetClientHealth(client); } -public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) +void Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { bPrintedHealth = false; g_bIsTankInPlay = false; @@ -200,7 +200,7 @@ public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) } // When survivors wipe or juke tank, announce damage -public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) +void Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) { // But only if a tank that hasn't been killed exists if (g_bAnnounceTankDamage) @@ -211,7 +211,7 @@ public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) ClearTankDamage(); } -public Action:Timer_CheckTank(Handle:timer, any:oldtankclient) +Action:Timer_CheckTank(Handle:timer, any:oldtankclient) { if (g_iTankClient != oldtankclient) return; // Tank passed @@ -386,7 +386,7 @@ bool IsExactPercent(int damage) return (FloatAbs(fDifference) < 0.001) ? true : false; } -public SortByDamageDesc(elem1, elem2, const array[], Handle:hndl) +int SortByDamageDesc(elem1, elem2, const array[], Handle:hndl) { // By damage, then by client index, descending if (g_iDamage[elem1] > g_iDamage[elem2]) return -1; diff --git a/addons/sourcemod/scripting/l4d_tank_painfade.sp b/addons/sourcemod/scripting/l4d_tank_painfade.sp index bdc462fad..c66ccba76 100644 --- a/addons/sourcemod/scripting/l4d_tank_painfade.sp +++ b/addons/sourcemod/scripting/l4d_tank_painfade.sp @@ -75,7 +75,7 @@ public OnClientDisconnect(client) } } -public Action:TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) +Action:TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) { if (!bEnabled || bIsTankInPlay) return; @@ -83,7 +83,7 @@ public Action:TankSpawn(Handle:event, const String:name[], bool:dontBroadcast) AttachEffect(); } -public Action:PlayerDeath( Handle:event, const String:name[], bool:dontBroadcast ) +Action:PlayerDeath( Handle:event, const String:name[], bool:dontBroadcast ) { if (!bEnabled) return; @@ -94,7 +94,7 @@ public Action:PlayerDeath( Handle:event, const String:name[], bool:dontBroadcast } } -public Action:CheckForTanksDelay( Handle:timer ) +Action:CheckForTanksDelay( Handle:timer ) { if (FindTank() == -1) { @@ -103,7 +103,7 @@ public Action:CheckForTanksDelay( Handle:timer ) } } -public Action:OnTankDamaged(victim, &attacker, &inflictor, &Float:damage, &damageType, &weapon, Float:damageForce[3], Float:damagePosition[3]) +Action:OnTankDamaged(victim, &attacker, &inflictor, &Float:damage, &damageType, &weapon, Float:damageForce[3], Float:damagePosition[3]) { if (!attacker || weapon < 1 || !IsTank(victim)) return Plugin_Continue; diff --git a/addons/sourcemod/scripting/l4d_tank_rush.sp b/addons/sourcemod/scripting/l4d_tank_rush.sp index a47aca790..5b0569ab0 100644 --- a/addons/sourcemod/scripting/l4d_tank_rush.sp +++ b/addons/sourcemod/scripting/l4d_tank_rush.sp @@ -104,7 +104,7 @@ void PluginDisable() UnFreezePoints(); } -public void OnTankGoneAI(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void OnTankGoneAI(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!cvar_unfreezeAI.BoolValue) { @@ -119,7 +119,7 @@ public void OnTankGoneAI(Event hEvent, const char[] sEventName, bool bDontBroadc } } -public void NoTankRushChange(ConVar convar, const char[] oldValue, const char[] newValue) +void NoTankRushChange(ConVar convar, const char[] oldValue, const char[] newValue) { if (StringToInt(newValue) == 0) { @@ -130,7 +130,7 @@ public void NoTankRushChange(ConVar convar, const char[] oldValue, const char[] } } -public void RoundStart(Event hEvent, const char[] eName, bool dontBroadcast) +void RoundStart(Event hEvent, const char[] eName, bool dontBroadcast) { if (InSecondHalfOfRound()) { @@ -138,12 +138,12 @@ public void RoundStart(Event hEvent, const char[] eName, bool dontBroadcast) } } -public void TankSpawn(Event hEvent, const char[] eName, bool dontBroadcast) +void TankSpawn(Event hEvent, const char[] eName, bool dontBroadcast) { FreezePoints(true); } -public void PlayerDeath(Event hEvent, const char[] eName, bool dontBroadcast) +void PlayerDeath(Event hEvent, const char[] eName, bool dontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); if (client > 0 && IsTank(client)) @@ -160,7 +160,7 @@ public void OnClientDisconnect(int client) } } -public Action CheckForTanksDelay(Handle timer) +Action CheckForTanksDelay(Handle timer) { if (!IsTankActuallyInPlay()) { diff --git a/addons/sourcemod/scripting/l4d_texture_manager_block.sp b/addons/sourcemod/scripting/l4d_texture_manager_block.sp index 85553afe1..3b1ea9926 100644 --- a/addons/sourcemod/scripting/l4d_texture_manager_block.sp +++ b/addons/sourcemod/scripting/l4d_texture_manager_block.sp @@ -18,7 +18,7 @@ public void OnPluginStart() CreateTimer(fRand, CheckClients, _, TIMER_REPEAT); } -public Action CheckClients(Handle hTimer) +Action CheckClients(Handle hTimer) { if (!IsServerProcessing()) { return Plugin_Continue; @@ -35,7 +35,7 @@ public Action CheckClients(Handle hTimer) return Plugin_Continue; } -public void ClientQueryCallback(QueryCookie cookie, int client, ConVarQueryResult result, const char[] cvarName, const char[] cvarValue, any value) +void ClientQueryCallback(QueryCookie cookie, int client, ConVarQueryResult result, const char[] cvarName, const char[] cvarValue, any value) { switch (result) { case ConVarQuery_Okay: { diff --git a/addons/sourcemod/scripting/l4d_thirdpersonshoulderblock.sp b/addons/sourcemod/scripting/l4d_thirdpersonshoulderblock.sp index 68c59540a..d51826dcd 100644 --- a/addons/sourcemod/scripting/l4d_thirdpersonshoulderblock.sp +++ b/addons/sourcemod/scripting/l4d_thirdpersonshoulderblock.sp @@ -46,7 +46,7 @@ public void OnPluginStart() CreateTimer(GetRandomFloat(2.5, 3.5), CheckClients, _, TIMER_REPEAT); } -public Action CheckClients(Handle timer) +Action CheckClients(Handle timer) { if (GetConVarBool(cvar_enabled)) { @@ -64,7 +64,7 @@ public Action CheckClients(Handle timer) return Plugin_Handled; } -public void QueryClientConVarCallback(QueryCookie cookie, int client, ConVarQueryResult result, char[] cvarName, char[] cvarValue) +void QueryClientConVarCallback(QueryCookie cookie, int client, ConVarQueryResult result, char[] cvarName, char[] cvarValue) { if (IsClientInGame(client) && !IsClientInKickQueue(client)) { diff --git a/addons/sourcemod/scripting/l4d_votepoll_fix.sp b/addons/sourcemod/scripting/l4d_votepoll_fix.sp index 4c81ed418..0cafd73e0 100644 --- a/addons/sourcemod/scripting/l4d_votepoll_fix.sp +++ b/addons/sourcemod/scripting/l4d_votepoll_fix.sp @@ -48,7 +48,7 @@ public OnPluginStart() AddCommandListener(VPF_cmdh_Vote, "vote"); } -public Action:VPF_cmdh_Vote(client, const String:command[], argc) +Action:VPF_cmdh_Vote(client, const String:command[], argc) { if (g_bVotePoolFixTriggered && GetClientTeam(client) == 1) return Plugin_Handled; @@ -56,17 +56,17 @@ public Action:VPF_cmdh_Vote(client, const String:command[], argc) return Plugin_Continue; } -public Action:VPF_ev_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) +Action:VPF_ev_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { VPF_PrepareToFindVoteEnt(); } -public Action:VPF_ev_VoteStarted(Handle:event, const String:name[], bool:dontBroadcast) +Action:VPF_ev_VoteStarted(Handle:event, const String:name[], bool:dontBroadcast) { VPF_PrepareToFix(GetEventInt(event, "team"), GetEventInt(event, "initiator")); } -public Action:VPF_mh_OnVoteStart(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init) +Action:VPF_mh_OnVoteStart(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init) { new team = BfReadByte(bf); new client = BfReadByte(bf); @@ -92,7 +92,7 @@ VPF_PrepareToFindVoteEnt() CreateTimer(0.5, VPF_t_FindVoteContollerEnt, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action:VPF_t_FindVoteContollerEnt(Handle:timer) +Action:VPF_t_FindVoteContollerEnt(Handle:timer) { g_iVoteEntity = EntIndexToEntRef(FindEntityByClassname(-1, "vote_controller")); } diff --git a/addons/sourcemod/scripting/l4d_weapon_limits.sp b/addons/sourcemod/scripting/l4d_weapon_limits.sp index e847bbdaa..51d4617cb 100644 --- a/addons/sourcemod/scripting/l4d_weapon_limits.sp +++ b/addons/sourcemod/scripting/l4d_weapon_limits.sp @@ -120,7 +120,7 @@ public void OnMapStart() PrecacheSound(SOUND_NAME); } -public void ClearUp(Event hEvent, const char[] name, bool dontBroadcast) +void ClearUp(Event hEvent, const char[] name, bool dontBroadcast) { for (int i = 1; i <= MaxClients; i++) { bIsIncappedWithMelee[i] = false; @@ -138,7 +138,7 @@ public void OnClientDisconnect(int client) SDKUnhook(client, SDKHook_WeaponCanUse, Hook_WeaponCanUse); } -public Action AddLimit_Cmd(int args) +Action AddLimit_Cmd(int args) { if (bIsLocked) { PrintToServer("Limits have been locked !"); @@ -182,7 +182,7 @@ public Action AddLimit_Cmd(int args) return Plugin_Handled; } -public Action LockLimits_Cmd(int args) +Action LockLimits_Cmd(int args) { if (bIsLocked) { PrintToServer("Weapon limits already locked !"); @@ -195,7 +195,7 @@ public Action LockLimits_Cmd(int args) return Plugin_Handled; } -public Action ClearLimits_Cmd(int args) +Action ClearLimits_Cmd(int args) { if (!bIsLocked) { return Plugin_Handled; @@ -212,7 +212,7 @@ public Action ClearLimits_Cmd(int args) return Plugin_Handled; } -public Action Hook_WeaponCanUse(int client, int weapon) +Action Hook_WeaponCanUse(int client, int weapon) { // TODO: There seems to be an issue that this hook will be constantly called // when client with no weapon on equivalent slot just eyes or walks on it. @@ -278,7 +278,7 @@ public Action Hook_WeaponCanUse(int client, int weapon) return Plugin_Continue; } -public void OnIncap(Event event, const char[] name, bool dontBroadcast) +void OnIncap(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -293,7 +293,7 @@ public void OnIncap(Event event, const char[] name, bool dontBroadcast) } } -public void OnRevive(Event event, const char[] name, bool dontBroadcast) +void OnRevive(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("subject")); @@ -304,7 +304,7 @@ public void OnRevive(Event event, const char[] name, bool dontBroadcast) bIsIncappedWithMelee[client] = false; } -public void OnDeath(Event event, const char[] name, bool dontBroadcast) +void OnDeath(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -315,7 +315,7 @@ public void OnDeath(Event event, const char[] name, bool dontBroadcast) bIsIncappedWithMelee[client] = false; } -public void OnBotReplacedPlayer(Event event, const char[] name, bool dontBroadcast) +void OnBotReplacedPlayer(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")); @@ -329,7 +329,7 @@ public void OnBotReplacedPlayer(Event event, const char[] name, bool dontBroadca bIsIncappedWithMelee[player] = false; } -public void OnPlayerReplacedBot(Event event, const char[] name, bool dontBroadcast) +void OnPlayerReplacedBot(Event event, const char[] name, bool dontBroadcast) { int player = GetClientOfUserId(event.GetInt("player")); diff --git a/addons/sourcemod/scripting/l4d_witch_damage_announce.sp b/addons/sourcemod/scripting/l4d_witch_damage_announce.sp index b22081553..447ebfb5f 100644 --- a/addons/sourcemod/scripting/l4d_witch_damage_announce.sp +++ b/addons/sourcemod/scripting/l4d_witch_damage_announce.sp @@ -115,7 +115,7 @@ public void OnEntityCreated(int entity, const char[] classname) } } -public void WitchHurt_Event(Event hEvent, const char[] name, bool dontBroadcast) +void WitchHurt_Event(Event hEvent, const char[] name, bool dontBroadcast) { int victimEntId = hEvent.GetInt("entityid"); @@ -137,7 +137,7 @@ public void WitchHurt_Event(Event hEvent, const char[] name, bool dontBroadcast) } } -public void RoundStart_Event(Event hEvent, const char[] name, bool dontBroadcast) +void RoundStart_Event(Event hEvent, const char[] name, bool dontBroadcast) { ClearDamage(); @@ -146,7 +146,7 @@ public void RoundStart_Event(Event hEvent, const char[] name, bool dontBroadcast bHasPrinted = false; } -public void RoundEnd_Event(Event hEvent, const char[] name, bool dontBroadcast) +void RoundEnd_Event(Event hEvent, const char[] name, bool dontBroadcast) { if (bWitchSpawned) { @@ -159,7 +159,7 @@ public void RoundEnd_Event(Event hEvent, const char[] name, bool dontBroadcast) } } -public void WitchDeath_Event(Event hEvent, const char[] name, bool dontBroadcast) +void WitchDeath_Event(Event hEvent, const char[] name, bool dontBroadcast) { int killerId = hEvent.GetInt("userid"); int killer = GetClientOfUserId(killerId); @@ -188,7 +188,7 @@ public void WitchDeath_Event(Event hEvent, const char[] name, bool dontBroadcast } } -public void PlayerDied_Event(Event hEvent, const char[] name, bool dontBroadcast) +void PlayerDied_Event(Event hEvent, const char[] name, bool dontBroadcast) { int userId = hEvent.GetInt("userid"); int victim = GetClientOfUserId(userId); diff --git a/addons/sourcemod/scripting/l4dhots.sp b/addons/sourcemod/scripting/l4dhots.sp index cd9870188..4754dacc2 100644 --- a/addons/sourcemod/scripting/l4dhots.sp +++ b/addons/sourcemod/scripting/l4dhots.sp @@ -91,12 +91,12 @@ public void OnMapStart() g_aHOTPair.Clear(); } -public void Player_BotReplace_Event(Event event, const char[] name, bool dontBroadcast) +void Player_BotReplace_Event(Event event, const char[] name, bool dontBroadcast) { HandleSurvivorTakeover(event.GetInt("player"), event.GetInt("bot")); } -public void Bot_PlayerReplace_Event(Event event, const char[] name, bool dontBroadcast) +void Bot_PlayerReplace_Event(Event event, const char[] name, bool dontBroadcast) { HandleSurvivorTakeover(event.GetInt("bot"), event.GetInt("player")); } @@ -119,7 +119,7 @@ void HandleSurvivorTakeover(int replacee, int replacer) } } -public void PillsUsed_Event(Event event, const char[] name, bool dontBroadcast) +void PillsUsed_Event(Event event, const char[] name, bool dontBroadcast) { HealEntityOverTime( event.GetInt("userid"), @@ -129,7 +129,7 @@ public void PillsUsed_Event(Event event, const char[] name, bool dontBroadcast) ); } -public void AdrenalineUsed_Event(Event event, const char[] name, bool dontBroadcast) +void AdrenalineUsed_Event(Event event, const char[] name, bool dontBroadcast) { HealEntityOverTime( event.GetInt("userid"), @@ -166,7 +166,7 @@ void HealEntityOverTime(int userid, float interval, int increment, int total) } } -public Action __HOT_ACTION(Handle timer, DataPack pack) +Action __HOT_ACTION(Handle timer, DataPack pack) { pack.Reset(); @@ -216,7 +216,7 @@ void __HealTowardsMax(int client, int amount, int max) * ConVar Change */ -public void PillHotChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void PillHotChanged(ConVar convar, const char[] oldValue, const char[] newValue) { bool newval = StringToInt(newValue)!=0; if (newval && StringToInt(oldValue) ==0) @@ -229,7 +229,7 @@ public void PillHotChanged(ConVar convar, const char[] oldValue, const char[] ne } } -public void AdrenHotChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void AdrenHotChanged(ConVar convar, const char[] oldValue, const char[] newValue) { bool newval = StringToInt(newValue)!=0; if (newval && StringToInt(oldValue) ==0) diff --git a/addons/sourcemod/scripting/lerpmonitor.sp b/addons/sourcemod/scripting/lerpmonitor.sp index 12be7240e..bf5a16dd5 100644 --- a/addons/sourcemod/scripting/lerpmonitor.sp +++ b/addons/sourcemod/scripting/lerpmonitor.sp @@ -50,7 +50,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max return APLRes_Success; } -public int LM_GetLerpTime(Handle plugin, int numParams) +int LM_GetLerpTime(Handle plugin, int numParams) { int client = GetNativeCell(1); if (client < 1 || client > MaxClients) { @@ -70,7 +70,7 @@ public int LM_GetLerpTime(Handle plugin, int numParams) return view_as(-1.0); } -public int LM_GetCurrentLerpTime(Handle plugin, int numParams) +int LM_GetCurrentLerpTime(Handle plugin, int numParams) { int client = GetNativeCell(1); if (client < 1 || client > MaxClients) { @@ -128,7 +128,7 @@ public void OnClientPutInServer(int client) } } -public Action Process(Handle hTimer, int userid) +Action Process(Handle hTimer, int userid) { int client = GetClientOfUserId(userid); if (client > 0 && GetClientTeam(client) > L4D_TEAM_SPECTATE) { @@ -150,7 +150,7 @@ public void OnMapEnd() ArrLerpsCountChanges.Clear(); } -public void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) { //This event works great with the plugin readyup.smx (does not conflict) //This event works great in different game modes: versus, coop, scavenge and etc @@ -164,7 +164,7 @@ public void OnClientSettingsChanged(int client) } } -public void Event_PlayerDisconnect(Event hEvent, const char[] name, bool dontBroadcast) +void Event_PlayerDisconnect(Event hEvent, const char[] name, bool dontBroadcast) { char SteamID[64]; hEvent.GetString("networkid", SteamID, sizeof(SteamID)); @@ -177,7 +177,7 @@ public void Event_PlayerDisconnect(Event hEvent, const char[] name, bool dontBro //ArrLerpsCountChanges.Remove(SteamID); } -public void OnTeamChange(Event hEvent, const char[] eName, bool dontBroadcast) +void OnTeamChange(Event hEvent, const char[] eName, bool dontBroadcast) { if (hEvent.GetInt("team") > L4D_TEAM_SPECTATE) { int userid = hEvent.GetInt("userid"); @@ -190,7 +190,7 @@ public void OnTeamChange(Event hEvent, const char[] eName, bool dontBroadcast) } } -public Action OnTeamChangeDelay(Handle hTimer, int userid) +Action OnTeamChangeDelay(Handle hTimer, int userid) { int client = GetClientOfUserId(userid); if (client > 0) { @@ -199,13 +199,13 @@ public Action OnTeamChangeDelay(Handle hTimer, int userid) return Plugin_Stop; } -public void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) { // little delay for other round end used modules CreateTimer(0.5, Timer_RoundEndDelay, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action Timer_RoundEndDelay(Handle hTimer) +Action Timer_RoundEndDelay(Handle hTimer) { isFirstHalf = false; isTransfer = true; @@ -216,7 +216,7 @@ public Action Timer_RoundEndDelay(Handle hTimer) return Plugin_Stop; } -public Action Lerps_Cmd(int client, int args) +Action Lerps_Cmd(int client, int args) { bool isEmpty = true; if (ArrLerpsValue.Size > 0) { @@ -242,7 +242,7 @@ public Action Lerps_Cmd(int client, int args) return Plugin_Handled; } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { // delete change count for second half if (!isFirstHalf) { @@ -252,7 +252,7 @@ public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast CreateTimer(0.5, OnTransfer, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action OnTransfer(Handle hTimer) +Action OnTransfer(Handle hTimer) { isTransfer = false; return Plugin_Stop; diff --git a/addons/sourcemod/scripting/match_vote.sp b/addons/sourcemod/scripting/match_vote.sp index 3f6682cbf..89c344ddc 100644 --- a/addons/sourcemod/scripting/match_vote.sp +++ b/addons/sourcemod/scripting/match_vote.sp @@ -88,7 +88,7 @@ public void OnConfigsExecuted() } } -public Action Listener_Quit(int iClient, const char[] sCommand, int iArgc) +Action Listener_Quit(int iClient, const char[] sCommand, int iArgc) { g_bShutdown = true; return Plugin_Continue; @@ -124,7 +124,7 @@ public void OnCedapugEnded() g_bCedaGame = false; } -public Action MatchRequest(int iClient, int iArgs) +Action MatchRequest(int iClient, int iArgs) { if (!g_hEnabled.BoolValue) { @@ -220,7 +220,7 @@ void MatchModeMenu(int iClient) hMenu.Display(iClient, 20); } -public int MatchModeMenuHandler(Menu menu, MenuAction action, int param1, int param2) +int MatchModeMenuHandler(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_End) { @@ -262,7 +262,7 @@ public int MatchModeMenuHandler(Menu menu, MenuAction action, int param1, int pa return 0; } -public int ConfigsMenuHandler(Menu menu, MenuAction action, int param1, int param2) +int ConfigsMenuHandler(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_End) delete menu; @@ -327,7 +327,7 @@ bool StartMatchVote(int iClient, const char[] sCfgName) return true; } -public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) +void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { switch (action) { @@ -343,7 +343,7 @@ public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, } } -public void MatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void MatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { @@ -364,7 +364,7 @@ public void MatchVoteResultHandler(Handle vote, int num_votes, int num_clients, DisplayBuiltinVoteFail(vote, BuiltinVoteFail_Loses); } -public Action MatchReset(int iClient, int iArgs) +Action MatchReset(int iClient, int iArgs) { if (!g_hEnabled.BoolValue) { @@ -438,7 +438,7 @@ bool StartResetMatchVote(int iClient) return true; } -public void ResetMatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void ResetMatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { @@ -459,7 +459,7 @@ public void ResetMatchVoteResultHandler(Handle vote, int num_votes, int num_clie DisplayBuiltinVoteFail(vote, BuiltinVoteFail_Loses); } -public Action ChangeMatchRequest(int iClient, int iArgs) +Action ChangeMatchRequest(int iClient, int iArgs) { if (!g_hEnabled.BoolValue) { @@ -539,7 +539,7 @@ void ChMatchModeMenu(int iClient) hMenu.Display(iClient, 20); } -public int ChMatchModeMenuHandler(Menu menu, MenuAction action, int param1, int param2) +int ChMatchModeMenuHandler(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_End) { @@ -581,7 +581,7 @@ public int ChMatchModeMenuHandler(Menu menu, MenuAction action, int param1, int return 0; } -public int ChConfigsMenuHandler(Menu menu, MenuAction action, int param1, int param2) +int ChConfigsMenuHandler(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_End) { @@ -651,7 +651,7 @@ bool StartChMatchVote(int iClient, const char[] sCfgName) return true; } -public void ChMatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void ChMatchVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { diff --git a/addons/sourcemod/scripting/nm3_ladder_damage.sp b/addons/sourcemod/scripting/nm3_ladder_damage.sp index 593e7b920..e4881a2ab 100644 --- a/addons/sourcemod/scripting/nm3_ladder_damage.sp +++ b/addons/sourcemod/scripting/nm3_ladder_damage.sp @@ -79,7 +79,7 @@ public void OnClientPutInServer(int iClient) SDKUnhook(iClient, SDKHook_OnTakeDamage, Hook_OnTakeDamage); }*/ -public Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) +Action Hook_OnTakeDamage(int iVictim, int &iAttacker, int &iInflictor, float &fDamage, int &iDamagetype) { if (iDamagetype != DMG_FALL || !g_bIsSewers || fDamage <= 30.0) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/nosaferoomkits.sp b/addons/sourcemod/scripting/nosaferoomkits.sp index 34176f3b7..0ae5d1258 100644 --- a/addons/sourcemod/scripting/nosaferoomkits.sp +++ b/addons/sourcemod/scripting/nosaferoomkits.sp @@ -29,7 +29,7 @@ public void OnPluginStart() HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy); } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { char GameMode[32]; GetConVarString(FindConVar("mp_gamemode"), GameMode, sizeof(GameMode)); diff --git a/addons/sourcemod/scripting/noteam_nudging.sp b/addons/sourcemod/scripting/noteam_nudging.sp index aaded92a3..fb5640b5a 100644 --- a/addons/sourcemod/scripting/noteam_nudging.sp +++ b/addons/sourcemod/scripting/noteam_nudging.sp @@ -24,7 +24,7 @@ public void OnPluginStart() CreateTimer(1.0, UpdateAvoid, _, TIMER_REPEAT); } -public Action UpdateAvoid(Handle timer) +Action UpdateAvoid(Handle timer) { float flTime = GetGameTime(); float flPropTime; diff --git a/addons/sourcemod/scripting/panel_text.sp b/addons/sourcemod/scripting/panel_text.sp index 3dd030a05..1abfde583 100644 --- a/addons/sourcemod/scripting/panel_text.sp +++ b/addons/sourcemod/scripting/panel_text.sp @@ -28,13 +28,13 @@ public OnPluginStart() sm_readypaneltextdelay = CreateConVar("sm_readypaneltextdelay", "4.0", "Delay before adding the text to the ready-up panel for order control", FCVAR_NONE, true, 0.0, true, 10.0); } -public Action:LockStrings_Cmd(args) +Action:LockStrings_Cmd(args) { areStringsLocked = true; return Plugin_Handled; } -public Action:AddReadyString_Cmd(args) +Action:AddReadyString_Cmd(args) { if (stringCount < 10 && !areStringsLocked) { @@ -44,19 +44,19 @@ public Action:AddReadyString_Cmd(args) return Plugin_Handled; } -public Action:ResetStringCount_Cmd(args) +Action:ResetStringCount_Cmd(args) { stringCount = 0; areStringsLocked = false; return Plugin_Handled; } -public RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) +void RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) { CreateTimer(GetConVarFloat(sm_readypaneltextdelay), panelTimer); } -public Action:panelTimer(Handle:timer) +Action:panelTimer(Handle:timer) { for (new i = 0; i < stringCount && AddStringToReadyFooter(panelText[i]); i++) { } diff --git a/addons/sourcemod/scripting/pause.sp b/addons/sourcemod/scripting/pause.sp index 68d756f44..890670a5d 100644 --- a/addons/sourcemod/scripting/pause.sp +++ b/addons/sourcemod/scripting/pause.sp @@ -198,7 +198,7 @@ public void OnMapEnd() Unpause(false); } -public void RoundEnd_Event(Event event, const char[] name, bool dontBroadcast) +void RoundEnd_Event(Event event, const char[] name, bool dontBroadcast) { if (deferredPauseTimer != null) { @@ -208,7 +208,7 @@ public void RoundEnd_Event(Event event, const char[] name, bool dontBroadcast) Unpause(false); } -public void RoundStart_Event(Event event, const char[] name, bool dontBroadcast) +void RoundStart_Event(Event event, const char[] name, bool dontBroadcast) { RoundEnd = false; initiatorId = 0; @@ -218,7 +218,7 @@ public void RoundStart_Event(Event event, const char[] name, bool dontBroadcast) // Commands // ====================================== -public Action Pause_Cmd(int client, int args) +Action Pause_Cmd(int client, int args) { if (onlyEnableForce.BoolValue) return Plugin_Continue; @@ -257,7 +257,7 @@ public Action Pause_Cmd(int client, int args) return Plugin_Handled; } -public Action PauseDelay_Timer(Handle timer) +Action PauseDelay_Timer(Handle timer) { if (pauseDelay == 0) { @@ -273,7 +273,7 @@ public Action PauseDelay_Timer(Handle timer) return Plugin_Continue; } -public Action ForcePause_Cmd(int client, int args) +Action ForcePause_Cmd(int client, int args) { if (!isPaused) { @@ -292,7 +292,7 @@ public Action ForcePause_Cmd(int client, int args) return Plugin_Handled; } -public Action Unpause_Cmd(int client, int args) +Action Unpause_Cmd(int client, int args) { if (onlyEnableForce.BoolValue) return Plugin_Continue; @@ -343,7 +343,7 @@ public Action Unpause_Cmd(int client, int args) return Plugin_Handled; } -public Action Unready_Cmd(int client, int args) +Action Unready_Cmd(int client, int args) { if (onlyEnableForce.BoolValue) return Plugin_Continue; @@ -387,7 +387,7 @@ public Action Unready_Cmd(int client, int args) return Plugin_Handled; } -public Action ForceUnpause_Cmd(int client, int args) +Action ForceUnpause_Cmd(int client, int args) { if (isPaused) { @@ -399,7 +399,7 @@ public Action ForceUnpause_Cmd(int client, int args) return Plugin_Handled; } -public Action ToggleReady_Cmd(int client, int args) +Action ToggleReady_Cmd(int client, int args) { if (onlyEnableForce.BoolValue) return Plugin_Continue; @@ -450,7 +450,7 @@ void AttemptPause() } } -public Action DeferredPause_Timer(Handle timer) +Action DeferredPause_Timer(Handle timer) { if (!IsSurvivorReviving()) { @@ -566,7 +566,7 @@ void Unpause(bool real = true) // Pause Panel // ====================================== -public Action Show_Cmd(int client, int args) +Action Show_Cmd(int client, int args) { if (isPaused) { @@ -577,7 +577,7 @@ public Action Show_Cmd(int client, int args) return Plugin_Handled; } -public Action Hide_Cmd(int client, int args) +Action Hide_Cmd(int client, int args) { if (isPaused) { @@ -588,7 +588,7 @@ public Action Hide_Cmd(int client, int args) return Plugin_Handled; } -public Action MenuRefresh_Timer(Handle timer) +Action MenuRefresh_Timer(Handle timer) { if (isPaused) { @@ -598,7 +598,7 @@ public Action MenuRefresh_Timer(Handle timer) return Plugin_Stop; } -public int DummyHandler(Menu menu, MenuAction action, int param1, int param2) { return 1; } +int DummyHandler(Menu menu, MenuAction action, int param1, int param2) { return 1; } void UpdatePanel() { @@ -695,7 +695,7 @@ void InitiateLiveCountdown() } } -public Action ReadyCountdownDelay_Timer(Handle timer) +Action ReadyCountdownDelay_Timer(Handle timer) { if (unpauseDelay == 0) { @@ -733,7 +733,7 @@ void CancelFullReady(int client) // Spectate Fix // ====================================== -public Action Spectate_Cmd(int client, int args) +Action Spectate_Cmd(int client, int args) { if (SpecTimer[client] != null) { @@ -745,7 +745,7 @@ public Action Spectate_Cmd(int client, int args) return Plugin_Handled; } -public Action SecureSpec(Handle timer, any client) +Action SecureSpec(Handle timer, any client) { SpecTimer[client] = null; return Plugin_Stop; @@ -775,7 +775,7 @@ void ToggleCommandListeners(bool enable) } } -public Action Callvote_Callback(int client, char[] command, int argc) +Action Callvote_Callback(int client, char[] command, int argc) { if (GetClientTeam(client) == L4D2Team_Spectator) { @@ -840,7 +840,7 @@ public Action Callvote_Callback(int client, char[] command, int argc) return Plugin_Handled; } -public Action Say_Callback(int client, char[] command, int argc) +Action Say_Callback(int client, char[] command, int argc) { if (isPaused) { @@ -864,7 +864,7 @@ public Action Say_Callback(int client, char[] command, int argc) return Plugin_Continue; } -public Action TeamSay_Callback(int client, char[] command, int argc) +Action TeamSay_Callback(int client, char[] command, int argc) { if (isPaused) { @@ -881,7 +881,7 @@ public Action TeamSay_Callback(int client, char[] command, int argc) return Plugin_Continue; } -public Action Unpause_Callback(int client, char[] command, int argc) +Action Unpause_Callback(int client, char[] command, int argc) { return (isPaused) ? Plugin_Handled : Plugin_Continue; } @@ -890,7 +890,7 @@ public Action Unpause_Callback(int client, char[] command, int argc) // Natives // ====================================== -public int Native_IsInPause(Handle plugin, int numParams) +int Native_IsInPause(Handle plugin, int numParams) { return isPaused; } diff --git a/addons/sourcemod/scripting/playermanagement.sp b/addons/sourcemod/scripting/playermanagement.sp index 9f137983e..c2b147996 100644 --- a/addons/sourcemod/scripting/playermanagement.sp +++ b/addons/sourcemod/scripting/playermanagement.sp @@ -135,15 +135,15 @@ void OnGameplayStart(const char[] output, int caller, int activator, float delay if (GetHumanCount()) FixBotCount(); } -public Action FixBots_Cmd(int client, int args) +Action FixBots_Cmd(int client, int args) { if (client != 0) { - PrintToChatAll("%t %t", "Tag", "FixBot", client); + CPrintToChatAll("%t %t", "Tag", "FixBot", client); } else { - PrintToChatAll("%t %t", "Tag", "FixBotConsole"); + CPrintToChatAll("%t %t", "Tag", "FixBotConsole"); } FixBotCount(); return Plugin_Handled; @@ -154,7 +154,7 @@ void survivor_limitChanged(ConVar convar, const char[] oldValue, const char[] ne if (isMapActive && GetHumanCount()) FixBotCount(); } -public Action Spectate_Cmd(int client, int args) +Action Spectate_Cmd(int client, int args) { if (!sm_allow_spectate_command.BoolValue) { @@ -205,7 +205,7 @@ public Action Spectate_Cmd(int client, int args) return Plugin_Handled; } -public Action SecureSpec(Handle timer, any client) +Action SecureSpec(Handle timer, any client) { KillTimer(SpecTimer[client]); SpecTimer[client] = INVALID_HANDLE; @@ -213,7 +213,7 @@ public Action SecureSpec(Handle timer, any client) return Plugin_Stop; } -public Action RespecDelay_Timer(Handle timer, any client) +Action RespecDelay_Timer(Handle timer, any client) { if (IsClientInGame(client)) { @@ -229,7 +229,7 @@ public Action L4D_OnEnterGhostStatePre(int client) return blockVotes[client] ? Plugin_Handled : Plugin_Continue; } -public Action TeamChange_Listener(int client, const char[] command, int argc) +Action TeamChange_Listener(int client, const char[] command, int argc) { // Invalid if (!IsClientInGame(client) || argc < 1) @@ -255,7 +255,7 @@ public Action OnClientSayCommand(int client, const char[] command, const char[] return blockVotes[client] ? Plugin_Stop : Plugin_Continue; } -public Action SwapTeams_Cmd(int client, int args) +Action SwapTeams_Cmd(int client, int args) { for (int cli = 1; cli <= MaxClients; cli++) { @@ -273,7 +273,7 @@ bool IsGhost(int client) return !!GetEntProp(client, Prop_Send, "m_isGhost", 1); } -public Action Swap_Cmd(int client, int args) +Action Swap_Cmd(int client, int args) { if (args < 1) { @@ -314,7 +314,7 @@ public Action Swap_Cmd(int client, int args) return Plugin_Handled; } -public Action SwapTo_Cmd(int client, int args) +Action SwapTo_Cmd(int client, int args) { if (args < 2) { @@ -547,7 +547,7 @@ stock void FixBotCount() } } -public void OnFrame_KickBot(int userid) +void OnFrame_KickBot(int userid) { int client = GetClientOfUserId(userid); if (client > 0) KickClient(client); diff --git a/addons/sourcemod/scripting/predictable_unloader.sp b/addons/sourcemod/scripting/predictable_unloader.sp index 1291c58d4..d8f26affa 100644 --- a/addons/sourcemod/scripting/predictable_unloader.sp +++ b/addons/sourcemod/scripting/predictable_unloader.sp @@ -77,7 +77,7 @@ public void OnPluginStart() aReservedPlugins = CreateArray(PLATFORM_MAX_PATH); } -public Action UnloadPlugins(int args) +Action UnloadPlugins(int args) { char stockpluginname[64]; Handle pluginIterator = GetPluginIterator(); @@ -113,14 +113,14 @@ public Action UnloadPlugins(int args) return Plugin_Handled; } -public Action RefreshPlugins(Handle timer) +Action RefreshPlugins(Handle timer) { ServerCommand("sm plugins refresh"); return Plugin_Stop; } -public Action UnloadSelf(Handle timer) +Action UnloadSelf(Handle timer) { ServerCommand("sm plugins unload %s", sPlugin); diff --git a/addons/sourcemod/scripting/ratemonitor.sp b/addons/sourcemod/scripting/ratemonitor.sp index 0d3f91832..b44c48b9c 100644 --- a/addons/sourcemod/scripting/ratemonitor.sp +++ b/addons/sourcemod/scripting/ratemonitor.sp @@ -116,7 +116,7 @@ public void OnPluginStart() } } -public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast) { int iSize = hClientSettingsArray.Length; #if SOURCEMOD_V_MINOR > 9 @@ -136,14 +136,14 @@ public void Event_RoundStart(Event hEvent, const char[] name, bool dontBroadcast #endif } -public void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundGoesLive(Event hEvent, const char[] name, bool dontBroadcast) { //This event works great with the plugin readyup.smx (does not conflict) //This event works great in different game modes: versus, coop, scavenge and etc bIsMatchLive = true; } -public void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) +void Event_RoundEnd(Event hEvent, const char[] name, bool dontBroadcast) { bIsMatchLive = false; } @@ -153,7 +153,7 @@ public void OnMapEnd() hClientSettingsArray.Clear(); } -public void OnTeamChange(Event hEvent, const char[] name, bool dontBroadcast) +void OnTeamChange(Event hEvent, const char[] name, bool dontBroadcast) { if (hEvent.GetInt("team") != L4D2Team_Spectator) { int userid = hEvent.GetInt("userid"); @@ -164,7 +164,7 @@ public void OnTeamChange(Event hEvent, const char[] name, bool dontBroadcast) } } -public Action OnTeamChangeDelay(Handle hTimer, any userid) +Action OnTeamChangeDelay(Handle hTimer, any userid) { int client = GetClientOfUserId(userid); if (client > 0) { @@ -181,7 +181,7 @@ public void OnClientSettingsChanged(int client) } } -public Action ListRates(int client, int args) +Action ListRates(int client, int args) { ReplyToCommand(client, "\x01[RateMonitor] List of player netsettings(\x03cmd\x01/\x04upd\x01/\x05rate\x01):"); @@ -475,32 +475,32 @@ bool IsNatural(const char[] str) return true; } -public void cvarChanged_AllowedRateChanges(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_AllowedRateChanges(ConVar convar, const char[] oldValue, const char[] newValue) { iAllowedRateChanges = hCvarAllowedRateChanges.IntValue; } -public void cvarChanged_MinRate(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_MinRate(ConVar convar, const char[] oldValue, const char[] newValue) { iMinRate = hCvarMinRate.IntValue; } -public void cvarChanged_MinCmd(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_MinCmd(ConVar convar, const char[] oldValue, const char[] newValue) { iMinCmd = hCvarMinCmd.IntValue; } -public void cvarChanged_ProhibitFakePing(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_ProhibitFakePing(ConVar convar, const char[] oldValue, const char[] newValue) { bProhibitFakePing = hCvarProhibitFakePing.BoolValue; } -public void cvarChanged_ExceedAction(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_ExceedAction(ConVar convar, const char[] oldValue, const char[] newValue) { iActionUponExceed = hCvarProhibitedAction.IntValue; } -public void cvarChanged_PublicNotice(ConVar convar, const char[] oldValue, const char[] newValue) +void cvarChanged_PublicNotice(ConVar convar, const char[] oldValue, const char[] newValue) { bPublic = hCvarPublicNotice.BoolValue; } diff --git a/addons/sourcemod/scripting/si_class_announce.sp b/addons/sourcemod/scripting/si_class_announce.sp index 3cbdef947..448ee0e4e 100644 --- a/addons/sourcemod/scripting/si_class_announce.sp +++ b/addons/sourcemod/scripting/si_class_announce.sp @@ -92,7 +92,7 @@ void ProcessReadyupFooter() } } -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { g_bMessagePrinted = false; g_bRoundStarted = true; @@ -108,12 +108,12 @@ public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) } } -public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) +void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) { g_bRoundStarted = false; } -public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) { if (!g_bAllowFooter) return; @@ -130,7 +130,7 @@ public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) } } -public Action UpdateReadyUpFooter(Handle timer) +Action UpdateReadyUpFooter(Handle timer) { g_hAddFooterTimer = null; @@ -158,7 +158,7 @@ public void OnRoundIsLive() } } -public void Event_PlayerLeftStartArea(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerLeftStartArea(Event event, const char[] name, bool dontBroadcast) { // if no readyup, use this as the starting event if (!g_bMessagePrinted) { diff --git a/addons/sourcemod/scripting/si_fire_immunity.sp b/addons/sourcemod/scripting/si_fire_immunity.sp index d70b2fc2d..346d55452 100644 --- a/addons/sourcemod/scripting/si_fire_immunity.sp +++ b/addons/sourcemod/scripting/si_fire_immunity.sp @@ -79,7 +79,7 @@ public void OnPluginStart() HookEvent("round_end", EventReset, EventHookMode_PostNoCopy); } -public void EventReset(Event hEvent, const char[] eName, bool dontBroadcast) +void EventReset(Event hEvent, const char[] eName, bool dontBroadcast) { for (int i = 1; i <= MaxClients; i++) { g_fWaitTime[i] = 0.0; @@ -128,7 +128,7 @@ public void EventReset(Event hEvent, const char[] eName, bool dontBroadcast) * Event_PlayerHurt: A1m`, attacker: 2 (entityclassname player), attackerentid: 0 (entityclassname player) * Event string weapon: entityflame, type: 268435464 */ -public void Event_PlayerHurt(Event hEvent, const char[] eName, bool dontBroadcast) +void Event_PlayerHurt(Event hEvent, const char[] eName, bool dontBroadcast) { /* * This event 'player_hurt' is called very often @@ -190,7 +190,7 @@ void ExtinguishType(int iClient, int iUserID, int iDamage) } } -public Action ExtinguishDelay(Handle hTimer, any iUserID) +Action ExtinguishDelay(Handle hTimer, any iUserID) { int iClient = GetClientOfUserId(iUserID); if (iClient > 0 && IsLiveInfected(iClient)) { diff --git a/addons/sourcemod/scripting/simple_witch_bonus.sp b/addons/sourcemod/scripting/simple_witch_bonus.sp index 4681d517a..66fc16630 100644 --- a/addons/sourcemod/scripting/simple_witch_bonus.sp +++ b/addons/sourcemod/scripting/simple_witch_bonus.sp @@ -86,7 +86,7 @@ public OnEntityDestroyed(entity) } // witch tracking -public Action: Event_WitchSpawned(Handle:event, const String:name[], bool:dontBroadcast) +Action: Event_WitchSpawned(Handle:event, const String:name[], bool:dontBroadcast) { new witch = GetEventInt(event, "witchid"); decl String:witch_key[10]; @@ -95,7 +95,7 @@ public Action: Event_WitchSpawned(Handle:event, const String:name[], bool:dontBr } // kill tracking -public Action: Event_WitchKilled(Handle:event, const String:name[], bool:dontBroadcast) +Action: Event_WitchKilled(Handle:event, const String:name[], bool:dontBroadcast) { new witch = GetEventInt(event, "witchid"); new attacker = GetClientOfUserId( GetEventInt(event, "userid") ); @@ -118,7 +118,7 @@ public Action: Event_WitchKilled(Handle:event, const String:name[], bool:dontBro } // track witch doing damage to survivors -public Action: OnTakeDamageByWitch(victim, &attacker, &inflictor, &Float:damage, &damagetype) +Action: OnTakeDamageByWitch(victim, &attacker, &inflictor, &Float:damage, &damagetype) { if (IS_VALID_SURVIVOR(victim) && damage > 0.0) { if (IsWitch(attacker)) { diff --git a/addons/sourcemod/scripting/slots_vote.sp b/addons/sourcemod/scripting/slots_vote.sp index 464370543..c33372e66 100644 --- a/addons/sourcemod/scripting/slots_vote.sp +++ b/addons/sourcemod/scripting/slots_vote.sp @@ -30,7 +30,7 @@ public void OnPluginStart() HookConVarChange(hMaxSlots, CVarChanged); } -public Action SlotsRequest(int client, int args) +Action SlotsRequest(int client, int args) { if (client == 0) { @@ -113,7 +113,7 @@ bool StartSlotVote(int client, char[] Slots) return false; } -public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) +void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, int param2) { switch (action) { @@ -129,7 +129,7 @@ public void VoteActionHandler(Handle vote, BuiltinVoteAction action, int param1, } } -public void SlotVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void SlotVoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { for (int i = 0; i < num_items; i++) { @@ -150,7 +150,7 @@ public void SlotVoteResultHandler(Handle vote, int num_votes, int num_clients, c DisplayBuiltinVoteFail(vote, BuiltinVoteFail_Loses); } -public void CVarChanged(Handle cvar, char[] oldValue, char[] newValue) +void CVarChanged(Handle cvar, char[] oldValue, char[] newValue) { MaxSlots = GetConVarInt(hMaxSlots); } \ No newline at end of file diff --git a/addons/sourcemod/scripting/spechud.sp b/addons/sourcemod/scripting/spechud.sp index 8287f4aab..13d833ef0 100644 --- a/addons/sourcemod/scripting/spechud.sp +++ b/addons/sourcemod/scripting/spechud.sp @@ -217,12 +217,12 @@ void LoadPluginTranslations() // ====================================================================== // Dependency Monitor // ====================================================================== -public void GameConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void GameConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { GetGameCvars(); } -public void ServerCvarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +void ServerCvarChanged(ConVar convar, const char[] oldValue, const char[] newValue) { FillServerNamer(); } @@ -281,7 +281,7 @@ void InitTankSpawnSchemeTrie() BuildCustomTrieEntries(); } -public Action SetMapFirstTankSpawningScheme(int args) +Action SetMapFirstTankSpawningScheme(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); @@ -290,7 +290,7 @@ public Action SetMapFirstTankSpawningScheme(int args) return Plugin_Handled; } -public Action SetMapSecondTankSpawningScheme(int args) +Action SetMapSecondTankSpawningScheme(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); @@ -298,7 +298,7 @@ public Action SetMapSecondTankSpawningScheme(int args) return Plugin_Handled; } -public Action SetFinaleExceptionMap(int args) +Action SetFinaleExceptionMap(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); @@ -318,7 +318,6 @@ public void OnClientDisconnect(int client) } public void OnMapStart() { bRoundLive = false; } -public void OnMapEnd() {} public void OnRoundIsLive() { FillReadyConfig(); @@ -388,17 +387,17 @@ public void OnRoundIsLive() // ====================================================================== // Events // ====================================================================== -public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) +void Event_RoundStart(Event event, const char[] name, bool dontBroadcast) { bRoundLive = false; } -public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) +void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) { bRoundLive = false; } -public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if (!client || !IsInfected(client)) return; @@ -410,12 +409,12 @@ public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast } } -public void Event_WitchDeath(Event event, const char[] name, bool dontBroadcast) +void Event_WitchDeath(Event event, const char[] name, bool dontBroadcast) { if (iWitchCount > 0) iWitchCount--; } -public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) +void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if (!client) return; @@ -436,7 +435,7 @@ public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast) // ====================================================================== // HUD Command Callbacks // ====================================================================== -public Action ToggleSpecHudCmd(int client, int args) +Action ToggleSpecHudCmd(int client, int args) { if (GetClientTeam(client) != L4D2Team_Spectator) return Plugin_Handled; @@ -447,7 +446,7 @@ public Action ToggleSpecHudCmd(int client, int args) return Plugin_Handled; } -public Action ToggleTankHudCmd(int client, int args) +Action ToggleTankHudCmd(int client, int args) { int team = GetClientTeam(client); if (team == L4D2Team_Survivor) @@ -464,7 +463,7 @@ public Action ToggleTankHudCmd(int client, int args) // ====================================================================== // HUD Handle // ====================================================================== -public Action HudDrawTimer(Handle hTimer) +Action HudDrawTimer(Handle hTimer) { if (IsInReady() || IsInPause()) return Plugin_Continue; @@ -560,8 +559,8 @@ public Action HudDrawTimer(Handle hTimer) return Plugin_Continue; } -public int DummySpecHudHandler(Menu hMenu, MenuAction action, int param1, int param2) { return 1; } -public int DummyTankHudHandler(Menu hMenu, MenuAction action, int param1, int param2) { return 1; } +int DummySpecHudHandler(Menu hMenu, MenuAction action, int param1, int param2) { return 1; } +int DummyTankHudHandler(Menu hMenu, MenuAction action, int param1, int param2) { return 1; } /**********************************************************************************************/ diff --git a/addons/sourcemod/scripting/specrates.sp b/addons/sourcemod/scripting/specrates.sp index 4a7d7258d..1327f1d9c 100644 --- a/addons/sourcemod/scripting/specrates.sp +++ b/addons/sourcemod/scripting/specrates.sp @@ -97,13 +97,13 @@ public OnClientPutInServer(client) fLastAdjusted[client] = 0.0; } -public OnTeamChange(Handle:event, String:name[], bool:dontBroadcast) +void OnTeamChange(Handle:event, String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); CreateTimer(10.0, TimerAdjustRates, client, TIMER_FLAG_NO_MAPCHANGE); } -public Action:TimerAdjustRates(Handle:timer, any:client) +Action:TimerAdjustRates(Handle:timer, any:client) { AdjustRates(client); return Plugin_Handled; diff --git a/addons/sourcemod/scripting/starting_items.sp b/addons/sourcemod/scripting/starting_items.sp index aa6fbb9b8..c52b729fe 100644 --- a/addons/sourcemod/scripting/starting_items.sp +++ b/addons/sourcemod/scripting/starting_items.sp @@ -81,7 +81,7 @@ public void OnRoundIsLive() DetermineItems(); } -public void PlayerLeftStartArea(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void PlayerLeftStartArea(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bReadyUpAvailable) { DetermineItems(); @@ -170,7 +170,7 @@ void GivePlayerWeaponByName(int iClient, const char[] sWeaponName) } #if DEBUG -public Action Cmd_GiveStartingItems(int iClient, int iArgs) +Action Cmd_GiveStartingItems(int iClient, int iArgs) { DetermineItems(); PrintToChat(iClient, "DetermineItems()"); diff --git a/addons/sourcemod/scripting/survivor_mvp.sp b/addons/sourcemod/scripting/survivor_mvp.sp index ce4d5a277..84ce573b5 100644 --- a/addons/sourcemod/scripting/survivor_mvp.sp +++ b/addons/sourcemod/scripting/survivor_mvp.sp @@ -146,7 +146,7 @@ new iRoundNumber; new bInRound; new bPlayerLeftStartArea; // used for tracking FF when RUP enabled -new String: sTmpString[MAX_NAME_LENGTH]; // just used because I'm not going to break my head over why string assignment parameter passing doesn't work +stock char sTmpString[MAX_NAME_LENGTH]; // just used because I'm not going to break my head over why string assignment parameter passing doesn't work /* * Natives @@ -167,14 +167,14 @@ public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max) } // simply return current round MVP client -public Native_GetMVP(Handle:plugin, numParams) +int Native_GetMVP(Handle:plugin, numParams) { new client = findMVPSI(); return _:client; } // return damage percent of client -public Native_GetMVPDmgPercent(Handle:plugin, numParams) +int Native_GetMVPDmgPercent(Handle:plugin, numParams) { new client = GetNativeCell(1); new Float: dmgprc = client && iTotalDamageAll > 0 ? (float(iDidDamageAll[client]) / float(iTotalDamageAll)) * 100 : 0.0; @@ -182,7 +182,7 @@ public Native_GetMVPDmgPercent(Handle:plugin, numParams) } // return damage of client -public Native_GetMVPDmgCount(Handle:plugin, numParams) +int Native_GetMVPDmgCount(Handle:plugin, numParams) { new client = GetNativeCell(1); new dmg = client && iTotalDamageAll > 0 ? iDidDamageAll[client] : 0; @@ -190,7 +190,7 @@ public Native_GetMVPDmgCount(Handle:plugin, numParams) } // return SI kills of client -public Native_GetMVPKills(Handle:plugin, numParams) +int Native_GetMVPKills(Handle:plugin, numParams) { new client = GetNativeCell(1); new dmg = client && iTotalKills > 0 ? iGotKills[client] : 0; @@ -198,14 +198,14 @@ public Native_GetMVPKills(Handle:plugin, numParams) } // simply return current round MVP client (Common) -public Native_GetMVPCI(Handle:plugin, numParams) +int Native_GetMVPCI(Handle:plugin, numParams) { new client = findMVPCommon(); return _:client; } // return common kills for client -public Native_GetMVPCIKills(Handle:plugin, numParams) +int Native_GetMVPCIKills(Handle:plugin, numParams) { new client = GetNativeCell(1); new dmg = client && iTotalCommon > 0 ? iGotCommon[client] : 0; @@ -213,7 +213,7 @@ public Native_GetMVPCIKills(Handle:plugin, numParams) } // return CI percent of client -public Native_GetMVPCIPercent(Handle:plugin, numParams) +int Native_GetMVPCIPercent(Handle:plugin, numParams) { new client = GetNativeCell(1); new Float: dmgprc = client && iTotalCommon > 0 ? (float(iGotCommon[client]) / float(iTotalCommon)) * 100 : 0.0; @@ -331,17 +331,20 @@ public OnClientPutInServer(client) * ============== */ -public ConVarChange_CountTankDamage(Handle:cvar, const String:oldValue[], const String:newValue[]) { +void ConVarChange_CountTankDamage(Handle:cvar, const String:oldValue[], const String:newValue[]) { bCountTankDamage = StringToInt(newValue) != 0; } -public ConVarChange_CountWitchDamage(Handle:cvar, const String:oldValue[], const String:newValue[]) { + +void ConVarChange_CountWitchDamage(Handle:cvar, const String:oldValue[], const String:newValue[]) { bCountWitchDamage = StringToInt(newValue) != 0; } -public ConVarChange_TrackFF(Handle:cvar, const String:oldValue[], const String:newValue[]) { + +void ConVarChange_TrackFF(Handle:cvar, const String:oldValue[], const String:newValue[]) { //if (StringToInt(newValue) == 0) { bTrackFF = false; } else { bTrackFF = true; } // for now, disable FF tracking toggle (always on) } -public ConVarChange_BrevityFlags(Handle:cvar, const String:oldValue[], const String:newValue[]) { + +void ConVarChange_BrevityFlags(Handle:cvar, const String:oldValue[], const String:newValue[]) { iBrevityFlags = StringToInt(newValue); if (!(iBrevityFlags & BREV_FF)) { bTrackFF = true; @@ -353,7 +356,7 @@ public ConVarChange_BrevityFlags(Handle:cvar, const String:oldValue[], const Str * ========================== */ -public Action:PlayerLeftStartArea(Handle:event, const String:name[], bool:dontBroadcast) +void PlayerLeftStartArea(Handle:event, const String:name[], bool:dontBroadcast) { // if RUP active, now we can start tracking FF bPlayerLeftStartArea = true; @@ -370,7 +373,7 @@ public OnMapEnd() bInRound = false; } -public void ScavRoundStart(Handle:event, const String:name[], bool:dontBroadcast) +void ScavRoundStart(Handle:event, const String:name[], bool:dontBroadcast) { // clear mvp stats new i, maxplayers = MaxClients; @@ -413,7 +416,7 @@ public void ScavRoundStart(Handle:event, const String:name[], bool:dontBroadcast tankSpawned = false; } -public RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) +void RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) { bPlayerLeftStartArea = false; bRUPLive = false; @@ -463,7 +466,7 @@ public RoundStart_Event(Handle:event, const String:name[], bool:dontBroadcast) tankSpawned = false; } -public FinaleEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) +void FinaleEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) { // Co-op modes. if (!L4D_HasPlayerControlledZombies()) @@ -481,8 +484,7 @@ public FinaleEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) tankSpawned = false; } - -public RoundEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) +void RoundEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) { // Co-op modes. if (!L4D_HasPlayerControlledZombies()) @@ -516,7 +518,7 @@ public RoundEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) * ============== */ -public Action:Say_Cmd(client, args) +Action Say_Cmd(client, args) { if (!client) { return Plugin_Continue; } @@ -528,7 +530,7 @@ public Action:Say_Cmd(client, args) return Plugin_Continue; } -public Action:SurvivorMVP_Cmd(client, args) +Action SurvivorMVP_Cmd(client, args) { decl String:printBuffer[4096]; new String:strLines[8][192]; @@ -546,14 +548,17 @@ public Action:SurvivorMVP_Cmd(client, args) } } PrintLoserz(true, client); + + return Plugin_Handled; } -public Action:ShowMVPStats_Cmd(client, args) +Action ShowMVPStats_Cmd(client, args) { PrintLoserz(true, client); + return Plugin_Handled; } -public Action:delayedMVPPrint(Handle:timer) +Action:delayedMVPPrint(Handle:timer) { decl String:printBuffer[4096]; new String:strLines[8][192]; @@ -573,12 +578,12 @@ public Action:delayedMVPPrint(Handle:timer) CreateTimer(0.1, PrintLosers); } -public Action:PrintLosers(Handle:timer) +Action:PrintLosers(Handle:timer) { PrintLoserz(false, -1); } -stock PrintLoserz(bool:bSolo, client) +void PrintLoserz(bool:bSolo, client) { decl String:tmpBuffer[512]; // also find the three non-mvp survivors and tell them they sucked @@ -702,7 +707,7 @@ public OnEntityDestroyed(entity) /** * When an infected uses their ability */ -public Action:abilityUseEvent(Handle:event, const String:name[], bool:dontBroadcast) +void abilityUseEvent(Handle:event, const String:name[], bool:dontBroadcast) { decl String:ability[32]; GetEventString(event, "ability", ability, 32); @@ -716,7 +721,7 @@ public Action:abilityUseEvent(Handle:event, const String:name[], bool:dontBroadc /** * Track pill usage */ -public pillsUsedEvent(Handle:event, const String:name[], bool:dontBroadcast) +void pillsUsedEvent(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if (client == 0 || ! IsClientInGame(client)) { @@ -729,7 +734,7 @@ public pillsUsedEvent(Handle:event, const String:name[], bool:dontBroadcast) /** * Track boomer pops */ -public boomerExploded(Handle:event, const String:name[], bool:dontBroadcast) +void boomerExploded(Handle:event, const String:name[], bool:dontBroadcast) { // We only want to track pops where the boomer didn't bile anyone new bool:biled = GetEventBool(event, "splashedbile"); @@ -746,7 +751,7 @@ public boomerExploded(Handle:event, const String:name[], bool:dontBroadcast) /** * Track when someone gets charged (end of charge for level, or if someone shoots you off etc.) */ -public chargerCarryEnd(Handle:event, const String:name[], bool:dontBroadcast) +void chargerCarryEnd(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "victim")); if (client == 0 || ! IsClientInGame(client)) { @@ -764,7 +769,7 @@ public chargerCarryEnd(Handle:event, const String:name[], bool:dontBroadcast) /** * Track when someone gets jockeyed. */ -public jockeyRide(Handle:event, const String:name[], bool:dontBroadcast) +void jockeyRide(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "victim")); if (client == 0 || ! IsClientInGame(client)) { @@ -782,7 +787,7 @@ public jockeyRide(Handle:event, const String:name[], bool:dontBroadcast) /** * Track when someone gets huntered. */ -public hunterLunged(Handle:event, const String:name[], bool:dontBroadcast) +void hunterLunged(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "victim")); if (client == 0 || ! IsClientInGame(client)) { @@ -800,7 +805,7 @@ public hunterLunged(Handle:event, const String:name[], bool:dontBroadcast) /** * Track when someone gets smoked (we track when they start getting smoked, because anyone can get smoked) */ -public smokerChoke(Handle:event, const String:name[], bool:dontBroadcast) +void smokerChoke(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "victim")); if (client == 0 || ! IsClientInGame(client)) { @@ -818,14 +823,14 @@ public smokerChoke(Handle:event, const String:name[], bool:dontBroadcast) /** * When the tank spawns */ -public tankSpawn(Handle:event, const String:name[], bool:dontBroadcast) { +void tankSpawn(Handle:event, const String:name[], bool:dontBroadcast) { tankSpawned = true; } /** * When the tank is killed */ -public tankKilled(Handle:event, const String:name[], bool:dontBroadcast) { +void tankKilled(Handle:event, const String:name[], bool:dontBroadcast) { tankSpawned = false; } @@ -834,7 +839,7 @@ public tankKilled(Handle:event, const String:name[], bool:dontBroadcast) { * ================== */ -public PlayerHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) +void PlayerHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) { new zombieClass = 0; @@ -919,7 +924,7 @@ public PlayerHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) * When the infected are hurt (i.e. when a survivor hurts an SI) * We want to use this to track damage done to the witch. */ -public InfectedHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) +void InfectedHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) { // catch damage done to witch new victimEntId = GetEventInt(event, "entityid"); @@ -947,7 +952,7 @@ public InfectedHurt_Event(Handle:event, const String:name[], bool:dontBroadcast) } } -public PlayerDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) +void PlayerDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) { // Get the victim details new zombieClass = 0; @@ -987,11 +992,11 @@ public PlayerDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) } // Was the zombie a hunter? -public bool:isHunter(zombieClass) { +/*bool:isHunter(zombieClass) { return zombieClass == ZC_HUNTER; -} +}*/ -public InfectedDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) +void InfectedDeath_Event(Handle:event, const String:name[], bool:dontBroadcast) { new attackerId = GetEventInt(event, "attacker"); new attacker = GetClientOfUserId(attackerId); @@ -1251,9 +1256,10 @@ stock getSurvivor(exclude[4]) return 0; } -public stripUnicode(String:testString[MAX_NAME_LENGTH]) +/* //survivor_mvp.sp(1258) : error 017: undefined symbol "MAXLENGTH" +void stripUnicode(String:testString[MAX_NAME_LENGTH]) { - new const maxlength = MAX_NAME_LENGTH; + new const maxlength = MAXLENGTH; //strcopy(testString, maxlength, sTmpString); sTmpString = testString; @@ -1302,7 +1308,7 @@ public stripUnicode(String:testString[MAX_NAME_LENGTH]) } } } -} +}*/ /* stock bool:IsCommonInfected(iEntity) diff --git a/addons/sourcemod/scripting/sv_consistency_fix.sp b/addons/sourcemod/scripting/sv_consistency_fix.sp index 69646a286..fc455179b 100644 --- a/addons/sourcemod/scripting/sv_consistency_fix.sp +++ b/addons/sourcemod/scripting/sv_consistency_fix.sp @@ -71,7 +71,7 @@ void ToggleMessage() } } -public void Cvar_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +void Cvar_Changed(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { ToggleMessage(); } @@ -81,13 +81,13 @@ public void OnClientConnected(int client) ClientCommand(client, "cl_consistencycheck"); } -public void Event_PlayerConnectFull(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void Event_PlayerConnectFull(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iUserId = hEvent.GetInt("userid"); CreateTimer(0.2, PrintWhitelist, iUserId, TIMER_FLAG_NO_MAPCHANGE); } -public Action PrintWhitelist(Handle hTimer, any iUserId) +Action PrintWhitelist(Handle hTimer, any iUserId) { int iClient = GetClientOfUserId(iUserId); if (iClient > 0) { @@ -111,7 +111,7 @@ public Action PrintWhitelist(Handle hTimer, any iUserId) return Plugin_Stop; } -public Action Cmd_ConsistencyCheck(int iClient, int iArgs) +Action Cmd_ConsistencyCheck(int iClient, int iArgs) { if (iArgs < 1) { for (int i = 1; i <= MaxClients; i++) { diff --git a/addons/sourcemod/scripting/teamflip.sp b/addons/sourcemod/scripting/teamflip.sp index 8cdc09155..b42f6415f 100644 --- a/addons/sourcemod/scripting/teamflip.sp +++ b/addons/sourcemod/scripting/teamflip.sp @@ -33,7 +33,7 @@ public OnPluginStart() RegConsoleCmd("sm_tf", Command_teamflip); } -public Action:Command_teamflip(client, args) +Action:Command_teamflip(client, args) { current_timeC = GetTime(); diff --git a/addons/sourcemod/scripting/temphealthfix.sp b/addons/sourcemod/scripting/temphealthfix.sp index e2cac933f..8cd7b0167 100644 --- a/addons/sourcemod/scripting/temphealthfix.sp +++ b/addons/sourcemod/scripting/temphealthfix.sp @@ -25,7 +25,7 @@ public void OnPluginStart() HookEvent("bot_player_replace", PlayerChange_Event); } -public void Incap_Event(Event event, const char[] name, bool dontBroadcast) +void Incap_Event(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); @@ -41,7 +41,7 @@ public void Incap_Event(Event event, const char[] name, bool dontBroadcast) SetEntPropFloat(client, Prop_Send, "m_healthBuffer", 0.0); } -public void Revive_Event(Event event, const char[] name, bool dontBroadcast) +void Revive_Event(Event event, const char[] name, bool dontBroadcast) { if (event.GetBool("ledge_hang")) { @@ -53,7 +53,7 @@ public void Revive_Event(Event event, const char[] name, bool dontBroadcast) } } -public void PlayerChange_Event(Event event, const char[] name, bool dontBroadcast) +void PlayerChange_Event(Event event, const char[] name, bool dontBroadcast) { int bot = GetClientOfUserId(event.GetInt("bot")) int player = GetClientOfUserId(event.GetInt("player")) diff --git a/addons/sourcemod/scripting/visualise_impacts.sp b/addons/sourcemod/scripting/visualise_impacts.sp index fd2ea0d6d..7e0d2728d 100644 --- a/addons/sourcemod/scripting/visualise_impacts.sp +++ b/addons/sourcemod/scripting/visualise_impacts.sp @@ -47,13 +47,13 @@ public void OnMapStart() } } -public void EventRoundReset(Event hEvent, const char[] name, bool dontBroadcast) +void EventRoundReset(Event hEvent, const char[] name, bool dontBroadcast) { decalThisTick = 0; iLastTick = 0; } -public void BulletImpactEvent(Event hEvent, const char[] name, bool dontBroadcast) +void BulletImpactEvent(Event hEvent, const char[] name, bool dontBroadcast) { float pos[3]; int userid = hEvent.GetInt("userid"); @@ -77,7 +77,7 @@ public void BulletImpactEvent(Event hEvent, const char[] name, bool dontBroadcas CreateTimer(++decalThisTick * GetTickInterval(), TimerDelayShowDecal, hStack, TIMER_FLAG_NO_MAPCHANGE | TIMER_HNDL_CLOSE); } -public Action TimerDelayShowDecal(Handle hTimer, ArrayStack hStack) +Action TimerDelayShowDecal(Handle hTimer, ArrayStack hStack) { if (!hStack.Empty) { int client = GetClientOfUserId(hStack.Pop()); diff --git a/addons/sourcemod/scripting/weapon_loadout_vote.sp b/addons/sourcemod/scripting/weapon_loadout_vote.sp index 5af36b6c7..d524b1381 100644 --- a/addons/sourcemod/scripting/weapon_loadout_vote.sp +++ b/addons/sourcemod/scripting/weapon_loadout_vote.sp @@ -103,7 +103,7 @@ void InitMenu() g_hMenu.ExitButton = true; } -public void Event_PlayerTeam(Event hEvent, char[] sEventName , bool bDontBroadcast) +void Event_PlayerTeam(Event hEvent, char[] sEventName , bool bDontBroadcast) { // Mode not picked, don't care. if (g_iCurrentMode == eUndecided) { @@ -125,7 +125,7 @@ public void Event_PlayerTeam(Event hEvent, char[] sEventName , bool bDontBroadca CreateTimer(0.2, Timer_ChangeTeamDelay, iUserId, TIMER_FLAG_NO_MAPCHANGE); } -public Action Timer_ChangeTeamDelay(Handle hTimer, any iUserId) +Action Timer_ChangeTeamDelay(Handle hTimer, any iUserId) { int iPlayer = GetClientOfUserId(iUserId); if (iPlayer > 0 && GetClientTeam(iPlayer) == L4D2Team_Survivor) { @@ -135,7 +135,7 @@ public Action Timer_ChangeTeamDelay(Handle hTimer, any iUserId) return Plugin_Stop; } -public void Event_RoundStart(Event hEvent, char[] sEventName, bool bDontBroadcast) +void Event_RoundStart(Event hEvent, char[] sEventName, bool bDontBroadcast) { CreateTimer(0.5, Timer_ClearMap, _, TIMER_FLAG_NO_MAPCHANGE); // Clear all Weapons on this delayed timer. @@ -149,7 +149,7 @@ public void Event_RoundStart(Event hEvent, char[] sEventName, bool bDontBroadcas CreateTimer(2.0, Timer_GiveWeapons, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action Cmd_VoteMode(int iClient, int iArgs) +Action Cmd_VoteMode(int iClient, int iArgs) { // Don't care about non-loaded players or Spectators. if (iClient == 0 || GetClientTeam(iClient) < L4D2Team_Survivor) { @@ -182,7 +182,7 @@ public Action Cmd_VoteMode(int iClient, int iArgs) return Plugin_Handled; } -public Action Cmd_ForceVoteMode(int iClient, int iArgs) +Action Cmd_ForceVoteMode(int iClient, int iArgs) { if (iClient == 0) { return Plugin_Handled; @@ -211,7 +211,7 @@ void ShowMenu(int iClient) g_hMenu.Display(iClient, MENU_TIME_FOREVER); } -public int Menu_VoteMenuHandler(Menu hMenu, MenuAction iAction, int iClient, int iIndex) +int Menu_VoteMenuHandler(Menu hMenu, MenuAction iAction, int iClient, int iIndex) { switch (iAction) { case MenuAction_Select: { @@ -259,7 +259,7 @@ public int Menu_VoteMenuHandler(Menu hMenu, MenuAction iAction, int iClient, int return 0; } -public void BV_VoteActionHandler(Handle hVote, BuiltinVoteAction iAction, int iParam1, int iParam2) +void BV_VoteActionHandler(Handle hVote, BuiltinVoteAction iAction, int iParam1, int iParam2) { switch (iAction) { case BuiltinVoteAction_End: { @@ -272,7 +272,7 @@ public void BV_VoteActionHandler(Handle hVote, BuiltinVoteAction iAction, int iP } } -public void BV_VoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) +void BV_VoteResultHandler(Handle vote, int num_votes, int num_clients, const int[][] client_info, int num_items, const int[][] item_info) { ReturnReadyUpPanel(); @@ -302,7 +302,7 @@ public void BV_VoteResultHandler(Handle vote, int num_votes, int num_clients, co return; } -public Action Timer_ClearMap(Handle hTimer) +Action Timer_ClearMap(Handle hTimer) { char sEntityName[MAX_ENTITY_NAME_LENGTH]; int iOwner = -1, iEntity = INVALID_ENT_REFERENCE; @@ -329,7 +329,7 @@ public Action Timer_ClearMap(Handle hTimer) return Plugin_Stop; } -public Action Timer_GiveWeapons(Handle hTimer) { +Action Timer_GiveWeapons(Handle hTimer) { GiveSurvivorsWeapons(); return Plugin_Stop; } @@ -414,7 +414,7 @@ void GiveAndRemovePlayerWeapon(int iClient, const char[] sWeaponName, bool bOnly #endif } -public Action Timer_InformPlayers(Handle hTimer) +Action Timer_InformPlayers(Handle hTimer) { static int iNumPrinted = 0; diff --git a/addons/sourcemod/scripting/weapon_spawn_duplicate_fix.sp b/addons/sourcemod/scripting/weapon_spawn_duplicate_fix.sp index d9a1e77bb..cad943e81 100644 --- a/addons/sourcemod/scripting/weapon_spawn_duplicate_fix.sp +++ b/addons/sourcemod/scripting/weapon_spawn_duplicate_fix.sp @@ -14,7 +14,7 @@ Handle g_hCWeaponSpawn_GiveItem = null; ArrayStack g_hItems = null; -public MRESReturn Handler_CWeaponSpawn_GiveItem(int spawner, Handle hReturn) +MRESReturn Handler_CWeaponSpawn_GiveItem(int spawner, Handle hReturn) { if (GetEntProp(spawner, Prop_Data, "m_itemCount") == 0) { DHookSetReturn(hReturn, false); diff --git a/addons/sourcemod/scripting/witch_and_tankifier.sp b/addons/sourcemod/scripting/witch_and_tankifier.sp index f8ac54260..26f5c5db4 100644 --- a/addons/sourcemod/scripting/witch_and_tankifier.sp +++ b/addons/sourcemod/scripting/witch_and_tankifier.sp @@ -127,11 +127,11 @@ public void OnMapStart() { // Flow Handling // ====================================== -public void RoundStartEvent(Event event, const char[] name, bool dontBroadcast) { +void RoundStartEvent(Event event, const char[] name, bool dontBroadcast) { CreateTimer(0.5, AdjustBossFlow, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action AdjustBossFlow(Handle timer) { +Action AdjustBossFlow(Handle timer) { if (InSecondHalfOfRound()) { return Plugin_Stop; } @@ -405,7 +405,7 @@ int GetRandomIntervalNum(ArrayList aList) { // Boss Spawn Scheme Commands // ====================================== -public Action StaticTank_Command(int args) { +Action StaticTank_Command(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); StrToLower(mapname); @@ -416,7 +416,7 @@ public Action StaticTank_Command(int args) { return Plugin_Handled; } -public Action StaticWitch_Command(int args) { +Action StaticWitch_Command(int args) { char mapname[64]; GetCmdArg(1, mapname, sizeof(mapname)); StrToLower(mapname); @@ -427,7 +427,7 @@ public Action StaticWitch_Command(int args) { return Plugin_Handled; } -public Action Reset_Command(int args) { +Action Reset_Command(int args) { hStaticTankMaps.Clear(); hStaticWitchMaps.Clear(); return Plugin_Handled; @@ -437,19 +437,19 @@ public Action Reset_Command(int args) { // Debug Commands // ====================================== -public Action Info_Cmd(int client, int args) { +Action Info_Cmd(int client, int args) { PrintDebugInfoDump(); return Plugin_Handled; } #if DEBUG -public Action Test_Cmd(int client, int args) { +Action Test_Cmd(int client, int args) { PrintDebug("[Test_Cmd] Starting AdjustBossFlow timer..."); CreateTimer(0.5, AdjustBossFlow, _, TIMER_FLAG_NO_MAPCHANGE); return Plugin_Handled; } -public Action Profiler_Cmd(int client, int args) { +Action Profiler_Cmd(int client, int args) { if (args != 1) { ReplyToCommand(client, "[SM] Usage: sm_tank_witch_debug_profiler "); return Plugin_Handled; @@ -484,7 +484,7 @@ public Action Profiler_Cmd(int client, int args) { // Natives // ====================================== -public int Native_IsStaticTankMap(Handle plugin, int numParams) { +int Native_IsStaticTankMap(Handle plugin, int numParams) { int bytes = 0; char mapname[64]; @@ -498,7 +498,7 @@ public int Native_IsStaticTankMap(Handle plugin, int numParams) { } } -public int Native_IsStaticWitchMap(Handle plugin, int numParams) { +int Native_IsStaticWitchMap(Handle plugin, int numParams) { int bytes = 0; char mapname[64]; @@ -512,12 +512,12 @@ public int Native_IsStaticWitchMap(Handle plugin, int numParams) { } } -public int Native_IsTankPercentValid(Handle plugin, int numParams) { +int Native_IsTankPercentValid(Handle plugin, int numParams) { int flow = GetNativeCell(1); return IsTankPercentValid(flow); } -public int Native_IsWitchPercentValid(Handle plugin, int numParams) { +int Native_IsWitchPercentValid(Handle plugin, int numParams) { int flow = GetNativeCell(1); bool ignoreBlock = GetNativeCell(2); @@ -543,7 +543,7 @@ public int Native_IsWitchPercentValid(Handle plugin, int numParams) { } } -public int Native_IsWitchPercentBlockedForTank(Handle plugin, int numParams) { +int Native_IsWitchPercentBlockedForTank(Handle plugin, int numParams) { int interval[2]; if (GetTankAvoidInterval(interval) && IsValidInterval(interval)) { int flow = GetNativeCell(1); @@ -552,7 +552,7 @@ public int Native_IsWitchPercentBlockedForTank(Handle plugin, int numParams) { return false; } -public int Native_SetTankPercent(Handle plugin, int numParams) { +int Native_SetTankPercent(Handle plugin, int numParams) { int flow = GetNativeCell(1); if (!IsTankPercentValid(flow)) return false; DynamicAdjustWitchFlow(flow); @@ -560,7 +560,7 @@ public int Native_SetTankPercent(Handle plugin, int numParams) { return true; } -public int Native_SetWitchPercent(Handle plugin, int numParams) { +int Native_SetWitchPercent(Handle plugin, int numParams) { int flow = GetNativeCell(1); if (!IsWitchPercentValid(flow)) return false; SetWitchPercent(flow); diff --git a/addons/sourcemod/translations/es/match_vote.phrases.txt b/addons/sourcemod/translations/es/match_vote.phrases.txt index e5eae5c6e..13669a2bf 100644 --- a/addons/sourcemod/translations/es/match_vote.phrases.txt +++ b/addons/sourcemod/translations/es/match_vote.phrases.txt @@ -1,5 +1,9 @@ "Phrases" { + "Tag" + { + "es" "[{olive}!{default}]" + } "Disabled" { "es" "El complemento esta {red}Desactivado{default}" diff --git a/addons/sourcemod/translations/es/readyup.phrases.txt b/addons/sourcemod/translations/es/readyup.phrases.txt new file mode 100644 index 000000000..47ed34a2f --- /dev/null +++ b/addons/sourcemod/translations/es/readyup.phrases.txt @@ -0,0 +1,108 @@ +"Phrases" +{ +// The following uses bracket style color tags (see colors.inc) + "PanelHide" + { + "es" "[{olive}Readyup{default}] El panel esta ahora {red}apagado{default}" + } + + "PanelShow" + { + "es" "[{olive}Readyup{default}] El panel esta ahora {blue}encendido{default}" + } + + "ForceStartAdmin" + { + "#format" "{1:N}" + "es" "[{green}!{default}] {blue}El inicio del juego {default}es {green}forzado {default}por {blue}Admin {default}({olive}{1}{default})" + } + + "VoteInProgress" + { + "es" "[{olive}Readyup{default}] Hay {olive}una votacion {green}en progreso{default}." + } + + "VoteDelay" + { + "#format" "{1:d}" + "es" "[{olive}Readyup{default}] Espera {blue}{1}s {default}para llamar a otra votacion." + } + + "Player marked unready" + { + "#format" "{1:N}" + "es" "{default}[{green}!{default}] {green}¡Cuenta regresiva cancelada! {default}({teamcolor}{1} {green}marcado como no listo{default})" + } + + "Player switched team" + { + "#format" "{1:N}" + "es" "{default}[{green}!{default}] {green}¡Cuenta regresiva cancelada! {default}({teamcolor}{1} {olive}cambio de equipo{default})" + } + + "Player disconnected" + { + "#format" "{1:N}" + "es" "{default}[{green}!{default}] {green}¡Cuenta regresiva cancelada! {default}({teamcolor}{1} {green}desconectado{default})" + } + + "Admin aborted" + { + "#format" "{1:N}" + "es" "{default}[{green}!{default}] {green}¡Inicio forzado cancelado! {default}({olive}{1} {green}emitido{default})" + } + + +// The following are not allowed to use any color tag + "HintReady" + { + "es" "Estas listo.\nEscribe !unready\nPresiona F2 para no estar listo." + } + + "HintUnready" + { + "es" "No estas listo.\nEscribe !ready\nPresiona F1 para estar listo." + } + + "LiveCountdownBegin" + { + "es" "¡Empezando en vivo!\nEscribe !unready\nPresiona F2 para cancelar" + } + + "LiveCountdown" + { + "#format" "{1:d}" + "es" "En vivo en: {1}\nEscribe !unready\nPresiona F2 para cancelar" + } + + "LiveCountdownCancelled" + { + "es" "¡Cuenta regresiva cancelada!" + } + + "RoundIsLive" + { + "es" "¡La ronda esta en vivo!" + } + + "InitiateAutoStart" + { + "es" "¡El juego comenzara automaticamente!" + } + + "AutoStartCountdown" + { + "#format" "{1:d}" + "es" "El juego comienza en: {1}" + } + + "AutoStartWaiting" + { + "es" "Esperando a que los jugadores carguen..." + } + + "AutoStartNotEnoughPlayers" + { + "es" "Se requieren mas jugadores..." + } +} \ No newline at end of file