View Single Post
sorallll
Senior Member
Join Date: Oct 2018
Old 01-14-2022 , 12:47   Re: [L4D2]Exclude projectiles that have been thrown
Reply With Quote #6

Quote:
Originally Posted by HarryPotter View Post
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);
            } 
Thanks, Harry Potter. Your first method should be what I need and will be much more efficient
sorallll is offline