Keep magnums and pistols

This commit is contained in:
Jackz 2022-07-30 22:17:31 -05:00
parent 65a3af9ae0
commit 2f87a4e7ad
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
2 changed files with 8 additions and 6 deletions

Binary file not shown.

View file

@ -743,12 +743,14 @@ public Action Event_OnWeaponDrop(int client, int weapon) {
if(!IsValidEntity(weapon) || !IsFakeClient(client)) return Plugin_Continue;
static char wpn[32];
GetEdictClassname(weapon, wpn, sizeof(wpn));
if(StrEqual(wpn, "weapon_melee") && GetEntProp(client, Prop_Send, "m_humanSpectatorUserID") > 0) {
#if defined DEBUG
PrintToServer("Bot %N dropped melee weapon %s", client, wpn);
#endif
RequestFrame(Frame_HideEntity, weapon);
botDropMeleeWeapon[client] = weapon;
if(GetEntProp(client, Prop_Send, "m_humanSpectatorUserID") > 0) {
if(StrEqual(wpn, "weapon_melee") || StrEqual(wpn, "weapon_pistol") || StrEqual(wpn, "weapon_pistol_magnum")) {
#if defined DEBUG
PrintToServer("Bot %N dropped melee weapon %s", client, wpn);
#endif
RequestFrame(Frame_HideEntity, weapon);
botDropMeleeWeapon[client] = weapon;
}
}
return Plugin_Continue;
}