Cerere plugin VIP cu arme GOLD

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
# DeaLeR.
Super moderator
Super moderator
Posts: 1501
Joined: 13 Feb 2016, 16:52
Detinator Steam: Da
CS Status: Connection lost
Reputatie: Super moderator
Fost Membru Club eXtreamCS ( o luna )
Fond eXtream: 0
Location: Mediaş, Sibiu, România
Has thanked: 1 time
Been thanked: 1 time
Contact:

30 Nov 2018, 11:18

Plugin Cerut: VIP cu arme GOLD
Descriere (adica ce face el mai exact): Salutare!
Aș dori un plugin VIP pentru modul clasic cu următoarele beneficii:

1) Meniu cu arme (rundă de rundă)
a) M4A1 + Deagle (GOLD)
b) AK47 + Deagle (GOLD)
c) AWP + Deagle (GOLD)
* Modelele le am eu.

2) Grenade gratuite (rundă de rundă)
3) Să aibe tag „VIP” acolo unde arată scorul, decese etc.
4) Să se deschidă un motd (.html) cu detalii despre VIP. Motd-ul îl fac eu, verau doar să adăugați comanda ca atunci când dau /vipinfo să se deschidă motd-ul.

Serverul ruleaza (HLDS/ReHLDS): reHLDS
Versiune AMX Mod X: -
Modul Serverului: -



P.S: Am tot căutat dar nu am găsit ceea ce vreau eu. Țin foarte mult să am plugin VIP cu arme gold. Dacă e să nu fi văzut ceva lăsați un reply cu link și mă uit. :)

Thanks! :ok_hand_tone2:
Last edited by Rainq on 11 Jan 2019, 17:56, edited 1 time in total.
Reason: Editat dupa model
Găzduire web SSD de viteză de protecție DDoS ARBOR la super prețuri!

ImageImage

Image
Mare companie și dark(aka)host-ul ăsta, engleză învățată din meme-uri.

Image
Olium
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2906
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 242 times
Been thanked: 138 times
Contact:

03 Dec 2018, 18:53

pluginuri-extream/vip-t225547.html

Daca vrea cineva sa-ti puna armele gold.

Sunt sigur ca este undeva pe forum un plugin exact cu ce ai cerut tu. Facut de mine si altele. Cauta pe la mine prin posturile vechi daca ai timp ca-s 99% sigur ca am facut asa ceva pe undeva. Eu n-am timp sa caut.
Contact: Activitate scazuta.
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 776
Joined: 11 Oct 2013, 10:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 46 times
Been thanked: 123 times
Contact:

04 Dec 2018, 02:53

Testeaza | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )


#define VIP_ACCESS		ADMIN_LEVEL_H


new const vGoldenAk[ 64 ] = "models/v_golden_ak47.mdl";
new const pGoldenAk[ 64 ] = "models/p_golden_ak47.mdl";

new const vGoldenM4[ 64 ] = "models/v_golden_m4a1.mdl";
new const pGoldenM4[ 64 ] = "models/p_golden_m4a1.mdl";

new const vGoldenAWP[ 64 ] = "models/v_golden_mp5.mdl";
new const pGoldenAWP[ 64 ] = "models/p_golden_mp5.mdl";

new const vGDeagle[ 64 ] = "models//v_golden_deagle.mdl";
new const pGDeagle[ 64 ] = "models/p_golden_deagle.mdl";


new bool: HaveWeapon[ 33 ];
new bool: AreGoldenAK[ 33 ];
new bool: AreGoldenM4[ 33 ];
new bool: AreGoldenAWP[ 33 ];
new bool: AreGoldenD[ 33 ];


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{
	//-- | Arme Gold | --//
	precache_model( vGoldenAk );
	precache_model( pGoldenAk );
	precache_model( vGoldenM4 );
	precache_model( pGoldenM4 );
	precache_model( vGoldenAWP );
	precache_model( pGoldenAWP );
	precache_model( vGDeagle );
	precache_model( pGDeagle );
	
}

public Spawn ( id )
{
	AreGoldenAK[ id ] = false;
	AreGoldenM4[ id ] = false;
	AreGoldenAWP[ id ] = false;
	HaveWeapon[ id ] = false;
	AreGoldenD[ id ] = false;
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
}

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && AreGoldenAK[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAk )
		set_pev( id, pev_weaponmodel2, pGoldenAk )
	}
	
	if( Arma == CSW_M4A1 && AreGoldenM4[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenM4 )
		set_pev( id, pev_weaponmodel2, pGoldenM4 )
	}
	
	if( Arma == CSW_AWP && AreGoldenAWP[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAWP )
		set_pev( id, pev_weaponmodel2, pGoldenAWP )
	}
	
	if ( Arma == CSW_DEAGLE && AreGoldenD [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vGDeagle );
		set_pev ( id, pev_weaponmodel2, pGDeagle );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )
	
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] ", "1", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] - \d( Only VIP )", "1", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] ", "2", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] - \d( Only VIP )", "2", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] ", "3", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] - \d( Only VIP )", "3", 0 )
	}
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) 
	{
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) 
	{
		case 0 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAk );
				set_pev( id, pev_weaponmodel2, pGoldenAk );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = true;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 1 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_m4a1");
				cs_set_user_bpammo( id, CSW_M4A1, 90 );
				set_pev( id, pev_viewmodel2, vGoldenM4 );
				set_pev( id, pev_weaponmodel2, pGoldenM4 );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = true;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 2 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_mp5navy");
				cs_set_user_bpammo( id, CSW_AWP, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAWP );
				set_pev( id, pev_weaponmodel2, pGoldenAWP );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = true;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
	}
	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" );
		return 
	}
	
	if( HaveWeapon[ id ] ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );
		return 
	}
	VipMenuCMD( id );
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
User avatar
Diversity
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 483
Joined: 02 Nov 2014, 18:21
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Scripter eXtreamCS
Fost Membru Club eXtreamCS (doua luni)
Nume anterior: IIiFF
Fond eXtream: 0
Has thanked: 16 times
Been thanked: 3 times

04 Dec 2018, 03:41

Truth* wrote:
Testeaza | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )


#define VIP_ACCESS		ADMIN_LEVEL_H


new const vGoldenAk[ 64 ] = "models/v_golden_ak47.mdl";
new const pGoldenAk[ 64 ] = "models/p_golden_ak47.mdl";

new const vGoldenM4[ 64 ] = "models/v_golden_m4a1.mdl";
new const pGoldenM4[ 64 ] = "models/p_golden_m4a1.mdl";

new const vGoldenAWP[ 64 ] = "models/v_golden_mp5.mdl";
new const pGoldenAWP[ 64 ] = "models/p_golden_mp5.mdl";

new const vGDeagle[ 64 ] = "models//v_golden_deagle.mdl";
new const pGDeagle[ 64 ] = "models/p_golden_deagle.mdl";


new bool: HaveWeapon[ 33 ];
new bool: AreGoldenAK[ 33 ];
new bool: AreGoldenM4[ 33 ];
new bool: AreGoldenAWP[ 33 ];
new bool: AreGoldenD[ 33 ];


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{
	//-- | Arme Gold | --//
	precache_model( vGoldenAk );
	precache_model( pGoldenAk );
	precache_model( vGoldenM4 );
	precache_model( pGoldenM4 );
	precache_model( vGoldenAWP );
	precache_model( pGoldenAWP );
	precache_model( vGDeagle );
	precache_model( pGDeagle );
	
}

public Spawn ( id )
{
	AreGoldenAK[ id ] = false;
	AreGoldenM4[ id ] = false;
	AreGoldenAWP[ id ] = false;
	HaveWeapon[ id ] = false;
	AreGoldenD[ id ] = false;
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
}

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && AreGoldenAK[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAk )
		set_pev( id, pev_weaponmodel2, pGoldenAk )
	}
	
	if( Arma == CSW_M4A1 && AreGoldenM4[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenM4 )
		set_pev( id, pev_weaponmodel2, pGoldenM4 )
	}
	
	if( Arma == CSW_AWP && AreGoldenAWP[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAWP )
		set_pev( id, pev_weaponmodel2, pGoldenAWP )
	}
	
	if ( Arma == CSW_DEAGLE && AreGoldenD [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vGDeagle );
		set_pev ( id, pev_weaponmodel2, pGDeagle );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )
	
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] ", "1", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] - \d( Only VIP )", "1", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] ", "2", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] - \d( Only VIP )", "2", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] ", "3", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] - \d( Only VIP )", "3", 0 )
	}
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) 
	{
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) 
	{
		case 0 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAk );
				set_pev( id, pev_weaponmodel2, pGoldenAk );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = true;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 1 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_m4a1");
				cs_set_user_bpammo( id, CSW_M4A1, 90 );
				set_pev( id, pev_viewmodel2, vGoldenM4 );
				set_pev( id, pev_weaponmodel2, pGoldenM4 );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = true;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 2 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_mp5navy");
				cs_set_user_bpammo( id, CSW_AWP, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAWP );
				set_pev( id, pev_weaponmodel2, pGoldenAWP );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = true;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
	}
	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" );
		return 
	}
	
	if( HaveWeapon[ id ] ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );
		return 
	}
	VipMenuCMD( id );
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}

mai bine asa | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*/Filip" 


#define VIP_ACCESS		ADMIN_LEVEL_H  

new const Models[][] = {
	"models/v_golden_ak47.mdl",
	"models/p_golden_ak47.mdl",
	"models/v_golden_m4a1.mdl",
	"models/p_golden_m4a1.mdl",
	"models/v_golden_mp5.mdl",
	"models/p_golden_mp5.mdl",
	"models/v_golden_deagle.mdl",
	"models/p_golden_deagle.mdl"
};

new HaveWeapon[ 33 ] = 0

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{ 
	for(new i = 0; i < sizeof Models; i++) precache_model(Models) 
	
}

public Spawn ( id )
{
	HaveWeapon[ id ] = 0
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
} 

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && HaveWeapon[ id ] == 1 ) 
	{
		set_pev( id, pev_viewmodel2, Models[0] )
		set_pev( id, pev_weaponmodel2, Models[1] )
	}
	
	if( Arma == CSW_M4A1 && HaveWeapon[ id ] == 2 ) 
	{
		set_pev( id, pev_viewmodel2, Models[2] )
		set_pev( id, pev_weaponmodel2, Models[3] )
	}
	
	if( Arma == CSW_AWP && HaveWeapon[ id ] == 3 ) 
	{
		set_pev( id, pev_viewmodel2, Models[4] )
		set_pev( id, pev_weaponmodel2, Models[5] )
	}
	
	if ( Arma == CSW_DEAGLE && HaveWeapon[ id ] != 0 ) {
		
		set_pev ( id, pev_viewmodel2, Models[6] );
		set_pev ( id, pev_weaponmodel2, Models[7] );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )

	new gString[256]
	
	formatex(gString, 100, "%sGolden [\r AK47\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "1", 0 )  
	formatex(gString, 100, "%sGolden [\r M4A1\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "2", 0 )  
	formatex(gString, 100, "%sGolden [\r AWP\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "3", 0 )   
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}

	if(get_user_flags(id) & VIP_ACCESS) return ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
	
	switch( item ) 
	{
		case 0 : 
		{ 
			fm_give_item(id, "weapon_ak47" );
			cs_set_user_bpammo( id, CSW_AK47, 90 );   
		}
		case 1 : 
		{ 
			fm_give_item(id, "weapon_m4a1");
			cs_set_user_bpammo( id, CSW_M4A1, 90 );   
		}
		case 2 : 
		{ 
			fm_give_item(id, "weapon_mp5navy");
			cs_set_user_bpammo( id, CSW_AWP, 90 );   
		}
	} 

	fm_strip_user_weapons(id);
	fm_give_item(id, "weapon_knife");
	fm_give_item( id, "weapon_hegrenade" );
	fm_give_item( id, "weapon_flashbang" );
	fm_give_item( id, "weapon_smokegrenade" );
	fm_give_item(id, "weapon_deagle");
	cs_set_user_bpammo( id, CSW_DEAGLE, 70 ); 
	CurrWeapon( id ); 
	HaveWeapon[ id ] = item+1

	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" ); 
	if( HaveWeapon[ id ] != 0 ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );

	VipMenuCMD( id );

	return true
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? ( 1 << 2 ) : ( 1 << 0 ) );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}

	return true
}
User avatar
b|t|d
Membru, skill 0
Membru, skill 0
Posts: 92
Joined: 14 Jan 2011, 18:21
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Location: ro
Has thanked: 15 times
Contact:

11 Jan 2019, 02:38

Diversity wrote:
Truth* wrote:
Testeaza | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )


#define VIP_ACCESS		ADMIN_LEVEL_H


new const vGoldenAk[ 64 ] = "models/v_golden_ak47.mdl";
new const pGoldenAk[ 64 ] = "models/p_golden_ak47.mdl";

new const vGoldenM4[ 64 ] = "models/v_golden_m4a1.mdl";
new const pGoldenM4[ 64 ] = "models/p_golden_m4a1.mdl";

new const vGoldenAWP[ 64 ] = "models/v_golden_mp5.mdl";
new const pGoldenAWP[ 64 ] = "models/p_golden_mp5.mdl";

new const vGDeagle[ 64 ] = "models//v_golden_deagle.mdl";
new const pGDeagle[ 64 ] = "models/p_golden_deagle.mdl";


new bool: HaveWeapon[ 33 ];
new bool: AreGoldenAK[ 33 ];
new bool: AreGoldenM4[ 33 ];
new bool: AreGoldenAWP[ 33 ];
new bool: AreGoldenD[ 33 ];


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{
	//-- | Arme Gold | --//
	precache_model( vGoldenAk );
	precache_model( pGoldenAk );
	precache_model( vGoldenM4 );
	precache_model( pGoldenM4 );
	precache_model( vGoldenAWP );
	precache_model( pGoldenAWP );
	precache_model( vGDeagle );
	precache_model( pGDeagle );
	
}

public Spawn ( id )
{
	AreGoldenAK[ id ] = false;
	AreGoldenM4[ id ] = false;
	AreGoldenAWP[ id ] = false;
	HaveWeapon[ id ] = false;
	AreGoldenD[ id ] = false;
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
}

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && AreGoldenAK[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAk )
		set_pev( id, pev_weaponmodel2, pGoldenAk )
	}
	
	if( Arma == CSW_M4A1 && AreGoldenM4[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenM4 )
		set_pev( id, pev_weaponmodel2, pGoldenM4 )
	}
	
	if( Arma == CSW_AWP && AreGoldenAWP[ id ] ) 
	{
		set_pev( id, pev_viewmodel2, vGoldenAWP )
		set_pev( id, pev_weaponmodel2, pGoldenAWP )
	}
	
	if ( Arma == CSW_DEAGLE && AreGoldenD [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vGDeagle );
		set_pev ( id, pev_weaponmodel2, pGDeagle );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )
	
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] ", "1", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AK47\y ] - \d( Only VIP )", "1", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] ", "2", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r M4A1\y ] - \d( Only VIP )", "2", 0 )
	}
	if(get_user_flags(id) & VIP_ACCESS )
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] ", "3", 0 )
	}
	else
	{
		menu_additem( MeniuVIP, "\yGolden [\r AWP\y ] - \d( Only VIP )", "3", 0 )
	}
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) 
	{
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) 
	{
		case 0 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAk );
				set_pev( id, pev_weaponmodel2, pGoldenAk );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = true;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 1 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_m4a1");
				cs_set_user_bpammo( id, CSW_M4A1, 90 );
				set_pev( id, pev_viewmodel2, vGoldenM4 );
				set_pev( id, pev_weaponmodel2, pGoldenM4 );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = true;
				AreGoldenAWP[ id ] = false;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
		case 2 : 
		{
			if(get_user_flags(id) & VIP_ACCESS )
			{
				fm_strip_user_weapons(id);
				fm_give_item(id, "weapon_knife");
				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );
				fm_give_item(id, "weapon_deagle");
				cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
				fm_give_item(id, "weapon_mp5navy");
				cs_set_user_bpammo( id, CSW_AWP, 90 );
				set_pev( id, pev_viewmodel2, vGoldenAWP );
				set_pev( id, pev_weaponmodel2, pGoldenAWP );
				HaveWeapon[ id ] = true;
				AreGoldenAK[ id ] = false;
				AreGoldenM4[ id ] = false;
				AreGoldenAWP[ id ] = true;
				AreGoldenD[ id ] = true;
				CurrWeapon( id );
			}
			else
			{
				ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
			}
		}
	}
	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" );
		return 
	}
	
	if( HaveWeapon[ id ] ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );
		return 
	}
	VipMenuCMD( id );
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}

mai bine asa | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*/Filip" 


#define VIP_ACCESS		ADMIN_LEVEL_H  

new const Models[][] = {
	"models/v_golden_ak47.mdl",
	"models/p_golden_ak47.mdl",
	"models/v_golden_m4a1.mdl",
	"models/p_golden_m4a1.mdl",
	"models/v_golden_mp5.mdl",
	"models/p_golden_mp5.mdl",
	"models/v_golden_deagle.mdl",
	"models/p_golden_deagle.mdl"
};

new HaveWeapon[ 33 ] = 0

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{ 
	for(new i = 0; i < sizeof Models; i++) precache_model(Models) 
	
}

public Spawn ( id )
{
	HaveWeapon[ id ] = 0
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
} 

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && HaveWeapon[ id ] == 1 ) 
	{
		set_pev( id, pev_viewmodel2, Models[0] )
		set_pev( id, pev_weaponmodel2, Models[1] )
	}
	
	if( Arma == CSW_M4A1 && HaveWeapon[ id ] == 2 ) 
	{
		set_pev( id, pev_viewmodel2, Models[2] )
		set_pev( id, pev_weaponmodel2, Models[3] )
	}
	
	if( Arma == CSW_AWP && HaveWeapon[ id ] == 3 ) 
	{
		set_pev( id, pev_viewmodel2, Models[4] )
		set_pev( id, pev_weaponmodel2, Models[5] )
	}
	
	if ( Arma == CSW_DEAGLE && HaveWeapon[ id ] != 0 ) {
		
		set_pev ( id, pev_viewmodel2, Models[6] );
		set_pev ( id, pev_weaponmodel2, Models[7] );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )

	new gString[256]
	
	formatex(gString, 100, "%sGolden [\r AK47\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "1", 0 )  
	formatex(gString, 100, "%sGolden [\r M4A1\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "2", 0 )  
	formatex(gString, 100, "%sGolden [\r AWP\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "3", 0 )   
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}

	if(get_user_flags(id) & VIP_ACCESS) return ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
	
	switch( item ) 
	{
		case 0 : 
		{ 
			fm_give_item(id, "weapon_ak47" );
			cs_set_user_bpammo( id, CSW_AK47, 90 );   
		}
		case 1 : 
		{ 
			fm_give_item(id, "weapon_m4a1");
			cs_set_user_bpammo( id, CSW_M4A1, 90 );   
		}
		case 2 : 
		{ 
			fm_give_item(id, "weapon_mp5navy");
			cs_set_user_bpammo( id, CSW_AWP, 90 );   
		}
	} 

	fm_strip_user_weapons(id);
	fm_give_item(id, "weapon_knife");
	fm_give_item( id, "weapon_hegrenade" );
	fm_give_item( id, "weapon_flashbang" );
	fm_give_item( id, "weapon_smokegrenade" );
	fm_give_item(id, "weapon_deagle");
	cs_set_user_bpammo( id, CSW_DEAGLE, 70 ); 
	CurrWeapon( id ); 
	HaveWeapon[ id ] = item+1

	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" ); 
	if( HaveWeapon[ id ] != 0 ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );

	VipMenuCMD( id );

	return true
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? ( 1 << 2 ) : ( 1 << 0 ) );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}

	return true
}



[ Vip Menu ] Nu ai acces la acest meniu !
nU-MI FUN
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2036
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

11 Jan 2019, 16:16

| Afiseaza codul
[code]
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*/Filip" 


#define VIP_ACCESS		ADMIN_LEVEL_H  

new const Models[][] = {
	"models/v_golden_ak47.mdl",
	"models/p_golden_ak47.mdl",
	"models/v_golden_m4a1.mdl",
	"models/p_golden_m4a1.mdl",
	"models/v_golden_mp5.mdl",
	"models/p_golden_mp5.mdl",
	"models/v_golden_deagle.mdl",
	"models/p_golden_deagle.mdl"
};

new HaveWeapon[ 33 ] = 0

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
	register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
	
	RegisterHam( Ham_Spawn, "player", "Spawn", true );
	
	register_clcmd( "say_team /vipmenu", "VipMenu" );
	register_clcmd( "say_team /vipinfo", "VipMOTD" );
	
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	// Add your code here...
}

public VipMOTD(id)	show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( ) 
{ 
	for(new i = 0; i < sizeof Models; i++) precache_model(Models) 
	
}

public Spawn ( id )
{
	HaveWeapon[ id ] = 0
	
	if( is_user_alive(id) && get_user_flags(id) & VIP_ACCESS )
	{
		fm_give_item( id, "weapon_hegrenade" );
		fm_give_item( id, "weapon_flashbang" );
		fm_give_item( id, "weapon_smokegrenade" );
	}
	
	
} 

public CurrWeapon ( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && HaveWeapon[ id ] == 1 ) 
	{
		set_pev( id, pev_viewmodel2, Models[0] )
		set_pev( id, pev_weaponmodel2, Models[1] )
	}
	
	if( Arma == CSW_M4A1 && HaveWeapon[ id ] == 2 ) 
	{
		set_pev( id, pev_viewmodel2, Models[2] )
		set_pev( id, pev_weaponmodel2, Models[3] )
	}
	
	if( Arma == CSW_AWP && HaveWeapon[ id ] == 3 ) 
	{
		set_pev( id, pev_viewmodel2, Models[4] )
		set_pev( id, pev_weaponmodel2, Models[5] )
	}
	
	if ( Arma == CSW_DEAGLE && HaveWeapon[ id ] != 0 ) {
		
		set_pev ( id, pev_viewmodel2, Models[6] );
		set_pev ( id, pev_weaponmodel2, Models[7] );
		
	}
}

public VipMenuCMD( id ) {
	new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )

	new gString[256]
	
	formatex(gString, 100, "%sGolden [\r AK47\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "1", 0 )  
	formatex(gString, 100, "%sGolden [\r M4A1\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "2", 0 )  
	formatex(gString, 100, "%sGolden [\r AWP\y ]", ((get_user_flags(id) & VIP_ACCESS) ? "\y" : "\d")), menu_additem( MeniuVIP, gString, "3", 0 )   
	
	menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, MeniuVIP, item ) 
{
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuVIP )
		return PLUGIN_HANDLED
	}

	if(!(get_user_flags(id) & VIP_ACCESS)) return ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
	
	switch( item ) 
	{
		case 0 : 
		{ 
			fm_give_item(id, "weapon_ak47" );
			cs_set_user_bpammo( id, CSW_AK47, 90 );   
		}
		case 1 : 
		{ 
			fm_give_item(id, "weapon_m4a1");
			cs_set_user_bpammo( id, CSW_M4A1, 90 );   
		}
		case 2 : 
		{ 
			fm_give_item(id, "weapon_mp5navy");
			cs_set_user_bpammo( id, CSW_AWP, 90 );   
		}
	} 

	fm_strip_user_weapons(id);
	fm_give_item(id, "weapon_knife");
	fm_give_item( id, "weapon_hegrenade" );
	fm_give_item( id, "weapon_flashbang" );
	fm_give_item( id, "weapon_smokegrenade" );
	fm_give_item(id, "weapon_deagle");
	cs_set_user_bpammo( id, CSW_DEAGLE, 70 ); 
	CurrWeapon( id ); 
	HaveWeapon[ id ] = item+1

	menu_destroy( MeniuVIP )
	return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
	if( !is_user_alive( id ) ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" ); 
	if( HaveWeapon[ id ] != 0 ) return ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );

	VipMenuCMD( id );

	return true
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
	new iPlayer = get_msg_arg_int( 1 );
	if( is_user_connected( iPlayer ) && ( get_user_flags( iPlayer ) & VIP_ACCESS ) ) 
	{
		set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? ( 1 << 2 ) : ( 1 << 0 ) );
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}

	return true
}
[/code]
User avatar
b|t|d
Membru, skill 0
Membru, skill 0
Posts: 92
Joined: 14 Jan 2011, 18:21
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Location: ro
Has thanked: 15 times
Contact:

11 Jan 2019, 19:57

Imi da voie acum dar la meniu 1,2,3 imi apare decat skin de awp si atat , awp-ul nu pune zoom
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2036
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

12 Jan 2019, 00:13

| Afiseaza codul
[code]
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>

#pragma tabsize 0

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "Truth*/Filip" 


#define VIP_ACCESS      ADMIN_LEVEL_H
#define is_user_vip(%0)		(get_user_flags(%0)&VIP_ACCESS)

new const Models[][] = {
   "models/v_golden_ak47.mdl",
   "models/p_golden_ak47.mdl",

   "models/v_golden_m4a1.mdl",
   "models/p_golden_m4a1.mdl",

   "models/v_golden_awp.mdl",
   "models/p_golden_awp.mdl",

   "models/v_golden_deagle.mdl",
   "models/p_golden_deagle.mdl"
};

new HaveWeapon[ 33 ] = 0

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
   
   RegisterHam( Ham_Spawn, "player", "Spawn", true );
   
   register_clcmd( "say_team /vipmenu", "VipMenu" );
   register_clcmd( "say_team /vipinfo", "VipMOTD" );
   
   
   register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
   
   // Add your code here...
}

public VipMOTD(id)   show_motd(id, "addons/amxmodx/configs/vip.html", "VIP");

public plugin_precache( )	for(new i; i < sizeof Models; i++) precache_model(Models)

public Spawn ( id )
{  
   if( is_user_alive(id) && is_user_vip(id) )
   {
   HaveWeapon[ id ] = 0
      fm_give_item( id, "weapon_hegrenade" );
      fm_give_item( id, "weapon_flashbang" );
      fm_give_item( id, "weapon_smokegrenade" );
   }
} 

public CurrWeapon ( id ) {
   new Arma = read_data( 2 )
   if(is_user_vip(id)&&is_user_alive(id))
{
   if( Arma == CSW_AK47 && HaveWeapon[ id ] == 1 ) 
   {
      set_pev( id, pev_viewmodel2, Models[0] )
      set_pev( id, pev_weaponmodel2, Models[1] )
   }
   
   if( Arma == CSW_M4A1 && HaveWeapon[ id ] == 2 ) 
   {
      set_pev( id, pev_viewmodel2, Models[2] )
      set_pev( id, pev_weaponmodel2, Models[3] )
   }
   
   if( Arma == CSW_AWP && HaveWeapon[ id ] == 3 ) 
   {
      set_pev( id, pev_viewmodel2, Models[4] )
      set_pev( id, pev_weaponmodel2, Models[5] )
   }
   
   if ( Arma == CSW_DEAGLE && HaveWeapon[ id ] != 0 ) {
      set_pev ( id, pev_viewmodel2, Models[6] );
      set_pev ( id, pev_weaponmodel2, Models[7] );
   }
}
}

public VipMenuCMD( id ) {
   new MeniuVIP = menu_create( "\r* V.I.P. * \yMenu", "VipMenuCMDHandler" )
   
   menu_additem( MeniuVIP, "AK47", "1" )  
   menu_additem( MeniuVIP, "M4A1", "2" )  
   menu_additem( MeniuVIP, "AWP", "3" )   
   
   menu_setprop( MeniuVIP, MPROP_EXIT, MEXIT_ALL )
   menu_display( id, MeniuVIP, 0 )
}

public VipMenuCMDHandler( id, Menu, Item ) 
{
   if( !is_user_alive( id ) ) 
   {
      ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort!" )
      return PLUGIN_HANDLED
   }
   
   if( Item == MENU_EXIT||Item<0 ) {
      menu_destroy( Menu )
      return PLUGIN_HANDLED
   }

	new Key[ 3 ],Access, CallBack;
	menu_item_getinfo( Menu, Item, Access, Key, 2, _, _, CallBack );
	new isKey = str_to_num( Key );
   
   switch( isKey )
   {
      case 1 : 
      { 
         fm_give_item(id, "weapon_ak47" );
         cs_set_user_bpammo( id, CSW_AK47, 90 );   
      }
      case 2 : 
      { 
         fm_give_item(id, "weapon_m4a1");
         cs_set_user_bpammo( id, CSW_M4A1, 90 );   
      }
      case 3 : 
      { 
         fm_give_item(id, "weapon_mp5navy");
         cs_set_user_bpammo( id, CSW_AWP, 90 );   
      }
   } 

   fm_strip_user_weapons(id);
   fm_give_item(id, "weapon_knife");
   fm_give_item( id, "weapon_hegrenade" );
   fm_give_item( id, "weapon_flashbang" );
   fm_give_item( id, "weapon_smokegrenade" );
   fm_give_item(id, "weapon_deagle");
   cs_set_user_bpammo( id, CSW_DEAGLE, 70 ); 
   CurrWeapon( id ); 
   HaveWeapon[ id ] = isKey

   menu_destroy( Menu )
   return PLUGIN_HANDLED
}

public VipMenu( id ) 
{
   if( !is_user_alive( id ) )
{
ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Nu poti accesa meniul cand esti mort !" ); 
return PLUGIN_HANDLED
}
   if( HaveWeapon[ id ] != 0 )
{
ColorChat( id, "^x01[^x04 Vip Menu^x01 ] Ti-ai ales deja arma pe runda aceasta." );
return PLUGIN_HANDLED
}
	   if(!is_user_vip(id))
{
ColorChat(id, "^x01[^x04 Vip Menu^x01 ] Nu ai acces la acest meniu !" );
return PLUGIN_HANDLED
}

   VipMenuCMD( id );

return PLUGIN_CONTINUE
}


public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
   new iPlayer = get_msg_arg_int( 1 );
   if( is_user_connected( iPlayer ) && is_user_vip(iPlayer) ) 
   {
      set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? ( 1 << 2 ) : ( 1 << 0 ) );
   }
}

stock ColorChat(const id, const input[], any:...) {
   new count = 1, players[32];
   static msg[191];
   vformat(msg, 190, input, 3);
   
   replace_all(msg, 190, "!x04", "^4");
   replace_all(msg, 190, "!x01", "^1");
   replace_all(msg, 190, "!x03", "^3");
   
   if(id) players[0] = id;
   else get_players(players, count, "ch"); {
      for(new i = 0; i < count; i++) {
         if(is_user_connected(players)) {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
[/code]
User avatar
b|t|d
Membru, skill 0
Membru, skill 0
Posts: 92
Joined: 14 Jan 2011, 18:21
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Location: ro
Has thanked: 15 times
Contact:

12 Jan 2019, 23:33

Acum imi da doar deagle !
Post Reply

Return to “Cereri”

  • Information