Raised This Month: $ Target: $400
 0% 

Need Vip plugin awp+deagle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 12-14-2011 , 16:13   Re: Need Vip plugin awp+deagle
Reply With Quote #1

Well, i just made it anyways


/Description\
This plugin makes it so if have the H flag (can be changed) a menu pops up
in three seconds of the round start. In the menu there is "M4A1 - Deagle", "AK47 - Deagle" and "AWP - Deagle".
If you press for example "M4A1 - Deagle" You will get a m4a1 and a deagle.

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>

public plugin_init() 
{
	register_plugin("VIPGunmenu", "0.1", "Ex1ne")
	RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1);
}

public Fwd_PlayerSpawn_Post(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
        {
		return PLUGIN_HANDLED
	}
	set_task(3.0, "VipMenu", id)
	return PLUGIN_CONTINUE
}
public VipMenu(id)
{
	new szText[555 char]
	formatex(szText, charsmax(szText), "\yVIP-Menu!")
	new VipMenu = menu_create(szText, "VipMenuHandle")
	
	formatex(szText, charsmax(szText), "\rM4A1 + Deagle.")
	menu_additem(VipMenu, szText, "1", 0)
	formatex(szText, charsmax(szText), "\rAK47 + Deagle.")
	menu_additem(VipMenu, szText, "2", 0)
	formatex(szText, charsmax(szText), "\rAWP + Deagle.")
	menu_additem(VipMenu, szText, "3", 0)
	
	menu_setprop(VipMenu, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, VipMenu, 0)
	
	return PLUGIN_HANDLED
}

public VipMenuHandle(id, menu, item)
{
	if(item == MENU_EXIT)
	{
		menu_destroy(menu)
		return PLUGIN_HANDLED
	}
	new data[6], iName[64], access, callback
	menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback )
	new key = str_to_num(data)
	
	switch(key)
	{
		case 1: HandleM4Menu(id)
		case 2: HandleAKMenu(id)
		case 3: HandleAwpMenu(id)
	}
	return PLUGIN_HANDLED
}

public HandleM4Menu(id)
{
	if(!is_user_alive(id))
	{
		return PLUGIN_HANDLED
	}
	give_item(id, "weapon_m4a1")
	give_item(id, "weapon_deagle")
	cs_set_user_bpammo(id, CSW_M4A1, 90)
	cs_set_user_bpammo(id, CSW_DEAGLE, 35)
	return PLUGIN_HANDLED
}

public HandleAKMenu(id)
{
	if(!is_user_alive(id))
	{
		return PLUGIN_HANDLED
	}
	give_item(id, "weapon_ak47")
	give_item(id, "weapon_deagle")
	cs_set_user_bpammo(id, CSW_AK47, 90)
	cs_set_user_bpammo(id, CSW_DEAGLE, 35)
	return PLUGIN_HANDLED
}

public HandleAwpMenu(id)
{
	if(!is_user_alive(id))
	{
		return PLUGIN_HANDLED
	}
	give_item(id, "weapon_awp")
	give_item(id, "weapon_deagle")
	cs_set_user_bpammo(id, CSW_AWP, 30)
	cs_set_user_bpammo(id, CSW_DEAGLE, 35)
	return PLUGIN_HANDLED
}

Last edited by Ex1ne; 12-14-2011 at 16:23. Reason: text :P
Ex1ne is offline
tembeluu
Member
Join Date: Jan 2019
Location: London
Old 02-08-2019 , 13:01   Re: Need Vip plugin awp+deagle
Reply With Quote #2

Can someone help me with this ? The plugin works fine. Which is the issues..If i choise an weapon from menu (1 ,2 or 3) and if I already have one, is not dropped ..so i can have more weapons..i don't want that! to be normal (knife, gun , weapon , no more.)! so if i choise from menu , and i got one in my hands i want to be dropped automatically, to be replaced with what i choise.
__________________
SarmaLe.LaLeagane.Ro - New Classic Server !
tembeluu 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:52.


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