UN VIP SUPER SIMPLU :(

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

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

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
Bunicu Magic
Membru, skill +4
Membru, skill +4
Posts: 1914
Joined: 25 Jan 2013, 20:38
Detinator Steam: Nu
Location: Bucuresti
Has thanked: 49 times
Been thanked: 145 times
Contact:

28 Nov 2013, 23:12

Salut doresc si eu un vip simplu , cand apas TAB sa imi arate tag`ul VIP la player langa fraguri ... stiti voi si urmatoarele de mai jos .

VIP GOLD - "t"
VIP SILVER - "s"

Tastez : /menugold si imi apare :

1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT)
3.AK47+DEAGLE(DACA ESTI T)
4.AWP+DEAGLE
5.ARMURA 100%


Tastez : /menusilver si imi apare :
1.MP4AI+DEAGLE(DACA ESTI CT)
2.AK47+DEAGLE(DACA ESTI T)
3.ARMURA 50%


VREAU CA VIP`UL SA AIBA FLAGURILE

###ATENTIE###
DOARESC CA DE EXEMPLU SA DAU VIP LA UN ADMIN ( I PUN FLAGUL T SAU S ) SI SA AIBA VIP
SI CAND DAU DOAR VIP PUN DOAR FLAGUL ALA

GRADELE DE PE SERVER
flaguri admini | Afiseaza codul
[code]; rangurile
Fondator
Owner
Co-Owner
Veteran
Maresal
General
Colonel
Maior
Admin in probe
V.I.P GOLD
V.I.P SILVER
Slot

; flagurile pentru fiecare rang (intre ranguri si flaguri se lasa un rand liber)

abcdefghijklmnopqrstxu
abcdefghijmnopqrsu
bcdefghijmnopqru
bcdefghijmnopqu
bcdefijmnopqu
bcdefijmnop
bcdefijmn
bcdefijm
bceijm
t
s
b[/code]
THINK it`s not illegal yet :D
Rapidserver
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

29 Nov 2013, 13:34

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Vip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_GOLD	ADMIN_LEVEL_H
#define ADMIN_SILVER	ADMIN_LEVEL_G

new bool:g_iRunda[ 33 ], bool:g_iRound[ 33 ];

new const GoldTag[] = "[!gGold!teamVip!y]"
new const SilverTag[] = "[!gSilver!teamVip!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipgold","Gold");
	register_clcmd ("say /vipsilver","Silver");
	RegisterHam(Ham_Spawn, "player", "cmdSpawn", 1);
	register_logevent("RoundStart", 2, "1=Round_Start")
}

public Gold ( id )
{
	if (get_user_flags(id) & ADMIN_GOLD)
	{
		GoldMenu( id );
		g_iRunda[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",GoldTag)
		return 1;
	}
	return 0
}

public Silver ( id )
{
	if (get_user_flags(id) & ADMIN_SILVER)
	{
		SilverMenu( id )
		g_iRound[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",SilverTag)
		return 1;
	}
	return 0
}

public GoldMenu( id )
{	
	if(g_iRunda[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",GoldTag)
		return 1
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Gold","menu_gold");
	
	menu_additem ( menu,"\w M3\r +\w Deagle","1", 0 );
	menu_additem ( menu,"\w AWP\r +\w Deagle","2", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_gold ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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, 35 );
			give_item ( id,"weapon_m3" )
			cs_set_user_bpammo( id, CSW_M3, 32 );
			
		}
		case 2:
		{
			give_item ( id,"weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
			give_item ( id,"weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
			
		}               
	}
	menu_destroy ( menu );
	return 1;
}

public cmdSpawn(id) {
	if(get_user_flags(id) & ADMIN_GOLD && is_user_alive(id)) {
		
		set_user_armor(id, 180)
		set_user_health(id, 150)
		give_item ( id,"weapon_hegrenade" )
		give_item ( id,"weapon_flashbang" )
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
	}
	else if(get_user_flags(id) & ADMIN_SILVER && is_user_alive(id))
	{
		set_user_armor(id, 150)
		set_user_health(id, 120)
		give_item ( id,"weapon_hegrenade" )
	}
} 

public SilverMenu ( id )
{
	if(g_iRound[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",SilverTag)
		return 1;
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Silver","menu_silver");
	
	menu_additem ( menu,"\w M4A1","1", 0 );
	menu_additem ( menu,"\w AK47","2", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_silver ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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_m4a1" )
			cs_set_user_bpammo( id, CSW_M4A1, 90 );
			
		}
		case 2:
		{
			give_item ( id,"weapon_ak47" )
			cs_set_user_bpammo( id, CSW_AK47, 90 );
		}               
	}
	menu_destroy ( menu );
	return 1;
}

public RoundStart( )
{
	new iPlayers[32], iNum;
	get_players( iPlayers, iNum)
	for( new i = 0; i < iNum;i++ )
	{
		g_iRunda[ iPlayers[ i ] ] = false;
		g_iRound[ iPlayers[ i ] ] = false;
	}
}
stock Chat_Color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^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();
		}
	}
}
}


Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
/menugold - cei care au flag-ul "t"
/menusilver - cei care au flag-ul "s"
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

29 Nov 2013, 15:14

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Vip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_GOLD	ADMIN_LEVEL_H
#define ADMIN_SILVER	ADMIN_LEVEL_G

new bool:g_iRunda[ 33 ], bool:g_iRound[ 33 ];

new const GoldTag[] = "[!gGold!teamVip!y]"
new const SilverTag[] = "[!gSilver!teamVip!y]"

new TASK_ID = 32132

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipgold","Gold");
	register_clcmd ("say /vipsilver","Silver");
	RegisterHam(Ham_Spawn, "player", "cmdSpawn", 1);
	register_logevent("RoundStart", 2, "1=Round_Start")
	register_event( "ResetHUD", "ev_ResetHud", "be" );
}

public Gold ( id )
{
	if (get_user_flags(id) & ADMIN_GOLD)
	{
		GoldMenu( id );
		g_iRunda[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",GoldTag)
		return 1;
	}
	return 0
}

public Silver ( id )
{
	if (get_user_flags(id) & ADMIN_SILVER)
	{
		SilverMenu( id )
		g_iRound[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",SilverTag)
		return 1;
	}
	return 0
}

public GoldMenu( id )
{	
	if(g_iRunda[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",GoldTag)
		return 1
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Gold","menu_gold");
	
	menu_additem ( menu,"\w M3\r +\w Deagle","1", 0 );
	menu_additem ( menu,"\w AWP\r +\w Deagle","2", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_gold ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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, 35 );
			give_item ( id,"weapon_m3" )
			cs_set_user_bpammo( id, CSW_M3, 32 );
			
		}
		case 2:
		{
			give_item ( id,"weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
			give_item ( id,"weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
			
		}               
	}
	menu_destroy ( menu );
	return 1;
}

public cmdSpawn(id) {
	if(get_user_flags(id) & ADMIN_GOLD && is_user_alive(id)) {
		
		set_user_armor(id, 180)
		set_user_health(id, 150)
		give_item ( id,"weapon_hegrenade" )
		give_item ( id,"weapon_flashbang" )
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
	}
	else if(get_user_flags(id) & ADMIN_SILVER && is_user_alive(id))
	{
		set_user_armor(id, 150)
		set_user_health(id, 120)
		give_item ( id,"weapon_hegrenade" )
	}
} 

public SilverMenu ( id )
{
	if(g_iRound[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",SilverTag)
		return 1;
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Silver","menu_silver");
	
	menu_additem ( menu,"\w M4A1","1", 0 );
	menu_additem ( menu,"\w AK47","2", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_silver ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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_m4a1" )
			cs_set_user_bpammo( id, CSW_M4A1, 90 );
			
		}
		case 2:
		{
			give_item ( id,"weapon_ak47" )
			cs_set_user_bpammo( id, CSW_AK47, 90 );
		}               
	}
	menu_destroy ( menu );
	return 1;
}

public RoundStart( )
{
	new iPlayers[32], iNum;
	get_players( iPlayers, iNum)
	for( new i = 0; i < iNum;i++ )
	{
		g_iRunda[ iPlayers[ i ] ] = false;
		g_iRound[ iPlayers[ i ] ] = false;
	}
}

public ev_ResetHud( id )
{
	set_task( 2.0, "scoreboard", id + TASK_ID );
}

public scoreboard( taskid )
{
	new id = taskid - TASK_ID;
	
	if( get_user_flags( id ) & ADMIN_GOLD || ADMIN_SILVER && is_user_connected( id ) )
	{
		message_begin( MSG_ALL, get_user_msgid( "ScoreAttrib" ) );
		
		write_byte( id );
		write_byte( 4 );
		
		message_end( );
	}
}

stock Chat_Color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^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();
		}
	}
}
}

Cu tot cu vip in scoreboard !
[LeNT]Bogdan
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 08 Aug 2013, 17:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: hd.cs16.ro
Has thanked: 12 times
Been thanked: 4 times
Contact:

29 Nov 2013, 15:24

Ma dar voi macar testati inainte ce dati ?

Tastez : /menugold si imi apare :

1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT)
3.AK47+DEAGLE(DACA ESTI T)
4.AWP+DEAGLE
5.ARMURA 100%


Tastez : /menusilver si imi apare :
1.MP4AI+DEAGLE(DACA ESTI CT)
2.AK47+DEAGLE(DACA ESTI T)
3.ARMURA 50%

el a cerut ce e mai sus voi ii dati total diferit !

scosmynnnn ce ai dat tu iti da pe /vipgold nu pe /menugold cum a cerut , si iti da un shotgun + deagle nu ce a cerut el

Nu iti da armura nu iti da nimic !
Servicii Profesionale Hosting btstelecom
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

29 Nov 2013, 15:51

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN "Vip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_GOLD	ADMIN_LEVEL_H
#define ADMIN_SILVER	ADMIN_LEVEL_G

new bool:g_iRunda[ 33 ], bool:g_iRound[ 33 ];

new const GoldTag[] = "[!gGold!teamVip!y]"
new const SilverTag[] = "[!gSilver!teamVip!y]"

new TASK_ID = 32132

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /menugold","Gold");
	register_clcmd ("say /menusilver","Silver");
	register_logevent("RoundStart", 2, "1=Round_Start")
	register_event( "ResetHUD", "ev_ResetHud", "be" );
}

public Gold ( id )
{
	if (get_user_flags(id) & ADMIN_GOLD)
	{
		GoldMenu( id );
		g_iRunda[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",GoldTag)
		return 1;
	}
	return 0
}

public Silver ( id )
{
	if (get_user_flags(id) & ADMIN_SILVER)
	{
		SilverMenu( id )
		g_iRound[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",SilverTag)
		return 1;
	}
	return 0
}

public GoldMenu( id )
{	
	if(g_iRunda[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",GoldTag)
		return 1
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Gold","menu_gold");
	
	menu_additem ( menu,"\w 2XFLASH+HE","1", 0 );
	menu_additem ( menu,"\w M4A1+DEAGLE(DACA ESTI CT)","2", 0 );
	menu_additem ( menu,"\w AK47+DEAGLE(DACA ESTI T)","3", 0 );
	menu_additem ( menu,"\w AWP+DEAGLE","4", 0 );
	menu_additem ( menu,"\w ARMURA 100%","5", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_gold ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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_flashbang" );
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 );
			give_item ( id,"weapon_hegrenade" )
		}
		case 2:
		{
			if(get_user_team(id) == 2)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_m4a1" )
				cs_set_user_bpammo( id, CSW_M4A1, 90 )
			}
		}   
		case 3:
		{
			if(get_user_team(id) == 1)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_ak47" )
				cs_set_user_bpammo( id, CSW_AK47, 90 )
			}
		}
		case 4:
		{
			give_item ( id,"weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
			give_item ( id,"weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
		}
		case 5:
		{
			set_user_armor(id, get_user_armor(id) + 100)
		}
	}
	menu_destroy ( menu );
	return 1;
}

public SilverMenu ( id )
{
	if(g_iRound[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",SilverTag)
		return 1;
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Silver","menu_silver");
	
	menu_additem ( menu,"\w M4A1+DEAGLE(DACA ESTI CT)","1", 0 );
	menu_additem ( menu,"\w AK47+DEAGLE(DACA ESTI T)","2", 0 );
	menu_additem ( menu,"\w ARMURA 50%","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_silver ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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:
		{
			if(get_user_team(id) == 2)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_m4a1" )
				cs_set_user_bpammo( id, CSW_M4A1, 90 )
			}
			
		}
		case 2:
		{
			if(get_user_team(id) == 1)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_ak47" )
				cs_set_user_bpammo( id, CSW_AK47, 90 )
			}
		}
		case 3:
		{
			set_user_armor(id, get_user_armor(id) + 50)
		}
	}
	menu_destroy ( menu );
	return 1;
}

public RoundStart( )
{
	new iPlayers[32], iNum;
	get_players( iPlayers, iNum)
	for( new i = 0; i < iNum;i++ )
	{
		g_iRunda[ iPlayers[ i ] ] = false;
		g_iRound[ iPlayers[ i ] ] = false;
	}
}

public ev_ResetHud( id )
{
	set_task( 2.0, "scoreboard", id + TASK_ID );
}

public scoreboard( taskid )
{
	new id = taskid - TASK_ID;
	
	if( get_user_flags( id ) & ADMIN_GOLD || ADMIN_SILVER && is_user_connected( id ) )
	{
		message_begin( MSG_ALL, get_user_msgid( "ScoreAttrib" ) );
		
		write_byte( id );
		write_byte( 4 );
		
		message_end( );
	}
}

stock Chat_Color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^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();
		}
	}
}
}
[LeNT]Bogdan
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 08 Aug 2013, 17:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: hd.cs16.ro
Has thanked: 12 times
Been thanked: 4 times
Contact:

29 Nov 2013, 18:34

scosmynnnn wrote:
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN "Vip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_GOLD	ADMIN_LEVEL_H
#define ADMIN_SILVER	ADMIN_LEVEL_G

new bool:g_iRunda[ 33 ], bool:g_iRound[ 33 ];

new const GoldTag[] = "[!gGold!teamVip!y]"
new const SilverTag[] = "[!gSilver!teamVip!y]"

new TASK_ID = 32132

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /menugold","Gold");
	register_clcmd ("say /menusilver","Silver");
	register_logevent("RoundStart", 2, "1=Round_Start")
	register_event( "ResetHUD", "ev_ResetHud", "be" );
}

public Gold ( id )
{
	if (get_user_flags(id) & ADMIN_GOLD)
	{
		GoldMenu( id );
		g_iRunda[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",GoldTag)
		return 1;
	}
	return 0
}

public Silver ( id )
{
	if (get_user_flags(id) & ADMIN_SILVER)
	{
		SilverMenu( id )
		g_iRound[id] = true
	}
	else
	{
		Chat_Color(id, "%sNu ai acces la aceasta comanda",SilverTag)
		return 1;
	}
	return 0
}

public GoldMenu( id )
{	
	if(g_iRunda[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",GoldTag)
		return 1
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Gold","menu_gold");
	
	menu_additem ( menu,"\w 2XFLASH+HE","1", 0 );
	menu_additem ( menu,"\w M4A1+DEAGLE(DACA ESTI CT)","2", 0 );
	menu_additem ( menu,"\w AK47+DEAGLE(DACA ESTI T)","3", 0 );
	menu_additem ( menu,"\w AWP+DEAGLE","4", 0 );
	menu_additem ( menu,"\w ARMURA 100%","5", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_gold ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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_flashbang" );
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 );
			give_item ( id,"weapon_hegrenade" )
		}
		case 2:
		{
			if(get_user_team(id) == 2)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_m4a1" )
				cs_set_user_bpammo( id, CSW_M4A1, 90 )
			}
		}   
		case 3:
		{
			if(get_user_team(id) == 1)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_ak47" )
				cs_set_user_bpammo( id, CSW_AK47, 90 )
			}
		}
		case 4:
		{
			give_item ( id,"weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
			give_item ( id,"weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
		}
		case 5:
		{
			set_user_armor(id, get_user_armor(id) + 100)
		}
	}
	menu_destroy ( menu );
	return 1;
}

public SilverMenu ( id )
{
	if(g_iRound[id])
	{
		Chat_Color(id, "%sAi folosit deja odata,incearca runda urmatoare",SilverTag)
		return 1;
	}
	
	static menu;
	menu = menu_create ("\yVIPMENU\r Silver","menu_silver");
	
	menu_additem ( menu,"\w M4A1+DEAGLE(DACA ESTI CT)","1", 0 );
	menu_additem ( menu,"\w AK47+DEAGLE(DACA ESTI T)","2", 0 );
	menu_additem ( menu,"\w ARMURA 50%","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public menu_silver ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	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:
		{
			if(get_user_team(id) == 2)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_m4a1" )
				cs_set_user_bpammo( id, CSW_M4A1, 90 )
			}
			
		}
		case 2:
		{
			if(get_user_team(id) == 1)
			{
				give_item ( id,"weapon_deagle" );
				cs_set_user_bpammo( id, CSW_DEAGLE, 35 );                
				give_item ( id,"weapon_ak47" )
				cs_set_user_bpammo( id, CSW_AK47, 90 )
			}
		}
		case 3:
		{
			set_user_armor(id, get_user_armor(id) + 50)
		}
	}
	menu_destroy ( menu );
	return 1;
}

public RoundStart( )
{
	new iPlayers[32], iNum;
	get_players( iPlayers, iNum)
	for( new i = 0; i < iNum;i++ )
	{
		g_iRunda[ iPlayers[ i ] ] = false;
		g_iRound[ iPlayers[ i ] ] = false;
	}
}

public ev_ResetHud( id )
{
	set_task( 2.0, "scoreboard", id + TASK_ID );
}

public scoreboard( taskid )
{
	new id = taskid - TASK_ID;
	
	if( get_user_flags( id ) & ADMIN_GOLD || ADMIN_SILVER && is_user_connected( id ) )
	{
		message_begin( MSG_ALL, get_user_msgid( "ScoreAttrib" ) );
		
		write_byte( id );
		write_byte( 4 );
		
		message_end( );
	}
}

stock Chat_Color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^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();
		}
	}
}
}



Este mai bine , dar tot nu este 100% cum te a rugat !



1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT)
3.AK47+DEAGLE(DACA ESTI T)
4.AWP+DEAGLE
5.ARMURA 100%


Tastez : /menusilver si imi apare :
1.MP4AI+DEAGLE(DACA ESTI CT)
2.AK47+DEAGLE(DACA ESTI T)
3.ARMURA 50%

Tu ai pus bine ce a cerut , dar a specificat in paranteza cui sa apara si cui nu adica dau un exemplu pentru menugold

1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT)
3.AK47+DEAGLE(DACA ESTI T)
4.AWP+DEAGLE
5.ARMURA 100%

imi apar toate si cand sunt ct si cand sunt t el vrea la

CT sa apara doar

1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT)
3.AK47+DEAGLE(DACA ESTI T) - FARA ASTA SA APARA DOAR CAND ESTI TERO
4.AWP+DEAGLE
5.ARMURA 100%

ai la

T sa apara

1.2XFLASH+HE
2.MP4AI+DEAGLE(DACA ESTI CT) - FARA ASTA SA APARA DOAR CAND ESTI CT
3.AK47+DEAGLE(DACA ESTI T)
4.AWP+DEAGLE
5.ARMURA 100%

Sper ca ai inteles , si la /menugold si la /menusilver sa fie la fel AK47+.. doar la tero si M4A1 + .. doar la CT

Daca se poate pentru /menuGOLD

cand are cineva "vip GOLD " si da un hs sa primeasca +15hp maximul de hp sa fie 100 adica daca omoara 99999 playeri prin hs viata sa nu depaseasca 100

Multumesc , o seara buna !
Servicii Profesionale Hosting btstelecom
User avatar
(c) FuNcKer.
Membru, skill 0
Membru, skill 0
Posts: 15
Joined: 15 Aug 2013, 22:57
Detinator Steam: Da
Detinator server CS: nu
SteamID: Secret
Has thanked: 2 times
Been thanked: 2 times
Contact:

29 Nov 2013, 21:43

cineva?
Servicii Profesionale Hosting NiXWay.ro
Contact Yahoo :[/i] funcker.cs32@yahoo.com
Contact Yahoo :[/i] madalin_lcs@yahoo.com
[LeNT]Bogdan
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 08 Aug 2013, 17:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: hd.cs16.ro
Has thanked: 12 times
Been thanked: 4 times
Contact:

30 Nov 2013, 11:55

Cineva ?
Servicii Profesionale Hosting btstelecom
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

30 Nov 2013, 13:41

Dar puteti sa modificati si voi nu e chiar asa greu :| tare pretentiosi sunteti :-j eu sunt plecat ca vi-l faceam eu :-j
[LeNT]Bogdan
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 08 Aug 2013, 17:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: hd.cs16.ro
Has thanked: 12 times
Been thanked: 4 times
Contact:

30 Nov 2013, 13:46

scosmynnnn wrote:Dar puteti sa modificati si voi nu e chiar asa greu :| tare pretentiosi sunteti :-j eu sunt plecat ca vi-l faceam eu :-j

Nu cred ca este asa mare graba , decat sa gresim codarea , si sa ne miram dc da error la compilare , una e cand il faci tu de la 0 si sti ce si cum alta e cand il gasesti si vrei sa faci niste modificari !

Astept cand revi poate ma ajuti cu pluginul !

O zi buna sa ai !
Servicii Profesionale Hosting btstelecom
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

30 Nov 2013, 15:45

aaa..acum am inteles ce ai zis tu :| tu nu vrei sa apara doar la ce are acces echipa respectiva
[LeNT]Bogdan
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 08 Aug 2013, 17:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: hd.cs16.ro
Has thanked: 12 times
Been thanked: 4 times
Contact:

30 Nov 2013, 20:34

scosmynnnn wrote:aaa..acum am inteles ce ai zis tu :| tu nu vrei sa apara doar la ce are acces echipa respectiva

Cam da ..
Servicii Profesionale Hosting btstelecom
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests