View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-09-2018 , 10:39   Re: weaponbox/armoury_entity Touch
Reply With Quote #21

Quote:
Originally Posted by HamletEagle View Post
Code:
I: g_szValues = "ARM_MP5"
	iValue = ARM_MP5
	.
	.
	.
	iValue = ARM_SMOKEGRENADE // 18
	
II: g_szValues = "ARM_TMP"
	iValue = ARM_MP5
	.
	.
	.
	iValue = ARM_SMOKEGRENADE // 18
You are setting for the same key all possible indexes, one after another. That's why you get only the last one. Get rid of the second for.

And do something like this:
PHP Code:
new const Values[][] =
{
    
ARM_MP5,
    
ARM_TMP,
    
ARM_P90,
    
ARM_MAC10,
    
ARM_AK47,
    
ARM_SG552,
    
ARM_M4A1,
    
ARM_AUG,
    
ARM_SCOUT,
    
ARM_G3SG1,
    
ARM_AWP,
    
ARM_M3,
    
ARM_XM1014,
    
ARM_M249,
    
ARM_FLASHBANG,
    
ARM_HEGRENADE,
    
ARM_KEVLAR,
    
ARM_ASSAULT,
    
ARM_SMOKEGRENADE
}

TrieSetCellg_tWeaponTrieg_szValues], Values[i]); 
Thanks so much, by the way you have to change
Code:
new const Values[][]
to
Code:
new const Values[] =

Any idea why armoury_entity entities have less BackPack Ammo as usual? AK47 and M4A1 have 60. It's okay as I'm gonna modify it

Thanks again!
__________________

Last edited by edon1337; 01-09-2018 at 10:44.
edon1337 is offline