mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 16:43: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;
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue