View Single Post
Author Message
Visan15
Junior Member
Join Date: Apr 2012
Old 05-15-2024 , 15:54   [REQ] Weapons menu
Reply With Quote #1

Hello , i found this plugin made by OciXCrom and i want to do few settings if somebody can help.

P.S original had AWP as well but i deleted.

Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

new g_iMenu

public plugin_init()
{
	register_plugin("Weapons Menu", "1.0", "OciXCrom")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
	CreateMenu()
}

CreateMenu()
{
	g_iMenu = menu_create("Select your \rweapons\y!", "Menu_Handler")
	menu_additem(g_iMenu, "\wAK47 \y+ \wDeagle")
	menu_additem(g_iMenu, "\wM4A1 \y+ \wDeagle")
	
}

public OnPlayerSpawn(id)
{
	if(!is_user_alive(id))
		return

	menu_display(id, g_iMenu)
}

public Menu_Handler(id, iMenu, iItem)
{
	switch(iItem)
	{
		case MENU_EXIT: return
		case 0:
		{
			give_item(id, "weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90)
		}
		case 1:
		{
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90)
		}
		
	}

	give_item(id, "weapon_deagle")
	cs_set_user_bpammo(id, CSW_DEAGLE, 35)

	

	if(cs_get_user_team(id) == CS_TEAM_CT)
		give_item(id, "item_thighpack")
}

1. Menu weapons last for 10s
2. You can't carry more then 1 primary and 1 secondary wep. (now you can have 2-3 primary).

Or if exist a similar plugin , can somebody link me ? already had a lot of search on google.

Thank you .

Last edited by Visan15; 06-12-2024 at 13:26.
Visan15 is offline