View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-14-2022 , 12:03   Re: [L4D2]Exclude projectiles that have been thrown
Reply With Quote #5

Detect projectiles that have been thrown.
PHP Code:
    int weapon GetPlayerWeaponSlot(client2);
    if (
weapon && 
        
GetEntPropEnt(clientProp_Data"m_hActiveWeapon") == weapon && 
        
GetEntPropFloat(weaponProp_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(client2);
            if( 
weapon != -)
            {
                
// PrintToChatAll("Exploit Blocked: %N", client);
                
RemovePlayerItem(clientweapon);
                
RemoveEntity(weapon);
            } 
__________________

Last edited by HarryPotter; 01-14-2022 at 12:09.
HarryPotter is offline