Quote:
Originally Posted by ConnorMcLeod
If you want to set model when player gonna drop that weapon, then you have to check weapon that is hold by the created weaponbox, with get_pdata_cbase (there is a stock somewhere)
|
Made by you...
https://forums.alliedmods.net/showpo...&postcount=134
PHP Code:
GetWeaponBoxProps( ent, &weapon, &weaponType, &ammoCount, ammoName[], len )
{
for(new i = 1; i<= 5; i++)
{
weapon = get_pdata_cbase(ent, m_rgpPlayerItems_CWeaponBox[i], XO_CWEAPONBOX);
if( weapon > 0 )
{
break;
}
}
if( weapon > 0 )
{
weaponType = get_pdata_int(weapon, m_iId, XO_CBASEPLAYERWEAPON);
}
else
{
weaponType = 0;
}
ammoCount = get_pdata_int(ent, m_rgAmmo_CWeaponBox[1], XO_CWEAPONBOX);
if( ammoCount )
{
global_get(glb_pStringBase, get_pdata_int(ent, m_rgiszAmmo[1], XO_CWEAPONBOX), ammoName, len);
}
}
__________________