View Single Post
NakashimaMakota
Junior Member
Join Date: Nov 2013
Old 11-07-2013 , 01:07   Re: [NMRiH] Weapon Menu (v1.0.1, 4/05/2013)
Reply With Quote #8

Ok, so I managed to get the ammo boxes into the menu however they throw this error:

Quote:
L 11/07/2013 - 036:44: [SM] Native "AcceptEntityInput" reported: Entity -1 (-1) is not a CBaseEntity
L 11/07/2013 - 036:44: [SM] Displaying call stack trace for plugin "weapon_menu.smx":
L 11/07/2013 - 036:44: [SM] [0] Line 372, weapon_menu.sp::Menu_Ammo()
This is the specific line:

Code:
public Menu_Ammo(Handle:ammo, MenuAction:action, param1, param2)
{
	if (action == MenuAction_End)
	{
        CloseHandle(ammo);
	}
	if (action == MenuAction_Select)
	{
		new String:info[32];
		GetMenuItem(ammo, param2, info, sizeof(info));
		
		for (new i = 0; i < g_iWeps; i++)
		{
			if (StrEqual(info, g_sWepNumbers[i]))
			{
				new weapon = GivePlayerItem(param1, g_sWepNames[i], 0);
				
				bPrimary[param1] = true;
				AcceptEntityInput(weapon, "use", param1, param1);
				
				PrintToChat2(param1, "%s You have selected the \x04%s\x01.", MESS, g_sWepDNames[i]);
			}
		}
	}
}
Also, giving players tools doesn't work, and didn't in the non-edited version, it always says they are only allowed 3 tools.

Last edited by NakashimaMakota; 11-07-2013 at 04:40.
NakashimaMakota is offline