View Single Post
root88
Senior Member
Join Date: May 2016
Old 12-18-2018 , 06:10   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #2113

Temp fix in case someone is using this version in CSGO and also weapon_snowball / sv_holiday_mode 2 or from last update and have logs spammed:
in restrictinc/weapon-tracking.sp change CSWeaponID to:
PHP Code:
CSWeaponID GetWeaponIDFromEnt(int entity)
{
    if(!
IsValidEdict(entity))
        return 
CSWeapon_NONE;
    
    
char classname[64]; 
    
GetEntityClassname(entityclassnamesizeof classname); 
    if(
StrEqual(classname"weapon_snowball"))
    {
        return 
CSWeapon_NONE;
    }
    
    
int index hWeaponTracker.FindValue(entityTracker_EntityIndex);
    
    if(
index != -1)
    {
        return 
hWeaponTracker.Get(indexTracker_WeaponIDIndex);
    }
    
    return 
CSWeapon_NONE;

__________________
root88 is offline