Cerere modificare plugin vip

Tutoriale scripting, cod si portiuni de cod.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

C0non
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 06 Aug 2020, 14:36
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

22 Feb 2021, 02:16

Code: Select all

:))
Rainq ok am inteles, nu e bine facut. Multumesc puteti sa da'ti T/c.
TransferGo
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3194
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: 39 times
Been thanked: 492 times
Contact:

22 Feb 2021, 23:06

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_E //q
#define ADMIN_SILVER	ADMIN_LEVEL_F //r

#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]

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

static const	g_szBeginning[ ] = "Membrii VIP",
				VIP_DEZACTIVAT_pentru[][]={
					"awp_",
					"fy_",
					"aim_",
					"35hp",
					"1hp"
				},
				MESAJ_LOG_VIP_DEZACTIVAT_pentru[] = "Vipul a fost dezactivat pe aceasta mapa"


public plugin_init () {
	register_plugin ("PLUGIN", "VERSION", "AUTHOR")

	static MapName[35],left[5],right[1];
	get_mapname(MapName,charsmax(MapName))
	strtok(MapName,left,charsmax(left),right,charsmax(right),'_')
	for(new i;i<sizeof VIP_DEZACTIVAT_pentru;++i){
		if(containi(MapName,"_")!=-1){
			if(containi(VIP_DEZACTIVAT_pentru[i],left)!=-1){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
		else{
			if(equali(VIP_DEZACTIVAT_pentru[i],MapName)){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
	}
	
	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", "0")
	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", "5")	
	cvar_ap_kill_premium = register_cvar("amx_vip_addap", "0")
	cvar_hp_kill_classic = register_cvar("amx_vip_addhp", "0")	
	cvar_ap_kill_classic = register_cvar("amx_vip_addap", "0")
	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", "0")
	
	
	
	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 ("VIP MENU Gold","menu_gold");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_GOLD)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_GOLD)
	menu_additem ( menu," AWP + Deagle + Grenades","3", ADMIN_GOLD)
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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 (" VIP MENU Silver","menu_silver");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_SILVER)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_SILVER)


	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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);
		}
	}
}
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor.
Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug la lista de „ignore”.
Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine(STEAM sau PM) dacă aveți o problemă/nelămurire în acest caz! (am cont doar aici!!)
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se va posta la actual, doar dacă se găsește ceva critic/urgent de remediat, fiind coduri vechi, iar unele refăcute recent. NU MAI OFER SUPORT PENTRU ELE!(doar dacă nu e ceva critic/sau plătit)
* Nume pe cs1.6: eVoLuTiOn
* Atelierul meu - anunturi/lev-shop-t370037.html
C0non
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 06 Aug 2020, 14:36
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

23 Feb 2021, 01:33

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_E //q
#define ADMIN_SILVER	ADMIN_LEVEL_F //r

#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]

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

static const	g_szBeginning[ ] = "Membrii VIP",
				VIP_DEZACTIVAT_pentru[][]={
					"awp_india",
					"awp_garden",
					"awp_bycastor",
					"fy_snow",
					"awp_zigzag"
				},
				MESAJ_LOG_VIP_DEZACTIVAT_pentru[] = "Vipul a fost dezactivat pe aceasta mapa"


public plugin_init () {
	register_plugin ("PLUGIN", "VERSION", "AUTHOR")

	static MapName[35],left[5],right[1];
	get_mapname(MapName,charsmax(MapName))
	strtok(MapName,left,charsmax(left),right,charsmax(right),'_')
	for(new i;i<sizeof VIP_DEZACTIVAT_pentru;++i){
		if(containi(MapName,"_")!=-1){
			if(containi(VIP_DEZACTIVAT_pentru[i],left)!=-1){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
		else{
			if(equali(VIP_DEZACTIVAT_pentru[i],MapName)){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
	}
	
	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", "0")
	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", "5")	
	cvar_ap_kill_premium = register_cvar("amx_vip_addap", "0")
	cvar_hp_kill_classic = register_cvar("amx_vip_addhp", "0")	
	cvar_ap_kill_classic = register_cvar("amx_vip_addap", "0")
	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", "0")
	
	
	
	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 ("[Cs.Bs.Ro] VIP MENU Gold","menu_gold");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_GOLD)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_GOLD)
	menu_additem ( menu," AWP + Deagle + Grenades","3", ADMIN_GOLD)
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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 ("[Cs.Bs.Ro] VIP MENU Silver","menu_silver");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_SILVER)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_SILVER)


	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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);
		}
	}
}
Imi da eroare la compilare [ #include <colorchat_lang> ] Poti sa mi-l compilezi tu te rog frumos? am trecut eu mapele etc.
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 310
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 67 times
Been thanked: 10 times

23 Feb 2021, 11:11

colorchat_lang.inc , il pui in includes unde compilezi

Code: Select all

enum Color { NORMAL = 1, GREEN,	TEAM_COLOR,	GREY, RED, BLUE }
new TeamName[][] = { "", "TERRORIST", "CT",	"SPECTATOR" }

ColorChat(id, Color:iType, const szMsg[], any:...)
{
	static szMessage[256]

	switch(iType)
	{
		case NORMAL: szMessage[0] = 0x01
		case GREEN: szMessage[0] = 0x04
		default: szMessage[0] = 0x03
	}

	vformat(szMessage[1], charsmax(szMessage), szMsg, 4)
	replace_all(szMessage, charsmax(szMessage), "!n", "^x01")
	replace_all(szMessage, charsmax(szMessage), "!t", "^x03")
	replace_all(szMessage, charsmax(szMessage), "!g", "^x04")
		
	static iTeam, ColorChange, iIndex, iMsgType
	szMessage[192] = EOS
	
	if(id)
	{
		iMsgType = MSG_ONE
		iIndex = id
	}
	else
	{
		iIndex = FindPlayer()
		iMsgType = MSG_ALL
	}
	
	iTeam = get_user_team(iIndex)
	ColorChange = ColorSelection(iIndex, iMsgType, iType)
	ShowColorMessage(iIndex, iMsgType, szMessage)
		
	if(ColorChange)
		Team_Info(iIndex, iMsgType, TeamName[iTeam])
}

ShowColorMessage(id, iType, szMessage[])
{
	message_begin(iType, get_user_msgid("SayText"), _, id)
	write_byte(id)		
	write_string(szMessage)
	message_end()
}

Team_Info(id, iType, iTeam[])
{
	message_begin(iType, get_user_msgid("TeamInfo"), _, id)
	write_byte(id)
	write_string(iTeam)
	message_end()
	return 1
}

ColorSelection(iIndex, iType, Color:Type)
{
	switch(Type)
	{
		case RED: return Team_Info(iIndex, iType, TeamName[1]);
		case BLUE: return Team_Info(iIndex, iType, TeamName[2]);
		case GREY: return Team_Info(iIndex, iType, TeamName[0]);
	}

	return 0
}

FindPlayer()
{
	static i
	i = -1

	while(i <= get_maxplayers())
	{
		if(is_user_connected(++i))
			return i;
	}

	return -1
}
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3194
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: 39 times
Been thanked: 492 times
Contact:

23 Feb 2021, 20:22

ți am pus colorchat.............................................................
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor.
Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug la lista de „ignore”.
Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine(STEAM sau PM) dacă aveți o problemă/nelămurire în acest caz! (am cont doar aici!!)
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se va posta la actual, doar dacă se găsește ceva critic/urgent de remediat, fiind coduri vechi, iar unele refăcute recent. NU MAI OFER SUPORT PENTRU ELE!(doar dacă nu e ceva critic/sau plătit)
* Nume pe cs1.6: eVoLuTiOn
* Atelierul meu - anunturi/lev-shop-t370037.html
C0non
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 06 Aug 2020, 14:36
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

24 Feb 2021, 19:14

Code: Select all

L 02/24/2021 - 19:08:14: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20210224.log")
L 02/24/2021 - 19:08:14: [AMXX] Plugin ("vips.amxx") is setting itself as failed.
L 02/24/2021 - 19:08:14: [AMXX] Plugin says: Vipul a fost dezactivat pe aceasta mapa
L 02/24/2021 - 19:08:14: [AMXX] Run time error 1 (plugin "vips.amxx") - forced exit
Aceiasi problema apare, si vip-ul nu merge pe nici o mapa! puteti da T/c.
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 310
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 67 times
Been thanked: 10 times

25 Feb 2021, 01:28

C0non wrote:
24 Feb 2021, 19:14

Code: Select all

L 02/24/2021 - 19:08:14: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20210224.log")
L 02/24/2021 - 19:08:14: [AMXX] Plugin ("vips.amxx") is setting itself as failed.
L 02/24/2021 - 19:08:14: [AMXX] Plugin says: Vipul a fost dezactivat pe aceasta mapa
L 02/24/2021 - 19:08:14: [AMXX] Run time error 1 (plugin "vips.amxx") - forced exit
Aceiasi problema apare, si vip-ul nu merge pe nici o mapa! puteti da T/c.
Baietii ti-au dat plg corect , aici pui doar prefixul la harti ( awp_ , dr_, bb_ ,cs _, etc) nu tot numele la harta :X

Code: Select all

VIP_DEZACTIVAT_pentru[][]={
					"awp_india",
					"awp_garden",
					"awp_bycastor",
					"fy_snow",
					"awp_zigzag"
lexz
Membru, skill +1
Membru, skill +1
Posts: 105
Joined: 02 Nov 2020, 01:57
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 5 times
Been thanked: 11 times

25 Feb 2021, 08:28

C0non
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 06 Aug 2020, 14:36
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

25 Feb 2021, 22:19

Multumesc foarte mult! Rezolvat
User avatar
Rainq
Fost moderator
Fost moderator
Posts: 2612
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: zm.thexforce.ro
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: www.thexforce.ro
Has thanked: 18 times
Been thanked: 40 times
Contact:

25 Feb 2021, 23:08

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_E 
#define ADMIN_SILVER	ADMIN_LEVEL_F 

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

new Cvar_VIP
new Runda_Arme = 3
new bool: Activare = false
new Contor = 0
new g_szMessage[256]

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

static const	g_szBeginning[ ] = "Membrii VIP", // aici pui mapele pe care nu vrei sa activeze vipul
				VIP_DEZACTIVAT_pentru[][]={
					"fy_buzzkill",
					"zm_ice_attack3",
					"awp_zigzag",
					"fy_snow",
					"deathrun_arctic"
				},
				MESAJ_LOG_VIP_DEZACTIVAT_pentru[] = "Vipul a fost dezactivat pe aceasta mapa"


public plugin_init () {
	register_plugin ("PLUGIN", "VERSION", "AUTHOR")

	static MapName[35],left[5],right[1];
	get_mapname(MapName,charsmax(MapName))
	strtok(MapName,left,charsmax(left),right,charsmax(right),'_')
	for(new i;i<sizeof VIP_DEZACTIVAT_pentru;++i){
		if(containi(MapName,"_")!=-1){
			if(containi(VIP_DEZACTIVAT_pentru[i],left)!=-1){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
		else{
			if(equali(VIP_DEZACTIVAT_pentru[i],MapName)){
				set_fail_state(MESAJ_LOG_VIP_DEZACTIVAT_pentru)
				break
			}
		}
	}
	
	register_clcmd("say /vip", "vip_info")
	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", "0")
	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", "5")	
	cvar_ap_kill_premium = register_cvar("amx_vip_addap", "0")
	cvar_hp_kill_classic = register_cvar("amx_vip_addhp", "0")	
	cvar_ap_kill_classic = register_cvar("amx_vip_addap", "0")
	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", "0")
	
	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) // Iti arata VIP-ul in 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_disconnected(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 GoldMenu( id )
{
	
	static menu;
	menu = menu_create ("[Cs.Bs.Ro] VIP MENU Gold","menu_gold");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_GOLD)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_GOLD)
	menu_additem ( menu," AWP + Deagle + Grenades","3", ADMIN_GOLD)
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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 )
{
	static menu;
	menu = menu_create ("[Cs.Bs.Ro] VIP MENU Silver","menu_silver");
	
	menu_additem ( menu," M4A1 + Deagle + Grenades","1", ADMIN_SILVER)
	menu_additem ( menu," AK47 + Deagle + Grenades","2", ADMIN_SILVER)


	menu_setprop ( menu, MPROP_NUMBER_COLOR,"");
	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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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,1)
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_bpammo(id, CSW_FLASHBANG, 1)
			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:...) // Cine se uita in cod isi va da seama ca nu e modificat nimic doar sterse codurile inutile pentru eliberare de linii :))
{
	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);
		}
	}
}
Image
Post Reply

Return to “Scripting”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest