Add weapon_bayonet to the list of blocked knives (#1758)
This commit is contained in:
parent
f8349e846a
commit
174bf307a2
@ -163,10 +163,10 @@ static cell_t GiveNamedItem(IPluginContext *pContext, const cell_t *params)
|
||||
char *pWeaponName;
|
||||
pContext->LocalToString(params[2], &pWeaponName);
|
||||
|
||||
// Don't allow knives other than weapon_knife, weapon_knifegg, and weapon_knife_t.
|
||||
// Don't allow knives other than weapon_knife, weapon_knifegg, and weapon_knife_t.
|
||||
// Others follow pattern weapon_knife_*
|
||||
size_t len = strlen(pWeaponName);
|
||||
if (len >= 14 && strnicmp(pWeaponName, "weapon_knife_", 13) == 0 && !(pWeaponName[13] == 't' && pWeaponName[14] == '\0'))
|
||||
if ((len >= 14 && strnicmp(pWeaponName, "weapon_knife_", 13) == 0 && !(pWeaponName[13] == 't' && pWeaponName[14] == '\0')) || (len == 14 && stricmp(pWeaponName, "weapon_bayonet") == 0))
|
||||
{
|
||||
return pContext->ThrowNativeError("Blocked giving of %s due to core.cfg option FollowCSGOServerGuidelines", pWeaponName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user