Raised This Month: $2 Target: $400
 0% 

Furien Weapons Playeri&Vip's


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aleku.
Junior Member
Join Date: May 2019
Location: Botosani
Old 06-26-2020 , 06:48   Furien Weapons Playeri&Vip's
Reply With Quote #1

Hello, you can do like this plugin,that the last 2 weapons are for VIP only?
But to see the weapons but not to be able to take them, to show them a message in the chat that he doesn't have access.


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

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

#define PLUGIN "ANTI-FURIEN Weapons CLASIC"
#define VERSION "1.0"
#define AUTHOR "50Cent # HackeR"



new bool:AidejaChoosen[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	// Add your code here...
	register_clcmd("say /weapons","ClcmdWeapons");
	
	RegisterHam(Ham_Spawn, "player", "Inceput_runda", 1);
}

public ClcmdWeapons(id) {
	if(AidejaChoosen[id] ) {
		ChatColor(id, "!t[Anti-furien Menu] Ai ales aceasta runda arma");
		return PLUGIN_HANDLED;
	}
	if( get_user_team( id ) == 2 ) {
		WeaponMenu(id)
	}
	return PLUGIN_HANDLED;
}

	 

public Inceput_runda(id) {
	if(is_user_alive(id)) {
		give_item(id, "weapon_knife");
		AidejaChoosen[id] = false;
		
		if(get_user_team(id) == 2) {
			WeaponMenu(id);
		}
	}
}

public WeaponMenu(id) {
	if(is_user_alive(id) && get_user_team(id) == 2) {
		new menu = menu_create ("Anti-furien Menu \r[Clasic Weapon]", "CaseWeaponMenu");
		
		menu_additem(menu, "Ak47", "1");
		menu_additem(menu, "M4a1", "2");
		menu_additem(menu, "M3", "3");
		menu_additem(menu, "M249", "4");
		menu_additem(menu, "MP5 Navy ", "5")
		menu_additem(menu, "XM1014 ", "6")
	

		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, menu, 0 );

	}
	else
	{
		ChatColor(id, "!g[AntiFurien Weapons] !yNu. poti alege arma cand esti mort");
	}
}



public CaseWeaponMenu(id, menu, item) {
	if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data [6], szName [64];
	new access, callback;
	menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
	new key = str_to_num (data);
	
	switch (key)
	{
		case 1:
		{
			give_item(id, "weapon_ak47");
			cs_set_user_bpammo(id, CSW_AK47,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi ales Ak47");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
		case 2:
		{
			give_item(id, "weapon_m4a1");
			cs_set_user_bpammo(id, CSW_M4A1,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi ales M4a1");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
		case 3:
		{
			give_item(id, "weapon_mp5navy");
			cs_set_user_bpammo(id, CSW_MP5NAVY,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi ales Mp5Navy");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
		case 4:
		{
			give_item(id, "weapon_xm1014");
			cs_set_user_bpammo(id, CSW_XM1014,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi ales Xm1014");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
		case 5:
		{
			give_item(id, "weapon_m3");
			cs_set_user_bpammo(id, CSW_M3,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi ales M3");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
		case 6:
		{
			give_item(id, "weapon_m249");
			cs_set_user_bpammo(id, CSW_M249,250);
			ChatColor(id, "!g[AntiFurien Weapons] !yAi Ales M249");
			set_task( 0.1, "PistolSpawn", id )
			AidejaChoosen[ id ] = true;
		}
	}
	
	menu_destroy (menu);
	return PLUGIN_HANDLED;
}


public PistolSpawn(id) {
	if(is_user_alive(id) && get_user_team(id) == 2) {
		new menu = menu_create ("Secundary \rWeapon", "CaseWeaponSecundar");
		
		menu_additem(menu, "Deagle", "1");
		menu_additem(menu, "Fiveseven", "2");
		menu_additem(menu, "Usp", "3");
		
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, menu, 0 );
	}
}

public CaseWeaponSecundar(id, menu, item) {
	if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data [6], szName [64];
	new access, callback;
	menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
	new key = str_to_num (data);
	
	switch (key)
	{
		case 1:
		{
			give_item(id, "weapon_deagle");
			cs_set_user_bpammo(id, CSW_DEAGLE, 50);
			AidejaChoosen[ id ] = true;
		}
		case 2:
		{
			give_item(id, "weapon_fiveseven");
			cs_set_user_bpammo(id, CSW_FIVESEVEN, 50);
			AidejaChoosen[ id ] = true;
		}
		case 3:
		{
			give_item(id, "weapon_usp");
			cs_set_user_bpammo(id, CSW_USP, 50);
			AidejaChoosen[ id ] = true;
		}
	}
	
	menu_destroy (menu);
	return PLUGIN_HANDLED;
}

stock ChatColor( id, String[ ], any:... ){
	new szMsg[ 190 ];
	vformat( szMsg, charsmax( szMsg ), String, 3 );
	
	replace_all( szMsg, charsmax( szMsg ), "!y", "^1" );
	replace_all( szMsg, charsmax( szMsg ), "!t", "^3" );
	replace_all( szMsg, charsmax( szMsg ), "!g", "^4" );
	
	static msgSayText = 0;
	static fake_user;
	
	if( !msgSayText )
	{
		msgSayText = get_user_msgid( "SayText" );
		fake_user = get_maxplayers( ) + 1;
	}
	
	message_begin( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgSayText, _, id );
	write_byte( id ? id : fake_user );
	write_string( szMsg );
	message_end( );
}
Aleku. is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-26-2020 , 09:15   Re: Furien Weapons Playeri&Vip's
Reply With Quote #2

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

#define FLAG_VIP "t"

#define PLUGIN "ANTI-FURIEN Weapons CLASIC"
#define VERSION "1.0"
#define AUTHOR "50Cent # HackeR"



new bool:AidejaChoosen[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
register_clcmd("say /weapons","ClcmdWeapons");
    
    
RegisterHam(Ham_Spawn"player""Inceput_runda"1);
}

public 
ClcmdWeapons(id) {
    if(
AidejaChoosen[id] ) {
        
ChatColor(id"!t[Anti-furien Menu] Ai ales aceasta runda arma");
        return 
PLUGIN_HANDLED;
    }
    if( 
get_user_teamid ) == ) {
        
WeaponMenu(id)
    }
    return 
PLUGIN_HANDLED;
}

     

public 
Inceput_runda(id) {
    if(
is_user_alive(id)) {
        
give_item(id"weapon_knife");
        
AidejaChoosen[id] = false;
        
        if(
get_user_team(id) == 2) {
            
WeaponMenu(id);
        }
    }
}

public 
WeaponMenu(id) {
    if(
is_user_alive(id) && get_user_team(id) == 2) {
        new 
menu menu_create ("Anti-furien Menu \r[Clasic Weapon]""CaseWeaponMenu");
        
        
menu_additem(menu"Ak47""1");
        
menu_additem(menu"M4a1""2");
        
menu_additem(menu"M3""3");
        
menu_additem(menu"M249""4");

        if(
has_flag(idFLAG_VIP))
        {
            
menu_additem(menu"MP5 Navy ""5");
            
menu_additem(menu"XM1014 ""6");
        }
        else
        {
            
menu_additem(menu"\dMP5 Navy ""5");
            
menu_additem(menu"\dXM1014 ""6");
        }
    

        
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
menu_display(idmenu);

    }
    else
    {
        
ChatColor(id"!g[AntiFurien Weapons] !yNu. poti alege arma cand esti mort");
    }
}



public 
CaseWeaponMenu(idmenuitem) {
    if(
item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data [6], szName [64];
    new 
accesscallback;
    
menu_item_getinfo (menuitemaccessdata,charsmax (data), szName,charsmax (szName), callback);
    new 
key str_to_num (data);
    
    switch (
key)
    {
        case 
1:
        {
            
give_item(id"weapon_ak47");
            
cs_set_user_bpammo(idCSW_AK47,250);
            
ChatColor(id"!g[AntiFurien Weapons] !yAi ales Ak47");
            
set_task0.1"PistolSpawn"id )
            
AidejaChoosenid ] = true;
        }
        case 
2:
        {
            
give_item(id"weapon_m4a1");
            
cs_set_user_bpammo(idCSW_M4A1,250);
            
ChatColor(id"!g[AntiFurien Weapons] !yAi ales M4a1");
            
set_task0.1"PistolSpawn"id )
            
AidejaChoosenid ] = true;
        }
        case 
3:
        {
            
give_item(id"weapon_mp5navy");
            
cs_set_user_bpammo(idCSW_MP5NAVY,250);
            
ChatColor(id"!g[AntiFurien Weapons] !yAi ales Mp5Navy");
            
set_task0.1"PistolSpawn"id )
            
AidejaChoosenid ] = true;
        }
        case 
4:
        {
            
give_item(id"weapon_xm1014");
            
cs_set_user_bpammo(idCSW_XM1014,250);
            
ChatColor(id"!g[AntiFurien Weapons] !yAi ales Xm1014");
            
set_task0.1"PistolSpawn"id )
            
AidejaChoosenid ] = true;
        }
        case 
5:
        {
            if(
has_flag(idFLAG_VIP))
            {
                
give_item(id"weapon_m3");
                
cs_set_user_bpammo(idCSW_M3,250);
                
ChatColor(id"!g[AntiFurien Weapons] !yAi ales M3");
                
set_task0.1"PistolSpawn"id )
                
AidejaChoosenid ] = true;
            }
            else
            {
                
ChatColor(id"!g[AntiFurien Weapons] !yVIP Only!");
                
WeaponMenu(id);
            }
        }
        case 
6:
        {
            if(
has_flag(idFLAG_VIP))
            {
                
give_item(id"weapon_m249");
                
cs_set_user_bpammo(idCSW_M249,250);
                
ChatColor(id"!g[AntiFurien Weapons] !yAi Ales M249");
                
set_task0.1"PistolSpawn"id )
                
AidejaChoosenid ] = true;
            }
            else
            {
                
ChatColor(id"!g[AntiFurien Weapons] !yVIP Only!");
                
WeaponMenu(id);
            }
        }
    }
    
    
menu_destroy (menu);
    return 
PLUGIN_HANDLED;
}


public 
PistolSpawn(id) {
    if(
is_user_alive(id) && get_user_team(id) == 2) {
        new 
menu menu_create ("Secundary \rWeapon""CaseWeaponSecundar");
        
        
menu_additem(menu"Deagle""1");
        
menu_additem(menu"Fiveseven""2");
        
menu_additem(menu"Usp""3");
        
        
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
menu_display(idmenu);
    }
}

public 
CaseWeaponSecundar(idmenuitem) {
    if(
item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data [6], szName [64];
    new 
accesscallback;
    
menu_item_getinfo (menuitemaccessdata,charsmax (data), szName,charsmax (szName), callback);
    new 
key str_to_num (data);
    
    switch (
key)
    {
        case 
1:
        {
            
give_item(id"weapon_deagle");
            
cs_set_user_bpammo(idCSW_DEAGLE50);
            
AidejaChoosenid ] = true;
        }
        case 
2:
        {
            
give_item(id"weapon_fiveseven");
            
cs_set_user_bpammo(idCSW_FIVESEVEN50);
            
AidejaChoosenid ] = true;
        }
        case 
3:
        {
            
give_item(id"weapon_usp");
            
cs_set_user_bpammo(idCSW_USP50);
            
AidejaChoosenid ] = true;
        }
    }
    
    
menu_destroy (menu);
    return 
PLUGIN_HANDLED;
}

stock ChatColoridString[ ], any:... ){
    new 
szMsg190 ];
    
vformatszMsgcharsmaxszMsg ), String);
    
    
replace_allszMsgcharsmaxszMsg ), "!y""^1" );
    
replace_allszMsgcharsmaxszMsg ), "!t""^3" );
    
replace_allszMsgcharsmaxszMsg ), "!g""^4" );
    
    static 
msgSayText 0;
    static 
fake_user;
    
    if( !
msgSayText )
    {
        
msgSayText get_user_msgid"SayText" );
        
fake_user get_maxplayers( ) + 1;
    }
    
    
message_beginid MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText_id );
    
write_byteid id fake_user );
    
write_stringszMsg );
    
message_end( );

You change VIP flag on the top of the plugin here:
PHP Code:
#define FLAG_VIP "t" 
__________________
Private Work! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
Aleku.
Junior Member
Join Date: May 2019
Location: Botosani
Old 06-26-2020 , 10:45   Re: Furien Weapons Playeri&Vip's
Reply With Quote #3

Thanks you!

T/C
Aleku. is offline
Reply


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 11:00.


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