Detect projectiles that have been thrown.
PHP Code:
int weapon = GetPlayerWeaponSlot(client, 2);
if (weapon > 0 &&
GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon") == weapon &&
GetEntPropFloat(weapon, Prop_Data, "m_flNextPrimaryAttack") >= GetGameTime())
{
// slot 2 is throwable
}
or
use
Exploit Fix - Unlimited Grenades by Silvers.
Silvers instantly removes player's slot 2 throwable item when player throws a projectile
PHP Code:
int weapon = GetPlayerWeaponSlot(client, 2);
if( weapon != -1 )
{
// PrintToChatAll("Exploit Blocked: %N", client);
RemovePlayerItem(client, weapon);
RemoveEntity(weapon);
}
__________________