Cerere Plugin VIP

Cereri de pluginuri noi, skinuri in CS, etc.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
hItMaNn0
Membru, skill 0
Membru, skill 0
Posts: 3
Joined: 23 Dec 2017, 21:58
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

14 Apr 2019, 19:58

SALUTARE AS VREA SI EU UN PLUGIN BUN DE VIP CLASIC CU
2X JUMP
15 HP KILL ARMA
30 KILL HS
TOATE GRENAZILE
DAR SA AIBA MENIU DE SELECTIE
SI CU FISIERUL HTML
eXtreamSHOP
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
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: 349 times
Contact:

15 Apr 2019, 00:46

Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
User avatar
Rainq
Manager ZM
Manager ZM
Posts: 2604
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 11 times
Contact:

15 Apr 2019, 14:27

vip pentru sv clasic restu editezi tu

Code: Select all

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


#define PLUGIN "Vip"
#define VERSION "1.0a"
#define AUTHOR "Alexandru+Stefan+Dunno"


#define ADMIN_GOLD	ADMIN_LEVEL_H //t
#define ADMIN_SILVER	ADMIN_LEVEL_G //s


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


//new bool:g_iRunda[ 33 ], bool:g_iRound[ 33 ];
new Cvar_VIP
new Runda_Arme = 3
new bool: Activare = false
new Contor = 0
new g_szMessage[256]
new const g_szBeginning[ ] = "Membrii VIP"


const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);




new mkb,mhb,cvar_vip_maxhp,cvar_vip_maxap,cvar_hp_kill_premium,cvar_ap_kill_premium,cvar_hp_kill_classic,cvar_ap_kill_classic,cvar_vip_jump
new cvar_tag,cvar_vip_in_out,jumpnum[33], bool: dojump[33],cvar_vip_showC,cvar_vip_showH,SyncHudMessage


public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR")
	new MapName[32]
	get_mapname(MapName,31)
	if(MapName[0] == 'a' && MapName[1] == 'w' && MapName[2] == 'p')
		pause("ac","vipnew.amxx")
	if(equal(MapName,"35hp_2"))
		pause("ac","vipnew.amxx")
	if(equal(MapName,"35hp"))
		pause("ac","vipnew.amxx")	
	


	register_clcmd("say /vip", "vip_info")
	register_clcmd("say /vips", "print_adminlist")
	RegisterHam(Ham_Spawn, "player", "cmdSpawn", 1)
	register_event("DeathMsg", "eDeathMsg", "a")
	register_logevent("RoundStart", 2, "1=Round_Start")
	register_message(get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib")
	Cvar_VIP = register_cvar("amx_vip" , "0")
	cvar_vip_in_out = register_cvar("amx_vip_in_out", "1")
	cvar_tag = register_cvar("amx_vip_tag", "VIP")
	cvar_vip_jump = register_cvar("amx_vip_jump", "1" )
	cvar_hp_kill_premium = register_cvar("amx_vip_addhp", "15")	
	cvar_ap_kill_premium = register_cvar("amx_vip_addap", "10")
	cvar_hp_kill_classic = register_cvar("amx_vip_addhp", "10")	
	cvar_ap_kill_classic = register_cvar("amx_vip_addap", "10")
	cvar_vip_maxhp = register_cvar("amx_vip_maxhp", "100")
	cvar_vip_maxap = register_cvar("amx_vip_maxap", "100")	
	mkb = register_cvar("money_kill_bonus","300")
	mhb = register_cvar("money_hs_bonus","500")
	cvar_vip_showC = register_cvar("amx_vip_show_chat", "1")
	cvar_vip_showH = register_cvar("amx_vip_show_hud", "1")
	
	
	
	set_task( 1.0, "TaskDisplayVips", _, _, _, "b", 0 )
	SyncHudMessage = CreateHudSyncObj( )




	
	
}


public TaskDisplayVips( )
{
	if(get_pcvar_num(cvar_vip_showH))
	{
		static iPlayers[ 32 ];
		static iPlayersNum;
	
		get_players( iPlayers, iPlayersNum, "ch" );
		if( !iPlayersNum )
			return 1;
	
		static iVipsConnected, szVipsNames[ 128 ], szName[ 32 ];
		formatex( szVipsNames, sizeof ( szVipsNames ) -1, "" ); // Is this needed ?
		iVipsConnected = 0;
	
		static id, i;
		for( i = 0; i < iPlayersNum; i++ )
		{
			id = iPlayers[ i ];
			if( get_user_flags( id ) & ADMIN_GOLD )
			{
				get_user_name( id, szName, sizeof ( szName ) -1 );
			
				add( szVipsNames, sizeof ( szVipsNames ) -1, szName );
				add( szVipsNames, sizeof ( szVipsNames ) -1, "^n" );
			
				iVipsConnected++;
			}
		}
	
		formatex( g_szMessage, sizeof ( g_szMessage ) -1, "%s ( %i )^n%s",
			g_szBeginning, iVipsConnected, szVipsNames );
		
		set_hudmessage( 25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1 );
		ShowSyncHudMsg( 0, SyncHudMessage, g_szMessage );
	}
	return PLUGIN_CONTINUE;
		
}


public print_adminlist(user) 
{
	if(get_pcvar_num(cvar_vip_showC))
	{
		new tag[32];
		get_pcvar_string(cvar_tag, tag, charsmax(tag));
	
		new adminnames[33][32];
		new message[256];
		new id, count, x, len;


		for(id = 1 ; id <= get_maxplayers() ; id++)
			if(is_user_connected(id))
				if(get_user_flags(id) & ADMIN_GOLD || get_user_flags(id) & ADMIN_SILVER)
					get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));
    
		len = format(message, 255, "^3[%s] ^1VIP-ii online sunt:^4 " ,tag);
		if(count > 0) 
			{
			for(x = 0 ; x < count ; x++) 
				{
				len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
				if(len > 96) 
				{
					print_message(user, message);
					len = format(message, 255, " ");
				}
				}
			print_message(user, message);
			}
		else 
		{
			ColorChat(0, GREEN, "^3[%s] ^1Nu sunt ^4VIP^1-i online.", tag);
		} 
	}
	return PLUGIN_CONTINUE;  
}


print_message(id, msg[]) 
{
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}




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


public in(id) 	
{
	if(get_pcvar_num(cvar_vip_in_out))
	{
		new tag[32], name[32];


		get_pcvar_string(cvar_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 


		if(get_user_flags(id) & ADMIN_GOLD || get_user_flags(id) & ADMIN_SILVER)   
		{ 
			ColorChat(0, GREEN, "^3[%s] ^1VIP: ^4%s ^1s-a conectat.", tag, name); 
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}


public out(id) 	
{	
	if(get_pcvar_num(cvar_vip_in_out))
	{
		new tag[32], name[32];


		get_pcvar_string(cvar_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 


		if(get_user_flags(id) & ADMIN_GOLD || get_user_flags(id) & ADMIN_SILVER)   
		{ 
			ColorChat(0, GREEN, "^3[%s] ^1VIP: ^4%s ^1s-a deconectat.", tag, name); 
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}


public client_connect(id) {
	if(get_pcvar_num(Cvar_VIP) !=0 && !(get_user_flags(id) & ADMIN_SILVER))
		set_user_flags(id,get_user_flags(id) + 262144)
}


public client_PreThink(id)
{
	if(!is_user_alive(id)) 
		return PLUGIN_CONTINUE;


	new BUTON = get_user_button(id)
	new OLDBUTON = get_user_oldbutton(id)
	new JUMP_VIP = get_pcvar_num(cvar_vip_jump) 


	if((BUTON & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(OLDBUTON & IN_JUMP))
	{
		if(((get_user_flags(id) & ADMIN_GOLD) && (jumpnum[id] < JUMP_VIP)))
		{
			dojump[id] = true
			jumpnum[id]++
		}
	}


	if((BUTON & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
	{
		jumpnum[id] = 0
	}


	return PLUGIN_CONTINUE;
}


public client_PostThink(id) 
{
	if(!is_user_alive(id)) 
		return PLUGIN_CONTINUE;


	if(dojump[id] == true)
	{
		new Float: velocity[3]	
		entity_get_vector(id, EV_VEC_velocity, velocity)
		velocity[2] = random_float(265.0, 285.0)
		entity_set_vector(id, EV_VEC_velocity, velocity)
		dojump[id] = false
	}
	return PLUGIN_CONTINUE;
}


public client_putinserver(id) 
{	
	set_task(2.0, "in", id)
	jumpnum[id] = 0
	dojump[id] = false
}


public client_disconnect(id)
{
	set_task(2.0, "out", id)
	jumpnum[id] = 0;
	dojump[id] = false;
}


public vip_info(id)
{
	show_motd(id, "/addons/amxmodx/configs/vip_info.html");
}




public eDeathMsg()
{
	new id_Killer = read_data(1);
	new VIP_MAXHP = get_pcvar_num(cvar_vip_maxhp);
	new VIP_MAX_HP = get_user_health(id_Killer);
	new VIP_MAXAP = get_pcvar_num(cvar_vip_maxap);
	new VIP_MAX_AP = get_user_armor(id_Killer);


	if(is_user_alive(id_Killer))
	{
		if(get_user_flags(id_Killer) & ADMIN_GOLD && read_data(3) == 0)
			{
				set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill_premium));
				set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill_premium));
				cs_set_user_money(id_Killer,cs_get_user_money(id_Killer) + get_pcvar_num(mkb))
			}
		if(get_user_flags(id_Killer) & ADMIN_GOLD && read_data(3) == 1)
			{
				set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill_premium));
				set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill_premium));
				cs_set_user_money(id_Killer,cs_get_user_money(id_Killer) + get_pcvar_num(mhb))
			}	
		if(get_user_flags(id_Killer) & ADMIN_SILVER && read_data(3) == 1 && !(get_user_flags(id_Killer) & ADMIN_GOLD))
			{
				set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill_classic));
				set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill_classic));
				cs_set_user_money(id_Killer,cs_get_user_money(id_Killer) + get_pcvar_num(mhb))
			}
		if(get_user_flags(id_Killer) & ADMIN_SILVER && read_data(3) == 0 && !(get_user_flags(id_Killer) & ADMIN_GOLD))
			{
				cs_set_user_money(id_Killer,cs_get_user_money(id_Killer) + get_pcvar_num(mkb))
			}
	}
	if(VIP_MAX_HP >= VIP_MAXHP)
		{
			set_user_health(id_Killer, get_pcvar_num(cvar_vip_maxhp));
			return PLUGIN_HANDLED;
		}
	
	if(VIP_MAX_AP >= VIP_MAXAP)
		{
			set_user_armor(id_Killer, get_pcvar_num(cvar_vip_maxap));
			return PLUGIN_HANDLED;
		}


	return PLUGIN_HANDLED;
}


		
	
				
/*
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 M4A1\r +\w Deagle +\rGrenades","1", ADMIN_GOLD)
	menu_additem ( menu,"\w AK47\r +\w Deagle +\rGrenades","2", ADMIN_GOLD)
	menu_additem ( menu,"\w AWP\r +\w Deagle +\rGrenades","3", ADMIN_GOLD)
	
	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:
		{
			drop_weapons(id,1)
			drop_weapons(id,2)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
			give_item(id, "item_assaultsuit")
			give_item(id, "item_thighpack")
			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:
		{
			drop_weapons(id,1)
			drop_weapons(id,2)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
			give_item(id, "item_assaultsuit")
			give_item(id, "item_thighpack")
			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:
		{
			drop_weapons(id,1)
			drop_weapons(id,2)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
			give_item(id, "item_assaultsuit")
			give_item(id, "item_thighpack")
			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)) {
		if(Activare) 
			GoldMenu( id )
	}
	else if(get_user_flags(id) & ADMIN_SILVER && is_user_alive(id))
	{
		if(Activare) 
			SilverMenu( id )
	}
	
	if(get_pcvar_num(Cvar_VIP) !=0 && !(get_user_flags(id) & ADMIN_SILVER))
		set_user_flags(id,get_user_flags(id) + 262144)


	
} 


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\r +\w Deagle +\rGrenades","1", ADMIN_SILVER)
	menu_additem ( menu,"\w AK47\r +\w Deagle +\rGrenades","2", ADMIN_SILVER)


	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:
		{
			drop_weapons(id,1)
			drop_weapons(id,2)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
			give_item(id, "item_assaultsuit")
			give_item(id, "item_thighpack")
			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:
		{
			drop_weapons(id,1)
			drop_weapons(id,2)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
			give_item(id, "item_assaultsuit")
			give_item(id, "item_thighpack")
			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 )
		}               
	}
	menu_destroy ( menu );
	return PLUGIN_HANDLED
}


public RoundStart( )
{
	Contor++
	if(Contor >= Runda_Arme)
		Activare = true
		
}


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[i]))
		{
			message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
			write_byte(players[i]);
			write_string(msg);
			message_end();
		}
	}
}
}


stock drop_weapons(id, dropwhat)
{
	static Weapons[32], Num, i, WeaponID;
	Num = 0;
	get_user_weapons(id, Weapons, Num);
	for(i = 0; i < Num; i ++)
	{
		WeaponID = Weapons[i];
		if((dropwhat == 1 && ((1 << WeaponID) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1 << WeaponID) & SECONDARY_WEAPONS_BIT_SUM )))
		{
			static DropName[32], WeaponEntity;
			get_weaponname(WeaponID, DropName, charsmax(DropName));
			WeaponEntity = fm_find_ent_by_owner(-1, DropName, id);
			set_pev(WeaponEntity, pev_iuser1, cs_get_user_bpammo (id, WeaponID));
			engclient_cmd(id, "drop", DropName);
			cs_set_user_bpammo(id, WeaponID, 0);
		}
	}
}
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest