View Single Post
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 12-11-2018 , 04:41   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #2112

Quote:
Originally Posted by root88 View Post
You were very helpful, thanks. So f****** helpful! If you refuse to support your plugin after updates I think it should be unapproved. Am I wrong?
Temp fix in case someone is using new items (tested only with breach charge):
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_melee") || StrEqual(classname"weapon_breachcharge") || StrEqual(classname"weapon_axe") || StrEqual(classname"weapon_hammer") || StrEqual(classname"weapon_spanner") || StrEqual(classname"weapons_fists"))
    {
        return 
CSWeapon_NONE;
    }
    
    
int index hWeaponTracker.FindValue(entityTracker_EntityIndex);
    
    if(
index != -1)
    {
        return 
hWeaponTracker.Get(indexTracker_WeaponIDIndex);
    }
    
    return 
CSWeapon_NONE;

Since you want to be a smart ass. The error you posted doesn’t match the SM 1.9 version. So if you are using the sm 1.9 version fucking mention that. Also, considering the update happened less than a week ago and I didn’t update it I wonder what other plugins should be unapproved. I’ve maintained this plugin for over 9 years so clearly I must update it within 24 hours.

Oh, yea, https://github.com/alliedmodders/sourcemod/pull/929

Shockingly i already was working on it.

The error if you’re actually using SM 1.9 version is in csweapons_isvalidid since it doesn’t check against the enum to see if the id is greater than the max.

Last edited by asherkin; 12-11-2018 at 07:58. Reason: :3
Dr!fter is offline