vip dr

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
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times
Contact:

27 Nov 2013, 09:35

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

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

#define ADMIN_VIP	ADMIN_KICK

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

new vip_power[33];

new const Tag[] = "!y[!gVIP!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public client_connect( id ) vip_power[id] = 0
public client_disconnect( id ) client_connect(id)

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		vip_power[ iPlayers ] = 0
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( 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:
		{
			vip_power[id] = 1
			Chat_Color(id, "%sTi-ai ales !team1300 viteza",Tag)
		}
		case 2:
		{
			vip_power[id] = 2
			Chat_Color(id, "%sTi-ai ales !team250 viteza",Tag)
		}
		case 3:
		{
			vip_power[id] = 3
			Chat_Color(id, "%sTi-ai ales !team500 gravitatie",Tag)
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
	
	switch(vip_power[id])
	{
		case 1: set_user_maxspeed(id, 1300.0)
		case 2: set_user_maxspeed(id, 250.0)
		case 3: set_user_gravity(id, 0.6)
	}
}

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

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();
			}
		}
	}
}
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests