View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 03-29-2024 , 19:30   Re: [L4D2]Exclude projectiles that have been thrown
Reply With Quote #7

Found more efficient way today, thanks to Forgetest

PHP Code:
    int grenade GetPlayerWeaponSlot(client2);
    
int iPrimaryAmmoType GetEntProp(grenadeProp_Send"m_iPrimaryAmmoType");
    
int iAmmo GetEntData(clientFindSendPropInfo("CCSPlayer""m_iAmmo") + iPrimaryAmmoType*4);
    
PrintToChatAll("m_iAmmo %d"iAmmo);
    if(
iAmmo == 0)
    {
        
PrintToChatAll("%d has been thrown"grenade);
    } 
__________________
HarryPotter is offline