AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   CSWeaponID for MP5SD(CS:GO)? (https://forums.alliedmods.net/showthread.php?t=312003)

Zeisen 11-11-2018 22:12

CSWeaponID for MP5SD(CS:GO)?
 
Hello,

I was scripting something for CS:GO server, and i found there isn't CSWeaponID for MP5SD. Is that SM developer's typo? or really CSWeaponID doesn't exists for MP5SD?

here's my code what i was scripting.
Code:

stock ZT_GetWeaponClassname(int weapon, char[] buffer, int maxlength)
{
        GetEntityClassname(weapon, buffer, maxlength);
       
        CSWeaponID wpId = ZT_GetWeaponType(weapon);
       
        switch (wpId)
        {
                case CSWeapon_USP_SILENCER:
                        strcopy(buffer, maxlength, "weapon_usp_silencer");
                case CSWeapon_CZ75A:
                        strcopy(buffer, maxlength, "weapon_cz575a");
                case CSWeapon_REVOLVER:
                        strcopy(buffer, maxlength, "weapon_revolver");
                case CSWeapon_MP5SD: // it doesn't exists!
                        strcopy(buffer, maxlength, "weapon_mp5sd");
                case CSWeapon_M4A1_SILENCER:
                        strcopy(buffer, maxlength, "weapon_m4a1_silencer");
        }
}

stock CSWeaponID ZT_GetWeaponType(int weaponIndex)
{
        return CS_ItemDefIndexToID(GetEntProp(weaponIndex, Prop_Send, "m_iItemDefinitionIndex"));
}


8guawong 11-11-2018 22:54

Re: CSWeaponID for MP5SD(CS:GO)?
 
CSWeapon_MP5NAVY?


All times are GMT -4. The time now is 01:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.