From 89e6ac292445a570a0e5db77a09a03ca0d067504 Mon Sep 17 00:00:00 2001 From: SirPlease Date: Wed, 13 Sep 2023 21:18:58 +0200 Subject: [PATCH] Fixed tankdamagemulti not working properly in l4d2_weapon_attributes - Inflictor always returns "player" for non-melee weapons, meaning the multiplier wouldn't work for guns, using GetClientWeapon(attacker) to determine the weapon now. - Reformatted the plugin using 4 space indentation (sorry?) :sweat_smile: --- .../optional/l4d2_weapon_attributes.smx | Bin 18111 -> 18134 bytes .../scripting/l4d2_weapon_attributes.sp | 1542 ++++++++--------- 2 files changed, 771 insertions(+), 771 deletions(-) diff --git a/addons/sourcemod/plugins/optional/l4d2_weapon_attributes.smx b/addons/sourcemod/plugins/optional/l4d2_weapon_attributes.smx index deeb9eed62315567f028060c8f04445d464f1b33..c477682646d5b8357ca079a39e8091ed9f64e42a 100644 GIT binary patch literal 18134 zcmYh91yoyIv#{IDG&4>fSN)Iw6^_lT0RRn30DuR_b=?2} z%{>4>6vspT06;k|uRM;yL;u5{aQu7}0NBUnG{P}C3;4-+$2F&hfu!=Vc8YF?MUReM1I}ObmAhhg8=vSJ52Q-)d}y^|CqZ%%yD= z0iN%780kL$JcdH&(kD_UIy6)GCN$yQhfU03i=v2Bxr%&a0_HcuclKPSHJ&%?i&EX?NMbk>F z;u=hom#6N;!uGQIX4{U3P-^>UQJeO~CC}RFP3XG@z7vi0c%U2-rheIGY`q1FNrr@S zsQjH4Xp?sAxSTN@+0tapK-Ham>`aP#Oyx+oIN1$*qj-JaXgBjlq`{TJX?{&fTb#wS zdAVZf4V-m!C$i`yVfWHy_0!mE%)*&&8U2`&<0-i2c(m0Uc&#PxvaEloR*TY_^PU~{ ztr>EJ325`Oc-n!=VpH5mkH7DgDt@-UOk_-C7vtNUb44ez5w*f=MX*@$lj5eDm8wG> z7d_Zrd4o&DOrK!AaHnDK+UXXl$$4R0^b+^;bq4ESAM=BK#<1&-$c}pfL)wf+9~(h7 z^Jk8|W|ekZ&2cQrH~Pnxu{3z`oH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gOnGUt5yKE-aIQL!6ym$WcySvHx zhx{ze-2ub09ZaJ~7)`b7lv|@-zY4qP%QiVbqHFv+W38p*OeS!4{FGI+=w6%R(|hVu z{qaOmgs}9J7){2Zr_R#Xrb$ooJDTvDAz)W~Rur1G$en32o{Tr;Zo+jwaBE%gElEG- zF5W&>w7G{$Vi>I6|3rZ?{Gnq?Oy-K3*o8rb@GOqrf`{W-+1PJiWi7}JENgt9jW87J zURh80%E^BpB*1qDj`=?UCF;H3tquONt%Ogi)9Yxolh!aSq+{2qP(Kzsl}X9l*HiH{!$L$blF z6h;uS8>cg=mgsW{;(G~daQc>lI2WZd>HL>4+K`c4Fnjnb4B|5k2 zQt(soaw)_cLlYXVQ6s0~O4?Ld+-VOHKC}%n@SlDB%+k#MHj`9V1RMQiQ}Pn8(V97$H0+0@DI-n7t^IvGjHFiJiLh)L=OS+Gto zQ8#YfZt)u5@uN z`#eC*g zR?jC{4JtM$Oe#B>3W}P!>}U1NlbzsHGiUysuJBv|Be_vw(qKiF3S#CYMBDyDPbf@^ zllJ_>PnzO92F8UJQ=DW~ASMMDLwXv)hoO+3*`f^T@1h@ORhXjPkAfNA#LQA%Y^au+ zHyJ*&D%=gM=Zw%%n;tf%bfK5^uZ{vr{e%J?9kWkUn?(xyh%HPk rVv=~1WxIEYQcS84GOM5To0w#aKj&A<{@`6~_$Q_h^V0tVGj#j# ."); - return Plugin_Handled; - } - - char sWeaponName[MAX_WEAPON_NAME_LENGTH]; - GetCmdArg(1, sWeaponName, sizeof(sWeaponName)); - - if (strncmp(sWeaponName, "weapon_", 7) == 0) { - strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); - } - - char sAttrName[MAX_ATTRS_NAME_LENGTH]; - GetCmdArg(2, sAttrName, sizeof(sAttrName)); - - char sAttrValue[MAX_ATTRS_VALUE_LENGTH]; - GetCmdArg(3, sAttrValue, sizeof(sAttrValue)); - - if (IsSupportedMelee(sWeaponName)) { - int iAttrIdx = GetMeleeAttributeIndex(sAttrName); - - if (iAttrIdx == -1) { - PrintDebug(eLogError|eServerPrint, "Bad attribute name: %s.", sAttrName); - return Plugin_Handled; - } - - if (iAttrIdx < INT_MELEE_MAX_ATTRS) { - int iValue = StringToInt(sAttrValue); - SetMeleeAttributeInt(sWeaponName, iAttrIdx, iValue); - PrintToServer("%s for %s set to %d.", sMeleeAttrNames[iAttrIdx], sWeaponName, iValue); - } else if (iAttrIdx < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { - bool bValue = StringToBool(sAttrValue); - SetMeleeAttributeBool(sWeaponName, iAttrIdx, bValue); - PrintToServer("%s for %s set to %s.", sMeleeAttrNames[iAttrIdx], sWeaponName, bValue ? "true" : "false"); - } else { - float fValue = StringToFloat(sAttrValue); - if (iAttrIdx < GAME_MELEE_MAX_ATTRS) { - SetMeleeAttributeFloat(sWeaponName, iAttrIdx, fValue); - PrintToServer("%s for %s set to %.2f.", sMeleeAttrNames[iAttrIdx], sWeaponName, fValue); - } else { - if (fValue <= 0.0) { - if (!hTankDamageAttri.Remove(sWeaponName)) { - PrintDebug(eLogError|eServerPrint, "Сheck melee attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); - return Plugin_Handled; - } - - PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for %s melee!", sWeaponName); - OnTankDamageEnableAttriChanged(hTankDamageAttri.Size != 0); - return Plugin_Handled; - } - - OnTankDamageEnableAttriChanged(true); - hTankDamageAttri.SetValue(sWeaponName, fValue); - PrintToServer("%s for %s set to %.2f", sMeleeAttrNames[iAttrIdx], sWeaponName, fValue); - } - } - } else if (L4D2_IsValidWeapon(sWeaponName)) { - int iAttrIdx = GetWeaponAttributeIndex(sAttrName); - - if (iAttrIdx == -1) { - PrintDebug(eLogError|eServerPrint, "Bad attribute name: %s.", sAttrName); - return Plugin_Handled; - } - - if (iAttrIdx < INT_WEAPON_MAX_ATTRS) { - int iValue = StringToInt(sAttrValue); - SetWeaponAttributeInt(sWeaponName, iAttrIdx, iValue); - PrintToServer("%s for %s set to %d.", sWeaponAttrNames[iAttrIdx], sWeaponName, iValue); - } else { - float fValue = StringToFloat(sAttrValue); - if (iAttrIdx < GAME_WEAPON_MAX_ATTRS) { - SetWeaponAttributeFloat(sWeaponName, iAttrIdx, fValue); - PrintToServer("%s for %s set to %.2f.", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); - } else if (iAttrIdx < PLUGIN_WEAPON_MAX_ATTRS - 1) { - if (fValue <= 0.0) { - if (!hTankDamageAttri.Remove(sWeaponName)) { - PrintDebug(eLogError|eServerPrint, "Сheck weapon attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); - return Plugin_Handled; - } - - PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for %s weapon!", sWeaponName); - OnTankDamageEnableAttriChanged(hTankDamageAttri.Size != 0); - return Plugin_Handled; - } - - OnTankDamageEnableAttriChanged(true); - hTankDamageAttri.SetValue(sWeaponName, fValue); - PrintToServer("%s for %s set to %.2f", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); - } else { - if (StrContains(sWeaponName, "shotgun", false) == -1) { - PrintDebug(eLogError|eServerPrint, "Non-shotgun weapon '%s' encountered when setting Reload Duration Multiplier (reloaddurationmult).", sWeaponName); - return Plugin_Handled; - } - - if (fValue <= 0.0) { - if (!hReloadDurationAttri.Remove(sWeaponName)) { - PrintDebug(eLogError|eServerPrint, "Сheck weapon attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); - return Plugin_Handled; - } - - PrintToServer("Reload Duration Multiplier (reloaddurationmult) attribute reset for %s weapon!", sWeaponName); - OnReloadDurationEnableAttriChanged(hReloadDurationAttri.Size != 0); - return Plugin_Handled; - } - - OnReloadDurationEnableAttriChanged(true); - hReloadDurationAttri.SetValue(sWeaponName, fValue); - PrintToServer("%s for %s set to %.2f", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); - } - } - } else { - PrintDebug(eLogError|eServerPrint, "Bad weapon name: %s.", sWeaponName); - } - - return Plugin_Handled; + if (args < 3) { + PrintDebug(eLogError|eServerPrint, "Syntax: sm_weapon ."); + return Plugin_Handled; + } + + char sWeaponName[MAX_WEAPON_NAME_LENGTH]; + GetCmdArg(1, sWeaponName, sizeof(sWeaponName)); + + if (strncmp(sWeaponName, "weapon_", 7) == 0) { + strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); + } + + char sAttrName[MAX_ATTRS_NAME_LENGTH]; + GetCmdArg(2, sAttrName, sizeof(sAttrName)); + + char sAttrValue[MAX_ATTRS_VALUE_LENGTH]; + GetCmdArg(3, sAttrValue, sizeof(sAttrValue)); + + if (IsSupportedMelee(sWeaponName)) { + int iAttrIdx = GetMeleeAttributeIndex(sAttrName); + + if (iAttrIdx == -1) { + PrintDebug(eLogError|eServerPrint, "Bad attribute name: %s.", sAttrName); + return Plugin_Handled; + } + + if (iAttrIdx < INT_MELEE_MAX_ATTRS) { + int iValue = StringToInt(sAttrValue); + SetMeleeAttributeInt(sWeaponName, iAttrIdx, iValue); + PrintToServer("%s for %s set to %d.", sMeleeAttrNames[iAttrIdx], sWeaponName, iValue); + } else if (iAttrIdx < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { + bool bValue = StringToBool(sAttrValue); + SetMeleeAttributeBool(sWeaponName, iAttrIdx, bValue); + PrintToServer("%s for %s set to %s.", sMeleeAttrNames[iAttrIdx], sWeaponName, bValue ? "true" : "false"); + } else { + float fValue = StringToFloat(sAttrValue); + if (iAttrIdx < GAME_MELEE_MAX_ATTRS) { + SetMeleeAttributeFloat(sWeaponName, iAttrIdx, fValue); + PrintToServer("%s for %s set to %.2f.", sMeleeAttrNames[iAttrIdx], sWeaponName, fValue); + } else { + if (fValue <= 0.0) { + if (!hTankDamageAttri.Remove(sWeaponName)) { + PrintDebug(eLogError|eServerPrint, "Сheck melee attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); + return Plugin_Handled; + } + + PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for %s melee!", sWeaponName); + OnTankDamageEnableAttriChanged(hTankDamageAttri.Size != 0); + return Plugin_Handled; + } + + OnTankDamageEnableAttriChanged(true); + hTankDamageAttri.SetValue(sWeaponName, fValue); + PrintToServer("%s for %s set to %.2f", sMeleeAttrNames[iAttrIdx], sWeaponName, fValue); + } + } + } else if (L4D2_IsValidWeapon(sWeaponName)) { + int iAttrIdx = GetWeaponAttributeIndex(sAttrName); + + if (iAttrIdx == -1) { + PrintDebug(eLogError|eServerPrint, "Bad attribute name: %s.", sAttrName); + return Plugin_Handled; + } + + if (iAttrIdx < INT_WEAPON_MAX_ATTRS) { + int iValue = StringToInt(sAttrValue); + SetWeaponAttributeInt(sWeaponName, iAttrIdx, iValue); + PrintToServer("%s for %s set to %d.", sWeaponAttrNames[iAttrIdx], sWeaponName, iValue); + } else { + float fValue = StringToFloat(sAttrValue); + if (iAttrIdx < GAME_WEAPON_MAX_ATTRS) { + SetWeaponAttributeFloat(sWeaponName, iAttrIdx, fValue); + PrintToServer("%s for %s set to %.2f.", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); + } else if (iAttrIdx < PLUGIN_WEAPON_MAX_ATTRS - 1) { + if (fValue <= 0.0) { + if (!hTankDamageAttri.Remove(sWeaponName)) { + PrintDebug(eLogError|eServerPrint, "Сheck weapon attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); + return Plugin_Handled; + } + + PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for %s weapon!", sWeaponName); + OnTankDamageEnableAttriChanged(hTankDamageAttri.Size != 0); + return Plugin_Handled; + } + + OnTankDamageEnableAttriChanged(true); + hTankDamageAttri.SetValue(sWeaponName, fValue); + PrintToServer("%s for %s set to %.2f", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); + } else { + if (StrContains(sWeaponName, "shotgun", false) == -1) { + PrintDebug(eLogError|eServerPrint, "Non-shotgun weapon '%s' encountered when setting Reload Duration Multiplier (reloaddurationmult).", sWeaponName); + return Plugin_Handled; + } + + if (fValue <= 0.0) { + if (!hReloadDurationAttri.Remove(sWeaponName)) { + PrintDebug(eLogError|eServerPrint, "Сheck weapon attribute '%s' value, cannot be set below zero or zero. Set the value: %f!", sAttrName, fValue); + return Plugin_Handled; + } + + PrintToServer("Reload Duration Multiplier (reloaddurationmult) attribute reset for %s weapon!", sWeaponName); + OnReloadDurationEnableAttriChanged(hReloadDurationAttri.Size != 0); + return Plugin_Handled; + } + + OnReloadDurationEnableAttriChanged(true); + hReloadDurationAttri.SetValue(sWeaponName, fValue); + PrintToServer("%s for %s set to %.2f", sWeaponAttrNames[iAttrIdx], sWeaponName, fValue); + } + } + } else { + PrintDebug(eLogError|eServerPrint, "Bad weapon name: %s.", sWeaponName); + } + + return Plugin_Handled; } public Action Cmd_WeaponAttributes(int client, int args) { - int iCvarValue = hHideWeaponAttributes.IntValue; - - if (iCvarValue == eDisableCommand || - (iCvarValue == eShowToOnlyAdmin && client != 0 && GetUserAdmin(client) == INVALID_ADMIN_ID) - ) { - ReplyToCommand(client, "This command is not available to you!"); - return Plugin_Handled; - } - - if (args > 1) { - ReplyToCommand(client, "Syntax: sm_weapon_attributes [weapon]."); - return Plugin_Handled; - } - - char sWeaponName[MAX_WEAPON_NAME_LENGTH]; - if (args == 1) { - GetCmdArg(1, sWeaponName, sizeof(sWeaponName)); - } else if (client > 0) { - int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"); - if (weapon != -1) { - GetEdictClassname(weapon, sWeaponName, sizeof(sWeaponName)); - if (strcmp(sWeaponName, "weapon_melee") == 0) { - GetEntPropString(weapon, Prop_Data, "m_strMapSetScriptName", sWeaponName, sizeof(sWeaponName)); - } - } - } - - if (strncmp(sWeaponName, "weapon_", 7) == 0) { - strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); - } - - if (IsSupportedMelee(sWeaponName)) { - CReplyToCommand(client, "{blue}[{default}Melee stats for {green}%s{blue}]", sWeaponName); - - for (int iAtrriIndex = 0; iAtrriIndex < GAME_MELEE_MAX_ATTRS; iAtrriIndex++) { - if (iAtrriIndex < INT_MELEE_MAX_ATTRS) { - int iValue = GetMeleeAttributeInt(sWeaponName, iAtrriIndex); - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%d", sMeleeAttrNames[iAtrriIndex], iValue); - } else if (iAtrriIndex < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { - bool bValue = GetMeleeAttributeBool(sWeaponName, iAtrriIndex); - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%s", sMeleeAttrNames[iAtrriIndex], bValue ? "true" : "false"); - } else { - float fValue = GetMeleeAttributeFloat(sWeaponName, iAtrriIndex); - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sMeleeAttrNames[iAtrriIndex], fValue); - } - } - - float fBuff = 0.0; - if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sMeleeAttrNames[GAME_MELEE_MAX_ATTRS], fBuff); - } - } else if (L4D2_IsValidWeapon(sWeaponName)) { - CReplyToCommand(client, "{blue}[{default}Weapon stats for {green}%s{blue}]", sWeaponName); - - for (int iAtrriIndex = 0; iAtrriIndex < GAME_WEAPON_MAX_ATTRS; iAtrriIndex++) { - if (iAtrriIndex < INT_WEAPON_MAX_ATTRS) { - int iValue = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%d", sWeaponAttrNames[iAtrriIndex], iValue); - } else { - float fValue = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[iAtrriIndex], fValue); - } - } - - float fBuff = 0.0; - if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[GAME_WEAPON_MAX_ATTRS], fBuff); - } - - fBuff = 0.0; - if (hReloadDurationAttri.GetValue(sWeaponName, fBuff)) { - CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[GAME_WEAPON_MAX_ATTRS+1], fBuff); - } - } else { - ReplyToCommand(client, "Bad weapon name: %s.", sWeaponName); - return Plugin_Handled; - } - - return Plugin_Handled; + int iCvarValue = hHideWeaponAttributes.IntValue; + + if (iCvarValue == eDisableCommand || + (iCvarValue == eShowToOnlyAdmin && client != 0 && GetUserAdmin(client) == INVALID_ADMIN_ID) + ) { + ReplyToCommand(client, "This command is not available to you!"); + return Plugin_Handled; + } + + if (args > 1) { + ReplyToCommand(client, "Syntax: sm_weapon_attributes [weapon]."); + return Plugin_Handled; + } + + char sWeaponName[MAX_WEAPON_NAME_LENGTH]; + if (args == 1) { + GetCmdArg(1, sWeaponName, sizeof(sWeaponName)); + } else if (client > 0) { + int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"); + if (weapon != -1) { + GetEdictClassname(weapon, sWeaponName, sizeof(sWeaponName)); + if (strcmp(sWeaponName, "weapon_melee") == 0) { + GetEntPropString(weapon, Prop_Data, "m_strMapSetScriptName", sWeaponName, sizeof(sWeaponName)); + } + } + } + + if (strncmp(sWeaponName, "weapon_", 7) == 0) { + strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); + } + + if (IsSupportedMelee(sWeaponName)) { + CReplyToCommand(client, "{blue}[{default}Melee stats for {green}%s{blue}]", sWeaponName); + + for (int iAtrriIndex = 0; iAtrriIndex < GAME_MELEE_MAX_ATTRS; iAtrriIndex++) { + if (iAtrriIndex < INT_MELEE_MAX_ATTRS) { + int iValue = GetMeleeAttributeInt(sWeaponName, iAtrriIndex); + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%d", sMeleeAttrNames[iAtrriIndex], iValue); + } else if (iAtrriIndex < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { + bool bValue = GetMeleeAttributeBool(sWeaponName, iAtrriIndex); + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%s", sMeleeAttrNames[iAtrriIndex], bValue ? "true" : "false"); + } else { + float fValue = GetMeleeAttributeFloat(sWeaponName, iAtrriIndex); + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sMeleeAttrNames[iAtrriIndex], fValue); + } + } + + float fBuff = 0.0; + if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sMeleeAttrNames[GAME_MELEE_MAX_ATTRS], fBuff); + } + } else if (L4D2_IsValidWeapon(sWeaponName)) { + CReplyToCommand(client, "{blue}[{default}Weapon stats for {green}%s{blue}]", sWeaponName); + + for (int iAtrriIndex = 0; iAtrriIndex < GAME_WEAPON_MAX_ATTRS; iAtrriIndex++) { + if (iAtrriIndex < INT_WEAPON_MAX_ATTRS) { + int iValue = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%d", sWeaponAttrNames[iAtrriIndex], iValue); + } else { + float fValue = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[iAtrriIndex], fValue); + } + } + + float fBuff = 0.0; + if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[GAME_WEAPON_MAX_ATTRS], fBuff); + } + + fBuff = 0.0; + if (hReloadDurationAttri.GetValue(sWeaponName, fBuff)) { + CReplyToCommand(client, "- {lightgreen}%s{default}: {olive}%.2f", sWeaponAttrNames[GAME_WEAPON_MAX_ATTRS+1], fBuff); + } + } else { + ReplyToCommand(client, "Bad weapon name: %s.", sWeaponName); + return Plugin_Handled; + } + + return Plugin_Handled; } public Action Cmd_WeaponAttributesReset(int args) { - OnTankDamageEnableAttriChanged(false); - - bool IsReset = (hTankDamageAttri.Size > 0); - hTankDamageAttri.Clear(); - - if (IsReset) { - PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for all weapons!"); - } - - IsReset = (hReloadDurationAttri.Size > 0); - hReloadDurationAttri.Clear(); - - if (IsReset) { - PrintToServer("Reload Duration Multiplier (reloaddurationmult) attribute reset for all shotguns!"); - } - - int iWeaponAttrCount = ResetWeaponAttributes(true); - if (iWeaponAttrCount == 0) { - PrintToServer("Weapon attributes were not reset, because no weapon attributes were saved!"); - } - - int iMeleeAttrCount = ResetMeleeAttributes(true); - if (iMeleeAttrCount == 0) { - PrintToServer("Melee attributes were not reset, because no melee attributes were saved!"); - } - - if (iWeaponAttrCount || iMeleeAttrCount) { - PrintToServer("The weapon attributes for all saved weapons have been reset successfully. Number of reset weapon attributes: %d!", iWeaponAttrCount + iMeleeAttrCount); - } - - return Plugin_Handled; + OnTankDamageEnableAttriChanged(false); + + bool IsReset = (hTankDamageAttri.Size > 0); + hTankDamageAttri.Clear(); + + if (IsReset) { + PrintToServer("Tank Damage Multiplier (tankdamagemult) attribute reset for all weapons!"); + } + + IsReset = (hReloadDurationAttri.Size > 0); + hReloadDurationAttri.Clear(); + + if (IsReset) { + PrintToServer("Reload Duration Multiplier (reloaddurationmult) attribute reset for all shotguns!"); + } + + int iWeaponAttrCount = ResetWeaponAttributes(true); + if (iWeaponAttrCount == 0) { + PrintToServer("Weapon attributes were not reset, because no weapon attributes were saved!"); + } + + int iMeleeAttrCount = ResetMeleeAttributes(true); + if (iMeleeAttrCount == 0) { + PrintToServer("Melee attributes were not reset, because no melee attributes were saved!"); + } + + if (iWeaponAttrCount || iMeleeAttrCount) { + PrintToServer("The weapon attributes for all saved weapons have been reset successfully. Number of reset weapon attributes: %d!", iWeaponAttrCount + iMeleeAttrCount); + } + + return Plugin_Handled; } /* @@ -545,476 +545,476 @@ This just returns the director variable bool __cdecl CDirector::IsTankInPlay(CDirector *this) { - return *((_DWORD *)this + 64) > 0; + return *((_DWORD *)this + 64) > 0; } */ public Action DamageBuffVsTank(int victim, int &attacker, int &inflictor, float &damage, int &damagetype) { - if (!(damagetype & DMG_BULLET) && !(damagetype & DMG_CLUB)) { - return Plugin_Continue; - } - - /*if (!L4D2_IsTankInPlay()) { //left4dhooks & left4donwtown - return Plugin_Continue; - }*/ - - if (!IsValidClient(attacker) || !IsTank(victim)) { - return Plugin_Continue; - } - - char sWeaponName[MAX_WEAPON_NAME_LENGTH]; - GetEdictClassname(inflictor, sWeaponName, sizeof(sWeaponName)); - - if (strncmp(sWeaponName, "weapon_", 7) == 0) { - if (strcmp(sWeaponName[7], "melee") == 0) { - GetEntPropString(inflictor, Prop_Data, "m_strMapSetScriptName", sWeaponName, sizeof(sWeaponName)); - } else { - strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); - } - } - - float fBuff = 0.0; - if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { - damage *= fBuff; - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Damage to the tank %N(%d) is set %f. Attacker: %N(%d), weapon: %s.", victim, victim, damage, attacker, attacker, sWeaponName); - #endif - - return Plugin_Changed; - } - - return Plugin_Continue; + if (!(damagetype & DMG_BULLET) && !(damagetype & DMG_CLUB)) { + return Plugin_Continue; + } + + /*if (!L4D2_IsTankInPlay()) { //left4dhooks & left4donwtown + return Plugin_Continue; + }*/ + + if (!IsValidClient(attacker) || !IsTank(victim)) { + return Plugin_Continue; + } + + char sWeaponName[MAX_WEAPON_NAME_LENGTH]; + GetClientWeapon(attacker, sWeaponName, sizeof(sWeaponName)); + + if (strncmp(sWeaponName, "weapon_", 7) == 0) { + if (strcmp(sWeaponName[7], "melee") == 0) { + GetEntPropString(inflictor, Prop_Data, "m_strMapSetScriptName", sWeaponName, sizeof(sWeaponName)); + } else { + strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); + } + } + + float fBuff = 0.0; + if (hTankDamageAttri.GetValue(sWeaponName, fBuff)) { + damage *= fBuff; + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Damage to the tank %N(%d) is set %f. Attacker: %N(%d), weapon: %s.", victim, victim, damage, attacker, attacker, sWeaponName); + #endif + + return Plugin_Changed; + } + + return Plugin_Continue; } MRESReturn DTR_CBaseShotgun__GetReloadDurationModifier(int weapon, DHookReturn hReturn) { - char sWeaponName[MAX_WEAPON_NAME_LENGTH]; - GetEdictClassname(weapon, sWeaponName, sizeof(sWeaponName)); - - if (strncmp(sWeaponName, "weapon_", 7) == 0) { - strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); - } - - float fBuff = 0.0; - if (!hReloadDurationAttri.GetValue(sWeaponName, fBuff)) { - return MRES_Ignored; - } - - hReturn.Value = fBuff; - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reload duration multiplier to weapon '%s' is set %f.", sWeaponName, fBuff); - #endif - + char sWeaponName[MAX_WEAPON_NAME_LENGTH]; + GetEdictClassname(weapon, sWeaponName, sizeof(sWeaponName)); + + if (strncmp(sWeaponName, "weapon_", 7) == 0) { + strcopy(sWeaponName, sizeof(sWeaponName), sWeaponName[7]); + } + + float fBuff = 0.0; + if (!hReloadDurationAttri.GetValue(sWeaponName, fBuff)) { + return MRES_Ignored; + } + + hReturn.Value = fBuff; + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reload duration multiplier to weapon '%s' is set %f.", sWeaponName, fBuff); + #endif + // 1.12.0.7000 // https://github.com/alliedmodders/sourcemod/commit/8e0039aaec2bd449bc4f73d82307bde #if SOURCEMOD_V_MAJOR > 1 || (SOURCEMOD_V_MAJOR == 1 && SOURCEMOD_V_MINOR >= 12 && SOURCEMOD_V_REV >= 7000) - return MRES_Supercede; + return MRES_Supercede; #else - return MRES_Override; + return MRES_Override; #endif } int GetWeaponAttributeIndex(const char[] sAttrName) { - for (int i = 0; i < PLUGIN_WEAPON_MAX_ATTRS; i++) { - if (strcmp(sAttrName, sWeaponAttrShortName[i]) == 0) { - return i; - } - } + for (int i = 0; i < PLUGIN_WEAPON_MAX_ATTRS; i++) { + if (strcmp(sAttrName, sWeaponAttrShortName[i]) == 0) { + return i; + } + } - return -1; + return -1; } int GetMeleeAttributeIndex(const char[] sAttrName) { - for (int i = 0; i < PLUGIN_MELEE_MAX_ATTRS; i++) { - if (strcmp(sAttrName, sMeleeAttrShortName[i]) == 0) { - return i; - } - } + for (int i = 0; i < PLUGIN_MELEE_MAX_ATTRS; i++) { + if (strcmp(sAttrName, sMeleeAttrShortName[i]) == 0) { + return i; + } + } - return -1; + return -1; } int GetWeaponAttributeInt(const char[] sWeaponName, int iAtrriIndex) { - return L4D2_GetIntWeaponAttribute(sWeaponName, iIntWeaponAttributes[iAtrriIndex]); + return L4D2_GetIntWeaponAttribute(sWeaponName, iIntWeaponAttributes[iAtrriIndex]); } float GetWeaponAttributeFloat(const char[] sWeaponName, int iAtrriIndex) { - return L4D2_GetFloatWeaponAttribute(sWeaponName, iFloatWeaponAttributes[iAtrriIndex - INT_WEAPON_MAX_ATTRS]); + return L4D2_GetFloatWeaponAttribute(sWeaponName, iFloatWeaponAttributes[iAtrriIndex - INT_WEAPON_MAX_ATTRS]); } void SetWeaponAttributeInt(const char[] sWeaponName, int iAtrriIndex, int iSetValue, bool bIsSaveDefValue = true) { - Resetable value; - if (!hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value))) { - if (bIsSaveDefValue) { - value.defVal = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the weapon '%s' is saved! Attributes index: %d.", value.defVal, sWeaponName, iAtrriIndex); - #endif - } - } - - L4D2_SetIntWeaponAttribute(sWeaponName, iIntWeaponAttributes[iAtrriIndex], iSetValue); - - value.curVal = iSetValue; - hDefaultWeaponAttributes[iAtrriIndex].SetArray(sWeaponName, value, sizeof(value), true); + Resetable value; + if (!hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value))) { + if (bIsSaveDefValue) { + value.defVal = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the weapon '%s' is saved! Attributes index: %d.", value.defVal, sWeaponName, iAtrriIndex); + #endif + } + } + + L4D2_SetIntWeaponAttribute(sWeaponName, iIntWeaponAttributes[iAtrriIndex], iSetValue); + + value.curVal = iSetValue; + hDefaultWeaponAttributes[iAtrriIndex].SetArray(sWeaponName, value, sizeof(value), true); #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Weapon attribute int set. %s - Trying to set: %d, was set: %d.", sWeaponName, iSetValue, GetWeaponAttributeInt(sWeaponName, iAtrriIndex)); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Weapon attribute int set. %s - Trying to set: %d, was set: %d.", sWeaponName, iSetValue, GetWeaponAttributeInt(sWeaponName, iAtrriIndex)); #endif } void SetWeaponAttributeFloat(const char[] sWeaponName, int iAtrriIndex, float fSetValue, bool bIsSaveDefValue = true) { - Resetable value; - if (!hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value))) { - if (bIsSaveDefValue) { - value.defVal = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default float value '%f' of the attribute for the weapon '%s' is saved! Attributes index: %d.", value.defVal, sWeaponName, iAtrriIndex); - #endif - } - } - - L4D2_SetFloatWeaponAttribute(sWeaponName, iFloatWeaponAttributes[iAtrriIndex - INT_WEAPON_MAX_ATTRS], fSetValue); - - value.curVal = fSetValue; - hDefaultWeaponAttributes[iAtrriIndex].SetArray(sWeaponName, value, sizeof(value), true); - + Resetable value; + if (!hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value))) { + if (bIsSaveDefValue) { + value.defVal = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default float value '%f' of the attribute for the weapon '%s' is saved! Attributes index: %d.", value.defVal, sWeaponName, iAtrriIndex); + #endif + } + } + + L4D2_SetFloatWeaponAttribute(sWeaponName, iFloatWeaponAttributes[iAtrriIndex - INT_WEAPON_MAX_ATTRS], fSetValue); + + value.curVal = fSetValue; + hDefaultWeaponAttributes[iAtrriIndex].SetArray(sWeaponName, value, sizeof(value), true); + #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Weapon attribute float set. %s - Trying to set: %f, was set: %f.", sWeaponName, fSetValue, GetWeaponAttributeFloat(sWeaponName, iAtrriIndex)); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Weapon attribute float set. %s - Trying to set: %f, was set: %f.", sWeaponName, fSetValue, GetWeaponAttributeFloat(sWeaponName, iAtrriIndex)); #endif } int GetMeleeAttributeInt(const char[] sMeleeName, int iAtrriIndex) { - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - return L4D2_GetIntMeleeAttribute(idx, iIntMeleeAttributes[iAtrriIndex]); - } - - Resetable value; - if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - // do something ... - } - return value.curVal; + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + return L4D2_GetIntMeleeAttribute(idx, iIntMeleeAttributes[iAtrriIndex]); + } + + Resetable value; + if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + // do something ... + } + return value.curVal; } bool GetMeleeAttributeBool(const char[] sMeleeName, int iAtrriIndex) { - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - return L4D2_GetBoolMeleeAttribute(idx, iBoolMeleeAttributes[iAtrriIndex - INT_MELEE_MAX_ATTRS]); - } - - Resetable value; - if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - // do something ... - } - - return value.curVal; + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + return L4D2_GetBoolMeleeAttribute(idx, iBoolMeleeAttributes[iAtrriIndex - INT_MELEE_MAX_ATTRS]); + } + + Resetable value; + if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + // do something ... + } + + return value.curVal; } float GetMeleeAttributeFloat(const char[] sMeleeName, int iAtrriIndex) { - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - return L4D2_GetFloatMeleeAttribute(idx, iFloatMeleeAttributes[iAtrriIndex - BOOL_MELEE_MAX_ATTRS - INT_MELEE_MAX_ATTRS]); - } - - Resetable value; - if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - // do something ... - } - - return value.curVal; + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + return L4D2_GetFloatMeleeAttribute(idx, iFloatMeleeAttributes[iAtrriIndex - BOOL_MELEE_MAX_ATTRS - INT_MELEE_MAX_ATTRS]); + } + + Resetable value; + if (hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + // do something ... + } + + return value.curVal; } void SetMeleeAttributeInt(const char[] sMeleeName, int iAtrriIndex, int iSetValue, bool bIsSaveDefValue = true) { - Resetable value; - if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - if (bIsSaveDefValue) { - value.defVal = GetMeleeAttributeInt(sMeleeName, iAtrriIndex); - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); - #endif - } - } - - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - L4D2_SetIntMeleeAttribute(idx, iIntMeleeAttributes[iAtrriIndex], iSetValue); - } - - value.curVal = iSetValue; - hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); + Resetable value; + if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + if (bIsSaveDefValue) { + value.defVal = GetMeleeAttributeInt(sMeleeName, iAtrriIndex); + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); + #endif + } + } + + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + L4D2_SetIntMeleeAttribute(idx, iIntMeleeAttributes[iAtrriIndex], iSetValue); + } + + value.curVal = iSetValue; + hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %d, was set: %d.", sMeleeName, iSetValue, GetMeleeAttributeInt(sMeleeName, iAtrriIndex)); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %d, was set: %d.", sMeleeName, iSetValue, GetMeleeAttributeInt(sMeleeName, iAtrriIndex)); #endif } void SetMeleeAttributeBool(const char[] sMeleeName, int iAtrriIndex, bool bSetValue, bool bIsSaveDefValue = true) { - Resetable value; - if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - if (bIsSaveDefValue) { - value.defVal = GetMeleeAttributeBool(sMeleeName, iAtrriIndex); - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); - #endif - } - } - - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - L4D2_SetBoolMeleeAttribute(idx, iBoolMeleeAttributes[iAtrriIndex - INT_MELEE_MAX_ATTRS], bSetValue); - } - - value.curVal = bSetValue; - hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); + Resetable value; + if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + if (bIsSaveDefValue) { + value.defVal = GetMeleeAttributeBool(sMeleeName, iAtrriIndex); + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%d' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); + #endif + } + } + + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + L4D2_SetBoolMeleeAttribute(idx, iBoolMeleeAttributes[iAtrriIndex - INT_MELEE_MAX_ATTRS], bSetValue); + } + + value.curVal = bSetValue; + hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %d, was set: %d.", sMeleeName, bSetValue, GetMeleeAttributeBool(sMeleeName, iAtrriIndex)); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %d, was set: %d.", sMeleeName, bSetValue, GetMeleeAttributeBool(sMeleeName, iAtrriIndex)); #endif } void SetMeleeAttributeFloat(const char[] sMeleeName, int iAtrriIndex, float fSetValue, bool bIsSaveDefValue = true) { - Resetable value; - if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { - if (bIsSaveDefValue) { - value.defVal = GetMeleeAttributeFloat(sMeleeName, iAtrriIndex); - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%f' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); - #endif - } - } - - int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); - if (idx != -1) { - L4D2_SetFloatMeleeAttribute(idx, iFloatMeleeAttributes[iAtrriIndex - BOOL_MELEE_MAX_ATTRS - INT_MELEE_MAX_ATTRS], fSetValue); - } - - value.curVal = fSetValue; - hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); + Resetable value; + if (!hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value))) { + if (bIsSaveDefValue) { + value.defVal = GetMeleeAttributeFloat(sMeleeName, iAtrriIndex); + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "The default int value '%f' of the attribute for the melee '%s' is saved! Attributes index: %d.", value.defVal, sMeleeName, iAtrriIndex); + #endif + } + } + + int idx = L4D2_GetMeleeWeaponIndex(sMeleeName); + if (idx != -1) { + L4D2_SetFloatMeleeAttribute(idx, iFloatMeleeAttributes[iAtrriIndex - BOOL_MELEE_MAX_ATTRS - INT_MELEE_MAX_ATTRS], fSetValue); + } + + value.curVal = fSetValue; + hDefaultMeleeAttributes[iAtrriIndex].SetArray(sMeleeName, value, sizeof(value), true); #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %f, was set: %f.", sMeleeName, fSetValue, GetMeleeAttributeFloat(sMeleeName, iAtrriIndex)); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Melee attribute int set. %s - Trying to set: %f, was set: %f.", sMeleeName, fSetValue, GetMeleeAttributeFloat(sMeleeName, iAtrriIndex)); #endif } int ResetWeaponAttributes(bool bResetDefault = false) { - float fDefValue = 0.0, fCurValue = 0.0; - int iDefValue = 0, iCurValue = 0; - Resetable value; - - char sWeaponName[MAX_WEAPON_NAME_LENGTH]; - StringMapSnapshot hTrieSnapshot = null; - int iCount = 0, iSize = 0; - - for (int iAtrriIndex = 0; iAtrriIndex < GAME_WEAPON_MAX_ATTRS; iAtrriIndex++) { - hTrieSnapshot = hDefaultWeaponAttributes[iAtrriIndex].Snapshot(); - iSize = hTrieSnapshot.Length; - - for (int i = 0; i < iSize; i++) { - hTrieSnapshot.GetKey(i, sWeaponName, sizeof(sWeaponName)); - if (iAtrriIndex < INT_WEAPON_MAX_ATTRS) { - hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value)); - - iCurValue = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); - iDefValue = bResetDefault ? value.defVal : value.curVal; - if (iCurValue != iDefValue) { - SetWeaponAttributeInt(sWeaponName, iAtrriIndex, iDefValue, false); - iCount++; - } - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sWeaponName, sWeaponAttrShortName[iAtrriIndex], iDefValue, iCurValue); - #endif - } else { - hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value)); - - fCurValue = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); - fDefValue = bResetDefault ? value.defVal : value.curVal; - if (fCurValue != fDefValue) { - SetWeaponAttributeFloat(sWeaponName, iAtrriIndex, fDefValue, false); - iCount++; - } - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %f. Current value: %f.", sWeaponName, sWeaponAttrShortName[iAtrriIndex], fDefValue, fCurValue); - #endif - } - } - - delete hTrieSnapshot; - hTrieSnapshot = null; - } + float fDefValue = 0.0, fCurValue = 0.0; + int iDefValue = 0, iCurValue = 0; + Resetable value; + + char sWeaponName[MAX_WEAPON_NAME_LENGTH]; + StringMapSnapshot hTrieSnapshot = null; + int iCount = 0, iSize = 0; + + for (int iAtrriIndex = 0; iAtrriIndex < GAME_WEAPON_MAX_ATTRS; iAtrriIndex++) { + hTrieSnapshot = hDefaultWeaponAttributes[iAtrriIndex].Snapshot(); + iSize = hTrieSnapshot.Length; + + for (int i = 0; i < iSize; i++) { + hTrieSnapshot.GetKey(i, sWeaponName, sizeof(sWeaponName)); + if (iAtrriIndex < INT_WEAPON_MAX_ATTRS) { + hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value)); + + iCurValue = GetWeaponAttributeInt(sWeaponName, iAtrriIndex); + iDefValue = bResetDefault ? value.defVal : value.curVal; + if (iCurValue != iDefValue) { + SetWeaponAttributeInt(sWeaponName, iAtrriIndex, iDefValue, false); + iCount++; + } + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sWeaponName, sWeaponAttrShortName[iAtrriIndex], iDefValue, iCurValue); + #endif + } else { + hDefaultWeaponAttributes[iAtrriIndex].GetArray(sWeaponName, value, sizeof(value)); + + fCurValue = GetWeaponAttributeFloat(sWeaponName, iAtrriIndex); + fDefValue = bResetDefault ? value.defVal : value.curVal; + if (fCurValue != fDefValue) { + SetWeaponAttributeFloat(sWeaponName, iAtrriIndex, fDefValue, false); + iCount++; + } + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %f. Current value: %f.", sWeaponName, sWeaponAttrShortName[iAtrriIndex], fDefValue, fCurValue); + #endif + } + } + + delete hTrieSnapshot; + hTrieSnapshot = null; + } #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset all weapon attributes. Count: %d.", iCount); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset all weapon attributes. Count: %d.", iCount); #endif - return iCount; + return iCount; } int ResetMeleeAttributes(bool bResetDefault = false) { - float fDefValue = 0.0, fCurValue = 0.0; - bool bDefValue = false, bCurValue = false; - int iDefValue = 0, iCurValue = 0; - Resetable value; - - char sMeleeName[MAX_WEAPON_NAME_LENGTH]; - StringMapSnapshot hTrieSnapshot = null; - int iCount = 0, iSize = 0; - - for (int iAtrriIndex = 0; iAtrriIndex < GAME_MELEE_MAX_ATTRS; iAtrriIndex++) { - hTrieSnapshot = hDefaultMeleeAttributes[iAtrriIndex].Snapshot(); - iSize = hTrieSnapshot.Length; - - for (int i = 0; i < iSize; i++) { - hTrieSnapshot.GetKey(i, sMeleeName, sizeof(sMeleeName)); - if (iAtrriIndex < INT_MELEE_MAX_ATTRS) { - hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); - - iCurValue = GetMeleeAttributeInt(sMeleeName, iAtrriIndex); - iDefValue = bResetDefault ? value.defVal : value.curVal; - if (iCurValue != iDefValue) { - SetMeleeAttributeInt(sMeleeName, iAtrriIndex, iDefValue, false); - iCount++; - } - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], iDefValue, iCurValue); - #endif - } else if (iAtrriIndex < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { - hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); - - bCurValue = GetMeleeAttributeBool(sMeleeName, iAtrriIndex); - bDefValue = bResetDefault ? value.defVal : value.curVal; - if (bCurValue != bDefValue) { - SetMeleeAttributeBool(sMeleeName, iAtrriIndex, bDefValue, false); - iCount++; - } - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], bDefValue, bCurValue); - #endif - } else { - hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); - - fCurValue = GetMeleeAttributeFloat(sMeleeName, iAtrriIndex); - fDefValue = bResetDefault ? value.defVal : value.curVal; - if (fCurValue != fDefValue) { - SetMeleeAttributeFloat(sMeleeName, iAtrriIndex, fDefValue, false); - iCount++; - } - - #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %f. Current value: %f.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], fDefValue, fCurValue); - #endif - } - } - - delete hTrieSnapshot; - hTrieSnapshot = null; - } + float fDefValue = 0.0, fCurValue = 0.0; + bool bDefValue = false, bCurValue = false; + int iDefValue = 0, iCurValue = 0; + Resetable value; + + char sMeleeName[MAX_WEAPON_NAME_LENGTH]; + StringMapSnapshot hTrieSnapshot = null; + int iCount = 0, iSize = 0; + + for (int iAtrriIndex = 0; iAtrriIndex < GAME_MELEE_MAX_ATTRS; iAtrriIndex++) { + hTrieSnapshot = hDefaultMeleeAttributes[iAtrriIndex].Snapshot(); + iSize = hTrieSnapshot.Length; + + for (int i = 0; i < iSize; i++) { + hTrieSnapshot.GetKey(i, sMeleeName, sizeof(sMeleeName)); + if (iAtrriIndex < INT_MELEE_MAX_ATTRS) { + hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); + + iCurValue = GetMeleeAttributeInt(sMeleeName, iAtrriIndex); + iDefValue = bResetDefault ? value.defVal : value.curVal; + if (iCurValue != iDefValue) { + SetMeleeAttributeInt(sMeleeName, iAtrriIndex, iDefValue, false); + iCount++; + } + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], iDefValue, iCurValue); + #endif + } else if (iAtrriIndex < INT_MELEE_MAX_ATTRS + BOOL_MELEE_MAX_ATTRS) { + hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); + + bCurValue = GetMeleeAttributeBool(sMeleeName, iAtrriIndex); + bDefValue = bResetDefault ? value.defVal : value.curVal; + if (bCurValue != bDefValue) { + SetMeleeAttributeBool(sMeleeName, iAtrriIndex, bDefValue, false); + iCount++; + } + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %d. Current value: %d.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], bDefValue, bCurValue); + #endif + } else { + hDefaultMeleeAttributes[iAtrriIndex].GetArray(sMeleeName, value, sizeof(value)); + + fCurValue = GetMeleeAttributeFloat(sMeleeName, iAtrriIndex); + fDefValue = bResetDefault ? value.defVal : value.curVal; + if (fCurValue != fDefValue) { + SetMeleeAttributeFloat(sMeleeName, iAtrriIndex, fDefValue, false); + iCount++; + } + + #if DEBUG + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset Attributes: %s - '%s' set default to %f. Current value: %f.", sMeleeName, sMeleeAttrShortName[iAtrriIndex], fDefValue, fCurValue); + #endif + } + } + + delete hTrieSnapshot; + hTrieSnapshot = null; + } #if DEBUG - PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset all melee attributes. Count: %d.", iCount); + PrintDebug(eLogError|eServerPrint|ePrintChatAll, "Reset all melee attributes. Count: %d.", iCount); #endif - return iCount; + return iCount; } bool IsSupportedMelee(const char[] sMeleeName) { - static const char s_sOfficialMeleeWeaponNames[][] = - { - "knife", - "baseball_bat", - "chainsaw", - "cricket_bat", - "crowbar", - "didgeridoo", - "electric_guitar", - "fireaxe", - "frying_pan", - "golfclub", - "katana", - "machete", - "riotshield", - "tonfa", - "shovel", - "pitchfork" - }; - - for (int i = 0; i < sizeof(s_sOfficialMeleeWeaponNames); i++) { - if (strcmp(sMeleeName, s_sOfficialMeleeWeaponNames[i]) == 0) { - return true; - } - } - - return false; + static const char s_sOfficialMeleeWeaponNames[][] = + { + "knife", + "baseball_bat", + "chainsaw", + "cricket_bat", + "crowbar", + "didgeridoo", + "electric_guitar", + "fireaxe", + "frying_pan", + "golfclub", + "katana", + "machete", + "riotshield", + "tonfa", + "shovel", + "pitchfork" + }; + + for (int i = 0; i < sizeof(s_sOfficialMeleeWeaponNames); i++) { + if (strcmp(sMeleeName, s_sOfficialMeleeWeaponNames[i]) == 0) { + return true; + } + } + + return false; } bool IsValidClient(int client) { - return (client > 0 && client <= MaxClients); + return (client > 0 && client <= MaxClients); } bool IsTank(int client) { - return (IsValidClient(client) - && IsClientInGame(client) - && GetClientTeam(client) == TEAM_INFECTED - && GetEntProp(client, Prop_Send, "m_zombieClass") == TANK_ZOMBIE_CLASS - && IsPlayerAlive(client) - ); + return (IsValidClient(client) + && IsClientInGame(client) + && GetClientTeam(client) == TEAM_INFECTED + && GetEntProp(client, Prop_Send, "m_zombieClass") == TANK_ZOMBIE_CLASS + && IsPlayerAlive(client) + ); } stock bool StringToBool(const char[] str) { - int num; - if (StringToIntEx(str, num)) { - return num != 0; - } else if (strcmp(str, "true", false) == 0) { - return true; - } - - return false; + int num; + if (StringToIntEx(str, num)) { + return num != 0; + } else if (strcmp(str, "true", false) == 0) { + return true; + } + + return false; } void PrintDebug(MessageTypeFlag iType, const char[] Message, any ...) { - char DebugBuff[256]; - VFormat(DebugBuff, sizeof(DebugBuff), Message, 3); - - if (iType & eServerPrint) { - PrintToServer(DebugBuff); - } - - if (iType & ePrintChatAll) { - PrintToChatAll(DebugBuff); - } - - if (iType & eLogError) { - LogError(DebugBuff); - } -} + char DebugBuff[256]; + VFormat(DebugBuff, sizeof(DebugBuff), Message, 3); + + if (iType & eServerPrint) { + PrintToServer(DebugBuff); + } + + if (iType & ePrintChatAll) { + PrintToChatAll(DebugBuff); + } + + if (iType & eLogError) { + LogError(DebugBuff); + } +} \ No newline at end of file