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"));
}