TotalModzHD
Veteran
- Messages
- 3
- Reaction score
- 3
- Points
- 553
So I have been trying (and failing) to get this menu I'm making to list the weapons automatically via an array. Problem is, the weapon name is blank in the menu but if I click the option it will still give the weapon. Below is what my script looks like right now.
It's based on CabCon's menu base so the first parameter of addOpt is the menu to add the option to, the second is the string (which is where the problem is), the third is the function to call and the fourth is the arguments to pass to the function.
Code:
standard = GetArrayKeys(level.zombie_weapons);
for(i = 0; i < standard.size; i++)
{
self addOpt("standard", standard[i], &zm_weapons::weapon_give, standard[i]);
}
It's based on CabCon's menu base so the first parameter of addOpt is the menu to add the option to, the second is the string (which is where the problem is), the third is the function to call and the fourth is the arguments to pass to the function.