Raised This Month: $ Target: $400
 0% 

Plugin Vip Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Trollface112
Junior Member
Join Date: Sep 2021
Old 11-15-2022 , 17:20   Plugin Vip Menu
Reply With Quote #1

Hello,

I want this vip menu to show me only ADMIN_BAN_TEMP because i have one plugin VIP for flag T

I have "abcdefghijlmnopqrstu" and i see this menu but i dont want this, I want it to appear only at ADMIN_BAN_TEMP

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

#define PLUGIN "Vip GunMenu"
#define VERSION "1.0"
#define AUTHOR "SenaTor"

#define ADMIN_ACCESS ADMIN_BAN_TEMP
new bool:imaC4[ 33 ];

new menu;

new cvar_second;

public plugin_init()
{
register_plugin("Gun Menu", "1.0", "26-{indra}")
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)

cvar_second = register_cvar("Show_Menu_seconds", "0")

}
public fw_PlayerSpawn_Post(id)
{ 
if (!is_user_alive(id))
return;

set_task(get_pcvar_float(cvar_second), "Vip_menu", id)
}

public Vip_menu(id)
{
if (!is_user_alive(id) & ADMIN_BAN_TEMP)
return

new flags = get_user_flags(id)

menu = menu_create("[VIP \r[Gun] \wMenu]", "VIP_handler")



if(flags & ADMIN_BAN_TEMP)
menu_additem( menu, "\w[M4A1] \y+ \wDeagle \y+ \wGrenades", "", ADMIN_ACCESS)
else
menu_additem( menu, "\d[M4A1] + Deagle + Grenades", "", ADMIN_ACCESS)



if(flags & ADMIN_BAN_TEMP)
menu_additem( menu, "\w[AK47] \y+ \wDeagle \y+ \wGrenades", "", ADMIN_ACCESS)
else
menu_additem( menu, "\d[AK47] + Deagle + Grenades", "", ADMIN_ACCESS)



menu_display(id, menu, 0)
}
public VIP_handler(id, EXIT, item)
{
if (!is_user_alive(id))
return PLUGIN_HANDLED 

if(item == MENU_EXIT)
{
menu_destroy(EXIT);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
			if( !is_user_alive( id ) ) 
				return PLUGIN_CONTINUE;
			else {
				
				if( user_has_weapon( id, CSW_C4 ) && get_user_team( id ) == 1 )
					imaC4[ id ] = true;
				else
					imaC4[ id ] = false;
					
				strip_user_weapons( id );
        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);
        give_item(id,"weapon_knife");
        give_item(id, "weapon_hegrenade");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
        give_item(id, "item_kevlar");
        give_item(id, "item_assaultsuit");
				
				if( imaC4[ id ] ) {
					
					give_item( id, "weapon_c4" );
					cs_set_user_plant( id );
			}
		}
}
case 1:
{
			if( !is_user_alive( id ) ) 
				return PLUGIN_CONTINUE;
			else {
				
				if( user_has_weapon( id, CSW_C4 ) && get_user_team( id ) == 1 )
					imaC4[ id ] = true;
				else
					imaC4[ id ] = false;
					
				strip_user_weapons( id );
        give_item(id, "weapon_ak47");
        cs_set_user_bpammo(id, CSW_AK47, 90);
        give_item(id, "weapon_deagle");
        cs_set_user_bpammo(id, CSW_DEAGLE, 35);
        give_item(id,"weapon_knife");
        give_item(id, "weapon_hegrenade");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
        give_item(id, "item_kevlar");
        give_item(id, "item_assaultsuit");
				
				if( imaC4[ id ] ) {
					
					give_item( id, "weapon_c4" );
					cs_set_user_plant( id );
			}
		}
}


}
return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1256\\ deff0\\ deflang1065{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ f0\\ fs10 \n\\ par }
*/

Last edited by Trollface112; 11-15-2022 at 17:21.
Trollface112 is offline
 


Thread Tools
Display Modes

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 15:43.


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