Raised This Month: $12 Target: $400
 3% 

CSWeaponID for MP5SD(CS:GO)?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zeisen
Member
Join Date: Nov 2016
Location: Republic of Korea
Old 11-11-2018 , 22:12   CSWeaponID for MP5SD(CS:GO)?
Reply With Quote #1

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

Last edited by Zeisen; 11-11-2018 at 22:12.
Zeisen is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-11-2018 , 22:54   Re: CSWeaponID for MP5SD(CS:GO)?
Reply With Quote #2

CSWeapon_MP5NAVY?
__________________
8guawong is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:27.


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