mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 11:53:21 +00:00
Keep magnums and pistols
This commit is contained in:
parent
65a3af9ae0
commit
2f87a4e7ad
2 changed files with 8 additions and 6 deletions
Binary file not shown.
|
@ -743,12 +743,14 @@ public Action Event_OnWeaponDrop(int client, int weapon) {
|
||||||
if(!IsValidEntity(weapon) || !IsFakeClient(client)) return Plugin_Continue;
|
if(!IsValidEntity(weapon) || !IsFakeClient(client)) return Plugin_Continue;
|
||||||
static char wpn[32];
|
static char wpn[32];
|
||||||
GetEdictClassname(weapon, wpn, sizeof(wpn));
|
GetEdictClassname(weapon, wpn, sizeof(wpn));
|
||||||
if(StrEqual(wpn, "weapon_melee") && GetEntProp(client, Prop_Send, "m_humanSpectatorUserID") > 0) {
|
if(GetEntProp(client, Prop_Send, "m_humanSpectatorUserID") > 0) {
|
||||||
#if defined DEBUG
|
if(StrEqual(wpn, "weapon_melee") || StrEqual(wpn, "weapon_pistol") || StrEqual(wpn, "weapon_pistol_magnum")) {
|
||||||
PrintToServer("Bot %N dropped melee weapon %s", client, wpn);
|
#if defined DEBUG
|
||||||
#endif
|
PrintToServer("Bot %N dropped melee weapon %s", client, wpn);
|
||||||
RequestFrame(Frame_HideEntity, weapon);
|
#endif
|
||||||
botDropMeleeWeapon[client] = weapon;
|
RequestFrame(Frame_HideEntity, weapon);
|
||||||
|
botDropMeleeWeapon[client] = weapon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue