Raised This Month: $ Target: $400
 0% 

csdm_hold_many is not working???


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 05-13-2009 , 17:00   Re: csdm_hold_many is not working???
Reply With Quote #1

Since 2.0 You are not allowed anymore to have more than 1 weapon per slot:
Code:
bool:CanGetWeapon(id, wid, &ammo_via_offset)
{
	new slot = g_WeaponSlots[wid]

	ammo_via_offset = 0

	if(slot == 4) // grenade slot
	{
		new ammo; ammo = cs_get_user_bpammo(id, wid)
		switch(wid)
		{
			case CSW_HEGRENADE: {
				if(ammo >= g_iMaxNadesH)
					return false
				if(ammo >= g_MaxBPAmmo[CSW_HEGRENADE])
					ammo_via_offset = ammo + 1
			}
			case CSW_SMOKEGRENADE: {
				if(ammo >= g_iMaxNadesS)
					return false
				if(ammo >= g_MaxBPAmmo[CSW_SMOKEGRENADE])
					ammo_via_offset = ammo + 1
			}
			case CSW_FLASHBANG: {
				if(ammo >= g_iMaxNadesF)
					return false
				if(ammo >= g_MaxBPAmmo[CSW_FLASHBANG])
					ammo_via_offset = ammo + 1
			}
		}
	}
	else
	{
		new Weapons[MAX_WEAPONS], num
		
		get_user_weapons(id, Weapons, num)
		
		for(new i = 0; i < num; i++)
		{   // NOTE: player can have only one weapon per slot
			if (g_WeaponSlots[Weapons[i]] == slot)
				return false
			/*if(i == wid)
				return false*/
		}
	}
	return true
}
That means this feature is not supported anymore.
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
Reply



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 20:35.


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