Cerere modificare shop

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 .
Post Reply
User avatar
GoGuT112
Membru, skill 0
Membru, skill 0
Posts: 81
Joined: 05 Jan 2018, 06:40
Detinator Steam: Da
CS Status: My name is smokra
Detinator server CS: Offensive.JoinGam.RO
Fond eXtream: 0
Location: Giurgiu

29 Feb 2020, 22:00

Plugin Cerut: Modificare plugin /shop
Descriere (adica ce face el mai exact): Doresc si eu sa imi adaugati in acest meniu
| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta_util> 

#pragma tabsize 0

native get_user_points( id )
native set_user_points( id, points )

new bool: Speed[17];
new const szTg[] = "Shop";

public plugin_init( ) {

	register_plugin( "S", "shop", "Andy" );

	RegisterHam( Ham_Spawn, "player", "Sp", true );
	register_event("CurWeapon" , "CWeapon" , "be" , "1=1" );

	register_clcmd( "say shop", "TS", -1 );
	register_clcmd( "say /shop", "TS", -1 );
	register_clcmd( "say_team shop", "TS", -1 );
	register_clcmd( "say_team /shop", "TS", -1 );
}
public client_putinserver( id ) {
Speed[id] = false;
}

public TS( id ) {

	if( is_user_connected( id ) && is_user_alive( id ) ) {
		switch( get_user_team( id ) )
			{
				case 1,2: SM( id );	
			}
	}
	else
	client_printcolor( id, "^4[%s]^1Trebuie sa fi in viata pentru a deschide ^3Shopul ^1!", szTg );
}



public SM( id ) {

	new szMenu[ 10 char ];
	format( szMenu, charsmax( szMenu ), "\r[%s] \wMenu",szTg);
	new menu = menu_create ( szMenu , "Menu" );

	menu_additem( menu, "\w10 HP \r[5 Puncte]", "1", 0);
	menu_additem( menu, "\w10 AP \r[5 Puncte]", "2", 0);
	menu_additem( menu, "\wGravitatie \y400 \r[2 Puncte]", "3", 0);
	menu_additem( menu, "\wSpeed \y450 \r[5 Puncte]", "4", 0);
	menu_additem( menu, "\wSchimb \y1000$ \wcu \y1 Punct", "5", 0);

	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	menu_display ( id, menu, 0 );
	return 1;
}


public Menu( id, menu, item ) {

	if( item == MENU_EXIT )
		{
			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:
		{

			new points = get_user_points( id ) - 10;
			if( points < 0 )
			{
				client_printcolor( id, "^4[%s]^1Nu ai destule puncte !",szTg );
				return 1;
				
			}
			else
			{
			new iHealth = get_user_health(id); 
			if(iHealth >= 120) { 
			client_printcolor( id, "^4[%s]^1 Ai atins limita maxima de ^3 120 HP", szTg );
			}
			else
			{
			fm_set_user_health(id, iHealth + 10); 
			set_user_points( id, points );
			return 1;
		}
		}
		}
		case 2:
		{
			new points = get_user_points( id ) - 10;
			if( points < 0 )
			{
				client_printcolor( id, "^4[%s]^1Nu ai destule puncte !",szTg );
				return 1;
				
			}
			else
			{
			new iArmor = get_user_armor(id); 
			if(iArmor >= 120) {
			client_printcolor( id, "^4[%s]^1 Ai atins limita maxima de ^3 120 AP", szTg );
			}
			else
			{
			fm_set_user_armor(id, iArmor + 10);
			client_printcolor( id, "^4[%s]^1 Ai cumparat ^3 10 AP", szTg );
			set_user_points( id, points );
			return 1;
		}
		}
		}
		case 3:
		{
			new points = get_user_points( id ) - 2;
			if( points < 0 )
			{
				client_printcolor( id, "^4[%s]^1Nu ai destule puncte !",szTg );
				return 1;
				
			}
			set_user_gravity(id, 0.5);
			client_printcolor( id, "^4[%s]^1 Ai cumparat ^3 400 Gravitatie", szTg );
			set_user_points( id, points );
			return 1;

		}
		case 4:
		{
			new points = get_user_points( id ) - 5;
			if( points < 0 )
			{
				client_printcolor( id, "^4[%s]^1Nu ai destule puncte !",szTg );
				return 1;
				
			}
			Speed[id] = true;
			client_printcolor( id, "^4[%s]^1 Ai cumparat ^3 450 Speed", szTg );
			set_user_points( id, points );
			return 1;
		}
		case 5:
		{

			Schimb(id);
			
			
		}
	}
	return 1;
}

public Schimb ( id )
{
	new money = cs_get_user_money( id );
	new points = get_user_points( id );
	new szSchimb[ 10 char ];
	format( szSchimb, charsmax( szSchimb ), "\r[%s] \wSchimb Bani / Points",szTg);
	new SchimbMenu = menu_create ( szSchimb , "SchimbHandled" );

	if( points < 1 )
	{
		menu_additem( SchimbMenu, "\w1 Puncte \y- \r1000$", "1", 0);
	}
	else
	{
		menu_additem( SchimbMenu, "\w1 Puncte \y- \d No Money", "1", 0);
	}
	if( money < 1000 )
	{
		menu_additem( SchimbMenu, "\w1000$ \y- \r1 Puncte", "2", 0);
	}
	else
	{
		menu_additem( SchimbMenu, "\w1000$ \y- \d No Points", "2", 0);
	}

	menu_setprop ( SchimbMenu, MPROP_EXIT, MEXIT_ALL );
	menu_display ( id, SchimbMenu, 0 );
	return 1;
	
	
}

public SchimbHandled( id, SchimbMenu, item ) {

	if( item == MENU_EXIT )
		{
			return 1;
		}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	menu_item_getinfo ( SchimbMenu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );	
	switch(key)
	{
		case 1:
		{

			new money = cs_get_user_money( id );
			
				new points = get_user_points( id );
				if( money < 1000 )
				{
					client_printcolor( id, "^4[%s]^1Nu ai destui sau bani pentru a face schimbul !",szTg );
					return 1;
				
				}
				client_printcolor( id, "^4[%s]^1Ai schimbat ^3 1 Puncte ^1si ai primit ^3 1000$ ^1!", szTg);
				cs_set_user_money( id, money - 1000 );
				set_user_points( id, points + 1 );
				return 1;
		}
		case 2:
		{
			new money = cs_get_user_money( id );
			
				new points = get_user_points( id );
				if( points < 1 )
				{
					client_printcolor( id, "^4[%s]^1Nu ai destule sau points pentru a face schimbul !",szTg );
					return 1;
				
				}
				client_printcolor( id, "^4[%s]^1Ai schimbat ^3 1000$ ^1si ai primit ^3 1 Points ^1!", szTg);
				cs_set_user_money( id, money + 1000 );
				set_user_points( id, points - 1 );
				return 1;
		}
	}
	return 1;
}


public CWeapon( id ) {

	if( Speed[ id ] ) {
		if( get_user_weapon(id)) {
			set_user_maxspeed(id, 450.0);
		}
	}
}

public Sp( id ) {
Speed[id] = false;
set_user_gravity(id, 1.0);
}

stock client_printcolor(const id, const input[], any:...)
{
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
    
    replace_all(msg, 190, "!g", "^x04"); // Green Color
    replace_all(msg, 190, "!n", "^x01"); // Default Color
    replace_all(msg, 190, "!t", "^x03"); // Team Color
    
    if(id)
        players[0] = id;
    else
        get_players(players, count, "ch");
    
    for (new i = 0; i < count; i++)
    {
        message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
        write_byte(players);
        write_string(msg);
        message_end();
    }
}
urmatoarele :
CUMPARA VIP 7 ZILE
CUMPARA VIP O LUNA
CUMPARA VIP PERMANENT
SI playerul care cumpara sa primeasca flagul "t" pe perioda care a cumparat cu un numar de puncte setat de mine .
Si in chat sa ii scrie : Felicitari ! Ai cumparat VIP 7 Zile , Felicitari ! Ai cumparat VIP O LUNA , Felicitari ! Ai cumparat VIP PERMANENT SI VIPUL sa tina pana pe data care a cumparat el .
VIPUL Sa se salveze pe nick intrun fisier .ini numit vipshop.ini si cand cumpara sa il intrebe daca vrea sa isi seteze o parola pentru vip .
Va las aici si sistemul de puncte poate este nevoie :
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >
#include < CC_ColorChat >
#include < csx >
#include < cstrike >

#pragma semicolon 1

#define ADMIN_ACCESS ADMIN_IMMUNITY
#define is_user_player(%1) ( 1 <= %1 <= g_MaxPlayers )

#define PLUGIN_NAME 	"Engine Sistem Puncte"
#define PLUGIN_VERSION 	"1.1"
#define PLUGIN_AUTHOR 	"Yonutz"

new const g_szTag[ ] = "[RUN]";

// Make files?
new const szWriteCvarsPoints[  ] = "addons/amxmodx/configs/points/points.cfg";
new const szLocationPoints[  ] = "addons/amxmodx/configs/points";

const PEV_SPEC_TARGET = pev_iuser2;

new g_iUserPoints[ 33 ];
new File[ 128 ];

new points_gamename;
new SyncHudMessage, g_MaxPlayers;

enum _:iCvars {

	EnableBombEvents,
	ShowType,
	CostOnePoint,
	PointsPerHS,
	PointsBombPlanted,
	PointsBombExploded,
	PointsBombDefused,
	AddPointsNewRound,
	EnableRespawn,
	PointsForRespawn,
	PointsForRespawnChance
}
;
new g_iCvar[ iCvars ];

public plugin_init( ) {

	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
	
	register_event( "DeathMsg", "event_DeathMsg", "a" );

	register_forward( FM_GetGameDescription, "GameDesc" ); 
	register_forward( FM_PlayerPreThink, "fwd_PlayerPreThink" );

	RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawned_Post", 1 );
	RegisterHam( Ham_Killed, "player", "Ham_PlayerKilled", 1 );
	
	register_clcmd( "say /cp", "ClCmdSayBuyPoint" );
	register_clcmd( "say_team /cp", "ClCmdSayBuyPoint" );

	register_clcmd( "say /top", "ClCmdSayShowAllPoints" );
	register_clcmd( "say_team /top", "ClCmdSayShowAllPoints" );

	register_clcmd( "say /puncte", "ClCmdSayPoints" );
	register_clcmd( "say_team /puncte", "ClCmdSayPoints" );

	register_concmd( "amx_acorda_puncte" ,"ClCmdGivePoints", ADMIN_ACCESS, "< nume / @ALL / @T / @CT > < Puncte >" );
	register_concmd( "amx_retrage_puncte", "ClCmdTakePoints", ADMIN_ACCESS, "< nume > < Puncte >" );
	register_concmd( "amx_reset_puncte", "ClCmdResetPoints", ADMIN_ACCESS, "< nume / @ALL >" );
	
	g_iCvar[ ShowType ] = register_cvar( "points_show_info", "1" );
	g_iCvar[ EnableBombEvents ] = register_cvar( "points_bombevents_rewards", "1" );
	g_iCvar[ CostOnePoint ] = register_cvar( "points_costonepoint", "4000" );
	g_iCvar[ PointsPerHS ] = register_cvar( "points_per_headshot", "2" );
	g_iCvar[ PointsBombPlanted ] = register_cvar( "points_bomb_planted", "4" );
	g_iCvar[ PointsBombExploded ] = register_cvar( "points_bomb_exploded", "1" );
	g_iCvar[ PointsBombDefused ] = register_cvar( "points_bomb_defused", "5" );
	g_iCvar[ PointsForRespawn ] = register_cvar( "points_for_respawn", "10" );
	g_iCvar[ PointsForRespawnChance ] = register_cvar( "points_respawn_chance", "70" );
	g_iCvar[ EnableRespawn ] = register_cvar( "points_enable_respawn", "1" );
	points_gamename = register_cvar( "points_gamename", "RUN INDUNGI SISTEMS" );

	SyncHudMessage = CreateHudSyncObj(  );
	g_MaxPlayers = global_get( glb_maxClients );

	new DataDir[ 64 ];
	get_datadir( DataDir, 63 );
	format( File, 127, "%s/AdvancedPointsSystem.dat", DataDir );
}

public plugin_precache(  ) {

	server_cmd( "exec %s", szWriteCvarsPoints );
       
	if( !dir_exists( szLocationPoints ) )
		mkdir( szLocationPoints );

	if( !file_exists( szWriteCvarsPoints ) ) {

		write_file( szWriteCvarsPoints, "// In acest fisier se afla cvar-urile legate despre puncte:");
		write_file( szWriteCvarsPoints, " ");
		write_file( szWriteCvarsPoints, "points_show_info ^"1^" // 0: Afiseaza datele in HUD sub radar | 1: Afiseaza datele deasupra vietii" );
		write_file( szWriteCvarsPoints, "points_bombevents_rewards ^"1^" // 0: Dezactivat | 1: Activat -> Puncte obtinute pe plantarea/dezamorsarea/explodearea bombei" );
		write_file( szWriteCvarsPoints, "points_costonepoint ^"4000^" // Cat sa coste un punct atunci cand il cumperi prin comanda /buypoint" );
		write_file( szWriteCvarsPoints, "points_per_headshot ^"2^" // Cate puncte sa primesti pe HeadShot !" );
		write_file( szWriteCvarsPoints, "points_bomb_planted ^"1^" // Cate puncte sa primesti pe plantarea bombei" );
		write_file( szWriteCvarsPoints, "points_bomb_exploded ^"2^" // Cate puncte sa primesti pe explodarea bombei" );
		write_file( szWriteCvarsPoints, "points_bomb_defused ^"1^" // Cate puncte sa primesti pe dezamorsarea bombei" );
		write_file( szWriteCvarsPoints, "points_enable_respawn ^"1^" // Activeaza / Dezactiveaza respawn-ul cand victima moare doar daca are X PUNCTE" );
		write_file( szWriteCvarsPoints, "points_for_respawn ^"1000^" // Cate puncte sa aiba victima ca sa poata reinvia atunci cand este omorata" );
		write_file( szWriteCvarsPoints, "points_respawn_chance ^"40^" // Cate sanse sa aiba victima ca sa poata reinvia" );
		write_file( szWriteCvarsPoints, "points_gamename ^"Adv. Points System v1.1^" // Schimbi numele default( Counter-Strike ) cu altul" );
		//write_file( szWriteCvarsPoints, "cvar ^"1 / 0^" // De cate sanse are nevoie victima ca sa invie atunci cand are X PUNCTE" );
	}
}

public plugin_natives( ) {

	register_native( "get_user_points", "native_get_user_points", 1 );
	register_native( "set_user_points", "native_set_user_points", 1 );
}

public native_get_user_points( id ) {

	return g_iUserPoints[ id ];
}

public native_set_user_points( id, points ) {

	g_iUserPoints[ id ] = points;
}

public client_putinserver( id ) {

	LoadUserPoints( id );
}

public client_disconnect( id ) {

	SaveUserPoints( id );
}

public GameDesc( ) {

	static szGameName[ 32 ];

	get_pcvar_string( points_gamename, szGameName, 31 );
	forward_return( FMV_STRING, szGameName );

	return FMRES_SUPERCEDE; 
}

public fwdPlayerPreThink( id ) {
	
	if( is_user_alive( id ) ) {
		
		new target, body; 
		get_user_aiming( id, target, body, 9999 );
		
		new CsTeams:team = cs_get_user_team( id );
		
		if( is_user_alive( target ) ) {

			if( is_user_player( target ) ) {
			
				new CsTeams:targetTeam = cs_get_user_team( target );
				
				new szName[ 32 ];
				get_user_name( target,  szName, sizeof( szName ) -1 );
							
				new sMessage[ 64 ];
				if( targetTeam == team ) {

					formatex( sMessage, sizeof( sMessage ) -1, "%s: %s^nHealth: %i | Puncte: %i", is_user_vip( target ) ? "VIP" : "Friend", szName, get_user_health( target ), g_iUserPoints[ target ] );
				}

				else if( targetTeam != team && team != CS_TEAM_CT ) {

					formatex( sMessage, sizeof( sMessage ) -1, "%s: %s^nHealth: %i | Puncte: %i", is_user_vip( target ) ? "VIP" : "Enemy", szName, get_user_health( target ), g_iUserPoints[ target ] );
				}
					
				if( targetTeam == CS_TEAM_CT ) {

					set_hudmessage( 0, 255, 0, -1.0, 0.6, 0, 0.0, 0.1, 0.0, 0.0, -1 );
				}

				else if( targetTeam == CS_TEAM_T ) {

					set_hudmessage( 127, 0, 0, -1.0, 0.6, 0, 0.0, 0.1, 0.0, 0.0, -1 );
				}	
				
				show_hudmessage( id, "%s",  sMessage );
			}
		}
	}
	
	return FMRES_IGNORED;
}

public event_DeathMsg( ) {

	new iKiller = read_data( 1 );
	new iVictim = read_data( 2 );
	new iHeadshot = read_data( 3 );
	
	if( !is_user_connected( iKiller ) || !is_user_connected( iVictim ) ) {

		return;
	}
	
	if( iKiller == iVictim ) {

		return;
	}
	
	if( iHeadshot ) {

		g_iUserPoints[ iKiller ] += get_pcvar_num( g_iCvar[ PointsPerHS ] );
		set_hudmessage( random( 255 ), random( 255 ), random( 255 ), 0.6, 0.7, 1, 6.0, 7.0 );
		show_hudmessage( iKiller, "+%i points", get_pcvar_num( g_iCvar[ PointsPerHS ] ) );
	}

	else {

		g_iUserPoints[ iKiller ]++;
		set_hudmessage( random( 255 ), random( 255 ), random( 255 ), 0.6, 0.7, 0, 6.0, 7.0 );
		show_hudmessage( iKiller, "+1 point" );
	}
}

public Ham_PlayerSpawned_Post( id ) {

	if( is_user_connected( id ) && is_user_alive( id ) ) {

		set_task( 1.0, "ShowHud", id, _, _, "b" );
	}
}

public Ham_PlayerKilled( iVictim, iAttacker, iShouldgib ) {

	if( get_pcvar_num( g_iCvar[ EnableRespawn ] ) == 0 || !is_user_connected( iVictim ) )
		return PLUGIN_CONTINUE;

	new iPoints = get_pcvar_num( g_iCvar[ PointsForRespawn ] );
	new iChance = random_num( 1, 100 );
	new iAccepted = get_pcvar_num( g_iCvar[ PointsForRespawnChance ] );

	if( g_iUserPoints[ iVictim ] == iPoints ) {

		if( iChance <= iAccepted ) {

			ExecuteHamB( Ham_CS_RoundRespawn, iVictim );
			ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Tocmai ai fost inviat pentru ca ai avut^x03 %i^x01 sanse !", g_szTag, iChance );
		}

		if( iChance >= iAccepted ) {

			ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Poate runda viitoare vei avea^x03 %i^x01 sanse pentru a putea reinvia !", g_szTag, iChance );
		}
	}

	return PLUGIN_CONTINUE;
}

public ShowHud( id ) {

	switch( get_pcvar_num( g_iCvar[ ShowType ] ) ) {

		case 0: {
	
			if( is_user_connected( id ) && is_user_alive( id ) && ( get_user_team( id ) == 1 || get_user_team( id ) == 2 ) ) {

				set_hudmessage( random( 250 ), random( 250 ), random( 250 ), 0.01, 0.23, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, "HP: %d^nPoints: %d", get_user_health( id ), g_iUserPoints[ id ] );
			}

			else {

				new idSpec;
				new iPlayerName[ 32 ];

				idSpec = pev( id, PEV_SPEC_TARGET );
				get_user_name( idSpec, iPlayerName, 31 );

				set_hudmessage( random( 250 ), random( 250 ), random( 250 ), 0.01, 0.22, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, "Spectating: %s^nHealth: %d^nPuncte: %d", iPlayerName, get_user_health( idSpec ), g_iUserPoints[ idSpec ] );
			}
		}

		case 1: {
	
			if( is_user_connected( id ) && is_user_alive( id ) && ( get_user_team( id ) == 1 || get_user_team( id ) == 2 ) ) {

				set_hudmessage( 0, 0, 254, 0.01, 0.91, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, "HP: %d | AP: %d | Puncte: %d", get_user_health( id ), get_user_armor( id ), g_iUserPoints[ id ] );
			}

			else {

				new idSpec;
				new iPlayerName[ 32 ];

				idSpec = pev( id, PEV_SPEC_TARGET );
				get_user_name( idSpec, iPlayerName, 31 );

				set_hudmessage( random( 250 ), random( 250 ), random( 250 ), -1.0, 0.7, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, "Spectating: %s^nHealth: %d^nPuncte: %d", iPlayerName, get_user_health( idSpec ), g_iUserPoints[ idSpec ] );
			}
		}
	}
}

public ClCmdSayBuyPoint( id ) {

	if( is_user_connected( id ) )
	{
		new g_iUserMoney = cs_get_user_money( id );
		new iNeededMoney = get_pcvar_num( g_iCvar[ CostOnePoint ] );
 
		if( g_iUserMoney < iNeededMoney )
 
		ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Mai ai nevoie de^x03 %d $^x01 pentru a cumpara^x03 1 punct^x01 !", g_szTag, iNeededMoney - g_iUserMoney );
 
		else {
 
			g_iUserPoints[ id ] += 1;
			cs_set_user_money( id, g_iUserMoney - iNeededMoney );
			ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Tocmai ai cumparat^x03 1 punct^x01 pentru^x03 %d $ !", g_szTag, iNeededMoney );
		}
	}
}

public ClCmdSayShowAllPoints( id ) {

	new iPlayers[ 32 ], iPlayersNum, szName[ 40 ], szMotd[ 1024 ], len;

	len = formatex( szMotd, charsmax( szMotd ), "<html> ");
	get_players( iPlayers, iPlayersNum );

	for( new i = 0 ; i < iPlayersNum ; i++ ) {

		get_user_name( iPlayers[ i ], szName, charsmax( szName ) );
		len += formatex( szMotd[ len ], charsmax( szMotd ) - len, "<br> <center> <font color=#008000>Name:</font> <font color=#8A2BE2>%s</font> | <font color=#008000>Points:</font> <font color=#8A2BE2>%i</font> </center> <br>", szName, g_iUserPoints[ iPlayers[ i ] ] );
	}

	formatex( szMotd[ len ], charsmax( szMotd ) - len, "</html>" );
	show_motd( id, szMotd );	
}

public ClCmdSayPoints( id ) {

	set_hudmessage( 127, 42, 255, 0.03, 0.86, 2, 6.0, 10.0 );
	show_hudmessage( id, "Ai %i puncte !", g_iUserPoints[ id ] );
	
	ColorChat( id, TEAM_COLOR, "^x04%s^x01 Ai^x03 %i^x01 puncte !!!", g_szTag, g_iUserPoints[ id ] );
	
	return PLUGIN_CONTINUE;
}

public bomb_planted( iPlanter ) {

	if( get_pcvar_num( g_iCvar[ EnableBombEvents ] ) == 0 || !is_user_connected( iPlanter ) )
		return PLUGIN_CONTINUE;
		
	g_iUserPoints[ iPlanter ] += get_pcvar_num( g_iCvar[ PointsBombPlanted ] );
	ColorChat( 0, TEAM_COLOR, "^x04%s^x03 %s^x01 a primit^x03 1 punct^x01 pentru plantarea bombei !", g_szTag, get_name( iPlanter ) );
	
	return PLUGIN_CONTINUE;
}

public bomb_explode( iExploder ) {
	
	if( get_pcvar_num( g_iCvar[ EnableBombEvents ] ) == 0 || !is_user_connected( iExploder ) )
		return PLUGIN_CONTINUE;
		
	g_iUserPoints[ iExploder ] += get_pcvar_num( g_iCvar[ PointsBombExploded ] );
	ColorChat( 0, TEAM_COLOR, "^x04%s^x03 %s^x01 a primit^x03 2 puncte^x01 pentru explodarea bombei !", g_szTag, get_name( iExploder ) );
	
	return PLUGIN_CONTINUE;
}

public bomb_defused( iDefuser ) {

	if( get_pcvar_num( g_iCvar[ EnableBombEvents ] ) == 0 || !is_user_connected( iDefuser ) )
		return PLUGIN_CONTINUE;
		
	g_iUserPoints[ iDefuser ] += get_pcvar_num( g_iCvar[ PointsBombDefused ] );
	ColorChat( 0, TEAM_COLOR, "^x04%s^x03 %s^x01 a primit^x03 1 punct^x01 pentru dezamorsarea bombei !", g_szTag, get_name( iDefuser ) );
	
	return PLUGIN_CONTINUE;
}

public ClCmdGivePoints( id ) {

	if( !( get_user_flags( id ) & ADMIN_ACCESS ) ) {

		client_cmd( id, "echo Nu ai acces la aceasta comanda!" );
		return 1;
	}
	
	new szFirstArg[ 32 ], szSecondArg[ 10 ];
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) ) {

		client_cmd( id, "echo amx_give_points < nume / @ALL / @T / @CT > < points >" );
		return 1;
	}
	
	new iPlayers[ 32 ];
	new iPlayersNum;
	
	new iPoints = str_to_num( szSecondArg );
	if( iPoints <= 0 ) {

		client_cmd( id, "echo Valoare Punctelor trebuie sa fie mai mare decat 0!" );
		return 1;
	}
	
	if( szFirstArg[ 0 ] == '@' ) {

		switch ( szFirstArg[ 1 ] ) {

			case 'A': {

				if( equal( szFirstArg, "@ALL" ) ) {
					
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )
						g_iUserPoints[ iPlayers[ i ] ] += iPoints;
						
					ColorChat( 0, TEAM_COLOR, "^x04^%s^x01 Adminul^x03 %s^x01 le-a dat^x03 %i Puncte^x01 tuturor jucatorilor!", g_szTag, get_name( id ), iPoints );
					return 1;
				}
			}
			
			case 'T': {

				if( equal( szFirstArg, "@T" ) ) {
					
					get_players( iPlayers, iPlayersNum, "ceh", "TERRORIST" );
					if( iPlayersNum == 0 ) {

						client_cmd( id, "echo Nu se afla niciun jucator in aceasta echipa!" );
						return 1;
					}

					for( new i = 0; i < iPlayersNum ; i++ )
						g_iUserPoints[ iPlayers[ i ] ] += iPoints;
						
					ColorChat( 0, TEAM_COLOR, "^x04^%s^x01 Adminul^x03 %s^x01 le-a dat^x03 %i puncte^x01 jucatorilor de la^x03 TERO^x01!", g_szTag, get_name( id ), iPoints );
					return 1;
				}
			}
			
			case 'C': {

				if( equal( szFirstArg, "@CT" ) ) {
					
					get_players( iPlayers, iPlayersNum, "ceh", "CT" );
					if( iPlayersNum == 0 ) {

						client_cmd( id, "echo Nu se afla niciun jucator in aceasta echipa!" );
						return 1;
					}

					for( new i = 0; i < iPlayersNum ; i++ )
						g_iUserPoints[ iPlayers[ i ] ] += iPoints;
						
					ColorChat( 0, TEAM_COLOR, "^x04^%s^x01 Adminul^x03 %s^x01 le-a dat^x03 %i puncte^x01 jucatorilor de la^x03 CT^x01!", g_szTag, get_name( id ), iPoints );
					return 1;
				}
			}
		}
	}
		
	new iPlayer = cmd_target( id, szFirstArg, 8 );
	if( !iPlayer ) {

		client_cmd( id, "echo Jucatorul %s nu a fost gasit!", szFirstArg );
		return 1;
	}
	
	g_iUserPoints[ iPlayer ] += iPoints;
	
	new szName[ 32 ];
	get_user_name( iPlayer, szName, sizeof ( szName ) -1 );
	
	ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Adminul^x03 %s^x01 i-a dat^x03 %i puncte^x01 lui^x03 %s^x01.", g_szTag, get_name( id ), iPoints, szName );
	
	return 1;
}

public ClCmdTakePoints( id ) {

	if( !( get_user_flags( id ) & ADMIN_ACCESS ) ) {

		client_cmd( id, "echo Nu ai acces la aceasta comanda!" );
		return 1;
	}
	
	new szFirstArg[ 32 ], szSecondArg[ 10 ];
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) ) {

		client_cmd( id, "echo amx_take_points < nume > < puncte >" );
		return 1;
	}
	
	new iPoints = str_to_num( szSecondArg );
	if( iPoints <= 0 ) {

		client_cmd( id, "echo Valoare Punctelor trebuie sa fie mai mare decat 0!" );
		return 1;
	}
			
	new iPlayer = cmd_target( id, szFirstArg, 8 );
	if( !iPlayer ) {

		client_cmd( id, "echo Jucatorul %s nu a fost gasit!", szFirstArg );
		return 1;
	}
	
	if( g_iUserPoints[ iPlayer ] < iPoints ) {

		client_cmd( id, "echo Jucatorul %s nu are atatea puncte! Are doar %i puncte !", szFirstArg, g_iUserPoints[ iPlayer ] );
		return 1;
	}
	
	g_iUserPoints[ iPlayer ] -= iPoints;
	
	new szName[ 32 ];
	get_user_name( iPlayer, szName, sizeof( szName ) -1 );
	
	ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Adminul^x03 %s^x01 i-a sters^x03 %i puncte^x01 lui^x03 %s^x01.", g_szTag, get_name( id ), iPoints, szName );
	
	return 1;
}

public ClCmdResetPoints( id, level, cid ) {

	if( !cmd_access( id, level, cid, 2 ) ) {

		return PLUGIN_HANDLED; 
	}
	
	new szArgument[ 32 ];
   	read_argv( 1, szArgument, charsmax( szArgument ) );
	
	new iPlayer[ 32 ], iPlayersNum, all;
	get_players( iPlayer, iPlayersNum, "c" );

	if( equal( szArgument, "@ALL" ) ) {

		for( new i; i < iPlayersNum; i++ ) {

			all = iPlayer[ i ];
			
			g_iUserPoints[ all ] = 0;
			
			ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Adminul^x03 %s^x01 v-a resetat toate^x03 punctele !!!", g_szTag, get_name( id ) );
		}
	}
			
	else {

		new player = cmd_target( id, szArgument, 10 );

		if( !player )  {

  			 return PLUGIN_HANDLED;
		}
	

		new TargetName[ 32 char ];
		get_user_name( player, TargetName, charsmax( TargetName ) );
	
		g_iUserPoints[ player ] = 0;
		ColorChat( 0, TEAM_COLOR, "^x04%s^x01 Adminul^x03 %s^x01 i-a resetat punctele lui^x03 %s^x01 !!!", g_szTag, get_name( id ), TargetName );
	}

	return PLUGIN_HANDLED;
}

public SaveUserPoints( id ) {

	new Name[ 32 ];
	get_user_name( id, Name, 31 );
	
	static Data[ 1024 ];
	formatex( Data, sizeof( Data ) - 1, "^"%i^"", g_iUserPoints[ id ] );
	
	new Save[ 512 ];
	format( Save, 511, "^"%s^" %s", Name, Data );
	
	new Line[ 128 ], Linie, IsPlayer = false, Arg1[ 32 ];
	
	new FileOpen = fopen( File, "rt" );

	while( !feof( FileOpen ) ) {

		fgets( FileOpen, Line, 127 );
		trim( Line );
		
		parse( Line, Arg1, 31 );
		
		if( equali( Arg1, Name ) ) {

			write_file( File, Save, Linie );
			IsPlayer = true;
			break;
		}
		
		Linie++;
	}

	fclose( FileOpen );

	if( !IsPlayer ) {

		write_file( File, Save, -1 );
	}
}

public LoadUserPoints( id ) {

	new Name[ 32 ];
	get_user_name( id, Name, 31 );
	
	new Line[ 128 ], IsPlayer = false, Arg1[ 32 ], Arg2[ 32 ];
	
	new FileOpen = fopen( File, "rt" );

	while( !feof( FileOpen ) ) {

		fgets( FileOpen, Line, 127 );
		trim( Line );
		
		parse( Line, Arg1, 31, Arg2, 31 );
		
		if( equali( Arg1, Name ) ) {

			g_iUserPoints[ id ] = str_to_num( Arg2 );
			IsPlayer = true;
			break;
		}
	}

	fclose( FileOpen );
	
	if( !IsPlayer ) {

		g_iUserPoints[ id ] = 1;
	}
}

stock get_name( id ) {

	new szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	return szName;
}

stock bool:is_user_vip( id ) {

	if( get_user_flags( id ) & read_flags( "h" )  )
		return true;
	
	return false;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Si sursa de la vip :
| Afiseaza codul
#include <amxmodx>

#include <hamsandwich>

#include <cstrike>

#include <engine>

#include <fun>

#include <fakemeta>



#pragma tabsize 0



#define is_user_vip(%1)   (get_user_flags(%1) & ADMIN_LEVEL_H)



new const PLUGIN_NAME[] = "[Offensive] VIP System", 

    PLUGIN_VERSION[] = "1.0", 

    PLUGIN_AUTHOR[] = "YONTU";



// Hack to be able to use Ham_Player_ResetMaxSpeed (by joaquimandrade)

new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;

new g_JumpNum[33] = 0

new bool:g_bJump[33] = false



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);



enum { HEALTH = 0, ARMOR = 1, START_MONEY, MAX_JUMPS, SPEED, DAMAGE, HP_KILL, HP_HEADSHOT, MONEY_KILL };

new const vip_benefits[] =

{

   100,   // VIATA LA SPAWN

   100,   // ARMURA LA SPAWN

   12000,   // BANII LA START

   1,   // NUMARUL MAXIM DE SARITURI

   250,   // VITEZA MAXIMA

   10,   // DAMAGE IN PLUS (VALOAREA SA FIE INTRE 1 SI 100) (50 reprezinta 50% din dmg)

   15,   // VIATA PE KILL NORMAL

   12,   // VIATA PE HEADSHOT

   600,   // BANII PE KILL

}





new const g_weapons[] =

{

   CSW_P228,

   CSW_SCOUT,

   CSW_XM1014,

   CSW_MAC10,

   CSW_AUG,

   CSW_ELITE,

   CSW_FIVESEVEN,

   CSW_UMP45,

   CSW_SG550,

   CSW_GALI,

   CSW_GALIL,

   CSW_FAMAS,

   CSW_USP,

   CSW_GLOCK18,

   CSW_AWP,

   CSW_MP5NAVY,

   CSW_M249,

   CSW_M3,

   CSW_M4A1,

   CSW_TMP,

   CSW_G3SG1,

   CSW_DEAGLE,

   CSW_SG552,

   CSW_AK47,

   CSW_P90

}



new const g_max_clip[] =

{

   13,

   10,

   7,

   30,

   30,

   30,

   20,

   25,

   30,

   35,

   35,

   25,

   12,

   20,

   10,

   30,

   100,

   8,

   30,

   30,

   20,

   7,

   30,

   30,

   50

}



new const g_other_weapons[] =

{

   CSW_KNIFE,

   CSW_HEGRENADE,

   CSW_C4

}



new g_type , g_recieved, g_hudmsg1, g_hudmsg2



new bool:choosed[33],active=0



public plugin_init()

{

   register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

   register_cvar("level_mod_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);

   set_cvar_string("level_mod_", PLUGIN_VERSION);



   register_event("DeathMsg", "event_DeathMsg", "a");

   

   RegisterHam(Ham_TakeDamage, "player", "fw_PlayerTakeDamage");

   RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

   RegisterHam(Ham_Player_ResetMaxSpeed, "player", "fw_ResetMaxSpeed_Post", 1);





   register_clcmd( "say /vips", "print_list" );

   register_clcmd( "say_team /vips", "print_list" );

   register_clcmd( "say /vreauvip", "print_info" );

   register_clcmd( "say_team /vreauvip", "print_info" );



    register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")

register_event("HLTV", "event_new_round", "a", "1=0", "2=0")



    g_type = register_cvar("amx_bulletdamage","1")  

    g_recieved = register_cvar("amx_bulletdamage_recieved","1")      

      

    g_hudmsg1 = CreateHudSyncObj()      

    g_hudmsg2 = CreateHudSyncObj()  

}



public event_new_round()

{

   active++

   for(new id=0;id<get_maxplayers();++id)   choosed[id]=false

}



public client_putinserver(id)

{

   g_JumpNum[id] = 0;

   g_bJump[id] = false;



   choosed[id]=false

}



public client_PreThink(id)

{

   if(!is_user_alive(id) || !is_user_vip(id))

      return PLUGIN_CONTINUE;

      

   new nbut = get_user_button(id);

   new obut = get_user_oldbutton(id);

   new jump_num = vip_benefits[MAX_JUMPS];

   

   if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))

   {

      if(g_JumpNum[id] < jump_num)

      {

         g_bJump[id] = true;

         g_JumpNum[id]++;

         return PLUGIN_CONTINUE;

      }

   }

   

   if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))

   {

      g_JumpNum[id] = 0;

      return PLUGIN_CONTINUE;

   }

   

   return PLUGIN_CONTINUE;

}



public client_PostThink(id)

{

   if(!is_user_alive(id) || !is_user_vip(id))

      return PLUGIN_CONTINUE;



   if(g_bJump[id])

   {

      new Float:fVelocity[3];

      entity_get_vector(id, EV_VEC_velocity, fVelocity);

      fVelocity[2] = random_float(265.0, 285.0);

      entity_set_vector(id, EV_VEC_velocity, fVelocity);

      

      g_bJump[id] = false;

      return PLUGIN_CONTINUE;

   }

   

   return PLUGIN_CONTINUE;

}



public event_DeathMsg()

{

   new attacker = read_data(1);

   new victim = read_data(2);

   new headshot = read_data(3);

   new hitself = (attacker == victim) ? 1 : 0;



   if(is_user_alive(attacker) && is_user_vip(attacker))

   {

      if(hitself)

         return;



      if(headshot)

      {

         set_user_health(attacker, get_user_health(attacker) + vip_benefits[HP_HEADSHOT]);





   for (new a = 0; a < sizeof (g_other_weapons); a++)   if (get_user_weapon(attacker) == g_other_weapons[a])   return

   new weapon = fm_get_weapon_ent(attacker, get_user_weapon(attacker))

   for (new a = 0; a < sizeof (g_weapons); a++)

   {

      if (get_user_weapon(attacker) == g_weapons[a])

      {

         new ammo = get_weapon_maxclip(get_user_weapon(attacker))



         if (ammo)

         {

            client_cmd(attacker, "spk ^"items/9mmclip1.wav^"")

            cs_set_weapon_ammo(weapon, ammo)

         }

         return

      }

   }

}

else set_user_health(attacker, get_user_health(attacker) + vip_benefits[HP_KILL]);



      cs_set_user_money(attacker, clamp(get_user_health(attacker) + vip_benefits[MONEY_KILL], 0, 16000));





   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, attacker)

   write_short(1<<12)

   write_short(1<<12)

   write_short(0x0000)

   write_byte(30)

   write_byte(144)

   write_byte(255)

   write_byte(90)

   message_end()

}

}



public fw_PlayerTakeDamage(victim, inflictor, attacker, Float:fDamage, iDamageType)

{

   if(iDamageType & DMG_GENERIC || victim == attacker || !is_user_alive(victim))

      return HAM_IGNORED;



   if(is_user_vip(attacker) && is_user_alive(attacker))

   {

      fDamage = (vip_benefits[DAMAGE] / 100) * fDamage + fDamage;

      SetHamParamFloat(4, fDamage);

      return HAM_HANDLED;

   }

   return HAM_IGNORED;

}



public fw_ResetMaxSpeed_Post(id)

{

   if(!is_user_alive(id))

      return HAM_HANDLED;



   if(is_user_vip(id))

   {

      new Float:fMaxSpeed = float(vip_benefits[SPEED]);

      set_user_maxspeed(id, fMaxSpeed);



      new command[128];

      formatex(command, charsmax(command), "cl_forwardspeed %.1f;cl_sidespeed %.1f;cl_backspeed %.1f", fMaxSpeed, fMaxSpeed, fMaxSpeed);

      client_cmd(id, command);

   }



   return HAM_IGNORED;

}



public fw_PlayerSpawnPost(id)

{

   if(!is_user_alive(id))

      return HAM_IGNORED;



   if(is_user_vip(id))

   {

      set_user_health(id, vip_benefits[HEALTH]);

      set_user_armor(id, vip_benefits[ARMOR]);

      cs_set_user_money(id, clamp(vip_benefits[START_MONEY], 0, 16000));



      if(!choosed[id]&&active>=2)   MeniuArme(id)

   }

   

   return HAM_IGNORED;

}



public MeniuArme(id)

{

   new menu = menu_create( "Equipment", "menu_handler" )



   menu_additem( menu, "AWP + DEAGLE + Set Grenade", "1" )

   menu_additem( menu, "AK47 + DEAGLE + Set Grenade", "2" )

   menu_additem( menu, "M4A1 + DEAGLE + Set Grenade", "3" )



   menu_setprop( menu, MPROP_EXIT, MEXIT_ALL )

   menu_display( id, menu, 0 )

}

public menu_handler( id, Menu, Item )

{

   if( Item < 0 || !is_user_alive(id) )   return 0;



   new Key[ 3 ],Access, CallBack;

   menu_item_getinfo( Menu, Item, Access, Key, 2, _, _, CallBack );

   new isKey = str_to_num( Key );



   switch( isKey )

   {

      case 1:

      {

         drop_weapons(id,1)

         drop_weapons(id,2)

         give_item(id, "weapon_deagle")

         cs_set_user_bpammo(id, CSW_DEAGLE, 35)

         give_item(id, "weapon_hegrenade")

         give_item(id, "weapon_flashbang")

         cs_set_user_bpammo(id, CSW_FLASHBANG, 2)

         give_item(id, "weapon_smokegrenade")

         give_item(id, "weapon_awp")

         cs_set_user_bpammo(id, CSW_AWP, 30)

      }

      case 2:

      {

         drop_weapons(id,1)

         drop_weapons(id,2)

         give_item(id, "weapon_deagle")

         cs_set_user_bpammo(id, CSW_DEAGLE, 35)

         give_item(id, "weapon_hegrenade")

         give_item(id, "weapon_flashbang")

         cs_set_user_bpammo(id, CSW_FLASHBANG, 2)

         give_item(id, "weapon_smokegrenade")

         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_deagle")

         cs_set_user_bpammo(id, CSW_DEAGLE, 35)

         give_item(id, "weapon_hegrenade")

         give_item(id, "weapon_flashbang")

         cs_set_user_bpammo(id, CSW_FLASHBANG, 2)

         give_item(id, "weapon_smokegrenade")

         give_item(id, "weapon_m4a1")

         cs_set_user_bpammo(id, CSW_M4A1, 90)



         if(cs_get_user_team(id)==CS_TEAM_CT)   give_item(id, "item_thighpack");

      }

   }



   if(isKey)   choosed[id]=true



   menu_destroy(Menu) 

   return PLUGIN_HANDLED

}



public print_info(id)   show_motd(id,"addons/amxmodx/configs/vipinfo.html","VIP INFO")



public print_list( user )

{

   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( is_user_vip(id) )

         {

            get_user_name( id, adminnames[ count ++ ], 31 );

         }

      }

   }



   len = formatex( message, 255, "^1[^3VIPS^1]^4 VIPs ONLINE^1: " );



   if( count > 0 )

   {

      for( x = 0; x < count; x++ )

      {

         len += formatex( message[ len ], 255 - len, "^1[^3 %s^1 ]^4 %s ", adminnames[ x ], x < ( count - 1 ) ? " | " : "" );



         if( len > 96 )

         {

            len = formatex( message, 255, "" );

            print_message( user, message );

         }

      }



      print_message( user, message );

   }

   else

   {

      len += formatex( message[ len ], 255 - len, "Nu este nici un^3 VIP^1 Conectat." );

      print_message( user, message );

   }

}



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 on_damage(id)  

{  

    if(get_pcvar_num(g_type)==1 )

    {          

        static attacker; attacker = get_user_attacker(id)  

        static damage; damage = read_data(2)          

        if(get_pcvar_num(g_recieved)==1)  

        {              

            set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)  

            ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)          

        }  

        if(is_user_connected(attacker))  

        {  

            if( is_user_vip(attacker) )  

            {  

                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)  

                ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)  

            }

        }  

    }  

}

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;

		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);

		}

	}

}

get_weapon_maxclip(wpnid = 0)

{

   for (new a = 0; a < sizeof (g_weapons); a++)

      if (wpnid == g_weapons[a])

         return g_max_clip[a]



   return false

}



fm_get_weapon_ent(id, wpnid = 0)

{

   new name[32]



   if(wpnid)

      get_weaponname(wpnid, name, 31)



   if (!equal(name, "weapon_", 7))

      format(name, sizeof (name) - 1, "weapon_%s", name)



   return fm_find_ent_by_owner(get_maxplayers(), name, id)

}



fm_find_ent_by_owner(id, const classname[], owner, jghgtype = 0)

{

   new strtype[16] = "classname"

   new ent = id



   switch (jghgtype)

   {

      case 1: strtype = "target"

      case 2: strtype = "targetname"

   }



   while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner)

   {

   }



   return ent

}

Serverul impune conditii strict HLDS/REHLDS?: Nu
Ai cautat pluginul?(daca da, precizeaza cum): Da si nu exista .
Necesita mod special?:Nu cred
Post Reply

Return to “Cereri”

  • Information