VIP System( SQL Version ) [Support for Nobs] [16.02.2014]

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Capones ;x
Membru, skill 0
Membru, skill 0
Posts: 3
Joined: 22 Sep 2012, 22:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

26 Mar 2014, 09:09

Salut imi poti face un edit pluginului tau ? daca poti vreau sa imi scoti modelele,sa apara vip in scoareboard ,sa faci un meniu de arme si sa faci iar efectul glow te rog eu mult daca se poate si sma. si amx.
RoyalServer
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

26 Mar 2014, 14:48

Capones ;x wrote:Salut imi poti face un edit pluginului tau ? daca poti vreau sa imi scoti modelele,sa apara vip in scoareboard ,sa faci un meniu de arme si sa faci iar efectul glow te rog eu mult daca se poate si sma. si amx.
Uite aici, prima versiune cu tot cu modele + meniu + arme gold( deagle, m4a1, ak-47, awp )...
Download First Version - SMA + RESURSE
| Afiseaza codul
/*


		Credits:	Exolent - VIP in Scoreboard
			pharse - x2 Jump for VIP( for ZP 5.0.5 )
			Sn!ff3r - Show bullet dmg in HUD only VIP
			Askhanar - Change Model to VIP
			cheap.suit - No VIP Flash( extracted on Biohazard v2.00 beta )
			AMXX Dev Team - Add VIP's
			cyby - VIP Event
		

*/
#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < cstrike >
#include < fakemeta >
#include < CC_ColorChat >
#include < message_const >

//#define USING_SQL

#if defined USING_SQL
#include < sqlx >
#endif

#pragma semicolon 1

#define VIP_FLAGS		"bit"	// Flagurile VIP-ului( Nu schimba )
#define VIP_FLAGS_TYPE		"a"	// a - deconecteaza VIP-ii cu parola invalida( Alte flaguri gasiti in "users.ini" )
#define VIP_PASSWORD		"parola"	// Aici setati parola oricarui VIP

#define is_user_player(%1) ( 1 <= %1 <= 32 )

#define TASK_SECRET_MSG		2139

#define OFFSET_LINUX_WEAPONS 	4
#define OFFSET_WEAPON_OWNER	41
#define OFFSET_CLIPAMMO		51
#define OFFSET_ACTIVE_ITEM 	373
#define NO_UCLIP_WEAPONS_BITSUM ( ( 1<<CSW_HEGRENADE ) | ( 1<<CSW_SMOKEGRENADE ) | ( 1<<CSW_FLASHBANG ) | ( 1<<CSW_KNIFE ) | ( 1<<CSW_C4 ) )

new const PLUGIN_VERSION[  ] = "1.0.0",
	 PLUGIN_AUTHOR[  ] = "YONTU";

#if defined USING_SQL
new const PLUGIN_NAME_SQL[  ] = "VIP System( SQL )";
#else
new const PLUGIN_NAME[  ] = "VIP System";
#endif

new const g_szTag[  ] = "[Classic VIP]";	// TAG
new const g_szVipFlags[  ] = "t";		// t - flagul defalt al oricarui vip - ADMIN_LEVEL_H
new const g_iMaxClips[  ] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 };

new const YourNick[  ] = "YONTU", 
	 YourMessenger[  ] = "[email protected]";

static const COLORG[  ] = "^x04", COLORD[  ] = "^x01", COLORT[  ] = "^x03";

const WeaponAK47 = ( ( 1<<CSW_AK47 ) );
const WeaponM4a1 = ( ( 1<<CSW_M4A1 ) );
const WeaponDeagle = ( ( 1<<CSW_DEAGLE ) );
const WeaponAWP = ( ( 1<<CSW_AWP ) );

enum {

    	SCOREATTRIB_ARG_PLAYERID = 1,
    	SCOREATTRIB_ARG_FLAGS
};

enum ( <<= 1 ) {

    	SCOREATTRIB_FLAG_NONE = 0,
    	SCOREATTRIB_FLAG_DEAD = 1,
    	SCOREATTRIB_FLAG_BOMB,
    	SCOREATTRIB_FLAG_VIP
};

enum _:WhatUserHas {

	Speed,
	Jump,
	AK47, 
	M4A1, 
	DEAGLE, 
	AWP
}
new bool:g_bUserHas[ 33 ][ WhatUserHas ];

new AK_V_MODEL[ 64 ] = "models/vip_clasic/v_golden_ak47.mdl";
new AK_P_MODEL[ 64 ] = "models/vip_clasic/p_golden_ak47.mdl";
new M4_V_MODEL[ 64 ] = "models/vip_clasic/v_golden_m4a1.mdl";
new M4_P_MODEL[ 64 ] = "models/vip_clasic/p_golden_m4a1.mdl";
new DE_V_MODEL[ 64 ] = "models/vip_clasic/v_golden_deagle.mdl";
new DE_P_MODEL[ 64 ] = "models/vip_clasic/p_golden_deagle.mdl";
new AWP_V_MODEL[ 64 ] = "models/vip_clasic/v_golden_awp.mdl";
new AWP_P_MODEL[ 64 ] = "models/vip_clasic/p_golden_awp.mdl";

new 	g_cvar_speed_spawn,
	g_cvar_health_spawn,
	g_cvar_armor_spawn,
	g_cvar_gravity_spawn,
	g_cvar_multidmg,
	g_cvar_enable_glow,
	g_cvar_health_kill_reward,
	g_cvar_health_hs_reward,
	g_cvar_maxhealth,
	g_cvar_kill_money_reward,
	g_cvar_show_msgs,
	g_cvar_enable_show_dmg,
	g_cvar_ebable_vip_scoreboard,
	g_cvar_enable_vip_noflash,
	g_cvar_enable_vip_multijump,
	g_cvar_enable_vip_event,
	g_cvar_max_choose,
	g_cvar_enable_gold_menu,
	g_cvar_multi_dmg_gold;

new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;

new HasChoose[ 33 ];

new bool:VipEvent;

new iJumpNum[ 33 ] = 0;
new g_iMultiJumps[ 33 ] = 0;
new g_iMaxJumps = 0;

new g_iBullets[ 33 ];
new iDot;

new g_iMaxPlayers;
new SyncHudMessage;

public plugin_init(  ) {

	#if defined USING_SQL
	register_plugin( PLUGIN_NAME_SQL,
			PLUGIN_VERSION,
			PLUGIN_AUTHOR );
	#else
	register_plugin( PLUGIN_NAME,
			PLUGIN_VERSION,
			PLUGIN_AUTHOR );
	#endif

	register_clcmd( "say /vm", "ClCmdSayVipMenu" );
	register_clcmd( "say_team /vm", "ClCmdSayVipMenu" );

	register_clcmd( "say /vip", "ShowAbilityForVip" );
	register_clcmd( "say_team /vip", "ShowAbilityForVip" );

	register_clcmd( "say /resetd", "ClCmdSayResetDeath" );
	register_clcmd( "say_team /resetd", "ClCmdSayResetDeath" );

	register_concmd( "amx_addvips", "ClCmdAddVips", ADMIN_RCON, "< nume >" );

	register_event( "DeathMsg", "event_DeathMsg", "a" );
	register_event( "DeathMsg", "event_DeathMsg2", "ae" );
	register_event( "Damage", "event_Damage", "b", "2!0", "3=0", "4!0" );
	register_event( "CurWeapon", "event_CurWeapon", "be", "1=1" );
	register_event( "CurWeapon", "event_MakeTracer", "be", "1=1", "3>0" );
	register_event( "WeapPickup", "event_WeapPickup", "b", "1=19" );

	register_logevent( "logevent_RoundStart", 2 , "1=Round_Start" );
	register_logevent( "logevent_RoundEnd", 2, "1=Round_End" );

	register_forward( FM_PlayerPreThink, "forward_PlayerPreThink" );
	register_forward( FM_PlayerPostThink, "forward_PlayerPostThink" );

	RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawnPost", 1 );
	RegisterHam( Ham_TakeDamage, "player", "Ham_TakeDamagePre" );
	RegisterHam( Ham_Player_ResetMaxSpeed, "player", "Ham_ResetMaxSpeedPost", 1 );

    	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	register_message( get_user_msgid( "ScreenFade" ), "MessageScreenFade" );

	g_cvar_speed_spawn = register_cvar( "vip_ultra_speed", "400.0" );		// viteza pe care o primeste vip-ul la spawn( sa fie cu zecimala.0 )
	g_cvar_health_spawn = register_cvar( "vip_health_spawn", "200" );		// viata pe care o primeste vip-ul la spawn
	g_cvar_armor_spawn = register_cvar( "vip_armor_spawn", "150" );		// armura pe care o primeste vip-ul la spawn
	g_cvar_gravity_spawn = register_cvar( "vip_gravity_spawn", "0.85" );	// gravitatea pe care o primeste vip-ul la spawn
	g_cvar_multidmg = register_cvar( "vip_multi_dmg", "2.0" );		// vip-ul are dmg mai mare la toate armele
	g_cvar_enable_glow = register_cvar( "vip_enable_glow", "1" );		// 1 - Fiecare VIP are glow in functie de echipa( CT - Blue ) | ( T - Red )
	g_cvar_health_kill_reward = register_cvar( "vip_hp_kill_reward", "15" );	// cata viata sa primeasca vip-ul cand face un kill
	g_cvar_health_hs_reward = register_cvar( "vip_hp_hs_reward", "25" );	// cata viata sa primeasca vip-ul cand face un headshot
	g_cvar_maxhealth = register_cvar( "vip_maxhealth", "300" );		// viata maxima a vip-ului
	g_cvar_kill_money_reward = register_cvar( "vip_kill_money", "1000" );	// Cati bani sa primeasca Vip-ul pe un frag
	g_cvar_show_msgs = register_cvar( "vip_show_messages", "30.0" );		// la ce interval de timp.0 sa apara mesajele in chat despre VIP
	g_cvar_enable_show_dmg = register_cvar( "vip_show_dmg", "1" );			// afiseaza vip-ului dmg-ul facut de victima si dmg-ul pe care i la facut victimei
	g_cvar_ebable_vip_scoreboard = register_cvar( "vip_on_scoreboard", "1" );	// 1 - vip-ii apar in scoreboard ca "VIP" | 0 - dezactivat
	g_cvar_enable_vip_noflash = register_cvar( "vip_imune_flashbang", "1" );	// 1 - Vip-ul este imun la flash-uri | 0 - Nu este
	g_cvar_enable_vip_multijump = register_cvar( "vip_enable_multijump", "1" );	// 1 - Vip-ul beneficiaza de multi jump | 0 - Nu beneficiaza
	g_cvar_enable_vip_event = register_cvar( "vip_enable_vip_event", "1" );	// 1 - Intre anumite ore toti jucatorii au VIP | 0 dezactivat
	g_cvar_enable_gold_menu = register_cvar( "vip_enable_menu", "0" );	// 1 - VIP-ul poate accesa meniul gold | 0 - Nu poate

	if( get_pcvar_num( g_cvar_enable_gold_menu ) > 1 ) {

		g_cvar_max_choose = register_cvar( "vip_max_choose", "3" );		// de cate ori sa accese vip-ul meniul( lasa asa )
		g_cvar_multi_dmg_gold = register_cvar( "vip_multi_dmg_gold", "2.68" );	// daune multiple pentru armele gold
	}

	if( get_pcvar_num( g_cvar_enable_vip_event ) == 1 ) {

		check_time(  );
		set_task( 60.0, "check_time", _, _, _, "b" );
		set_task( 1.0, "hud_mess", _, _, _, "b" );
	}

	g_iMaxPlayers = get_maxplayers(  );
	SyncHudMessage = CreateHudSyncObj(  );
}

public plugin_cfg(  )
	set_cvar_float( "sv_maxspeed", 1000.0 );

public plugin_precache(  ) {

	iDot = precache_model( "sprites/dot.spr" );

	precache_model( M4_V_MODEL );
	precache_model( M4_P_MODEL );
	precache_model( AK_V_MODEL );
	precache_model( AK_P_MODEL );
	precache_model( DE_V_MODEL );
	precache_model( DE_P_MODEL );
	precache_model( AWP_V_MODEL );
	precache_model( AWP_P_MODEL );
}

public client_putinserver( id ) {

	g_iMultiJumps[ id ] = 0;
	iJumpNum[ id ] = 0;
	g_bUserHas[ id ][ Jump ] = false;
	g_bUserHas[ id ][ Speed ] = false;

	HasChoose[ id ] = false;
	g_bUserHas[ id ][ M4A1 ] = false;
	g_bUserHas[ id ][ AK47 ] = false;
	g_bUserHas[ id ][ DEAGLE ] = false;
	g_bUserHas[ id ][ AWP ] = false;
}

public client_disconnect( id ) {

	g_iMultiJumps[ id ] = 0;
	iJumpNum[ id ] = 0;
	g_bUserHas[ id ][ Jump ] = false;
	g_bUserHas[ id ][ Speed ] = false;

	HasChoose[ id ] = false;
	g_bUserHas[ id ][ M4A1 ] = false;
	g_bUserHas[ id ][ AK47 ] = false;
	g_bUserHas[ id ][ DEAGLE ] = false;
	g_bUserHas[ id ][ AWP ] = false;
}

public event_DeathMsg(  ) {

	new iAttacker = read_data( 1 );
	new iVictim = read_data( 2 );
	new iHeadshot = read_data( 3 );
	
	new HealthOnHeadShot = get_pcvar_num( g_cvar_health_hs_reward );
	new MaxHealth = get_pcvar_num( g_cvar_maxhealth );
	new HealthOnKill = get_pcvar_num( g_cvar_health_kill_reward );

	g_bUserHas[ iVictim ][ M4A1 ] = false;
	g_bUserHas[ iVictim ][ AK47 ] = false;
	g_bUserHas[ iVictim ][ DEAGLE ] = false;
	g_bUserHas[ iVictim ][ AWP ] = false;

	if( iAttacker == iVictim )
		return 0;

	if( is_user_vip( iAttacker ) ) {
		
		if( get_user_health( iAttacker ) <= MaxHealth ) {

			if( iHeadshot ) {

				fm_set_user_health( iAttacker, fm_get_user_health( iAttacker ) + HealthOnHeadShot );

				set_hudmessage( 0, 250, 0, 0.85, 0.7, 0, 6.0, 5.0 );
				ShowSyncHudMsg( iAttacker, SyncHudMessage, "+ %i HP", HealthOnHeadShot );
			}

			else {

				fm_set_user_health( iAttacker, fm_get_user_health( iAttacker ) + HealthOnKill );

				set_hudmessage( 200, 200, 0, 0.85, 0.7, 0, 6.0, 5.0 );
				ShowSyncHudMsg( iAttacker, SyncHudMessage, "+ %i HP", HealthOnKill );
			}
		}
	}

	return 0;
}

public event_DeathMsg2(  ) {

	new iAttacker = read_data( 1 ); 
	new iVictim = read_data( 2 );

	new BonusMoney = get_pcvar_num( g_cvar_kill_money_reward );
	
	if( iAttacker == iVictim )
		return 0;

	if( is_user_vip( iAttacker ) ) {

		if( iAttacker && is_user_alive( iAttacker ) ) {

			if( cs_get_user_team( iVictim ) == CS_TEAM_T || cs_get_user_team( iVictim ) == CS_TEAM_CT ) {

				if( cs_get_user_money( iAttacker ) < 16000 - BonusMoney - 300 ) {

					cs_set_user_money( iAttacker, cs_get_user_money( iAttacker ) + BonusMoney - 300 );
				}
			}
		}
	}

	return 0;
}

public event_Damage( id ) {

	if( get_pcvar_num( g_cvar_enable_show_dmg ) == 1 ) {

		static iAttacker;
		static fDamage;
	
		iAttacker = get_user_attacker( id );
		fDamage = read_data( 2 );

		if( is_user_alive( id ) && is_user_vip( id ) ) {
			
			set_hudmessage( 255, 0, 0, 0.45, 0.50, 2, 0.1, 1.0, 0.1, 0.1, -1 );
			ShowSyncHudMsg( id, SyncHudMessage, "%i^n", fDamage );	
		}

		if( is_user_alive( iAttacker ) && is_user_vip( iAttacker ) ) {

			set_hudmessage( 0, 255, 15, -1.0, 0.55, 2, 0.1, 1.0, 0.02, 0.02, -1 );
			ShowSyncHudMsg( iAttacker, SyncHudMessage, "%i^n^n", fDamage );
		}
	}
}

public event_WeapPickup( id ) {

	new szWeaponId = read_data( 2 );
	
	if( szWeaponId == CSW_M4A1 && g_bUserHas[ id ][ M4A1 ] ) {

		set_pev( id, pev_viewmodel2, M4_V_MODEL );
		set_pev( id, pev_weaponmodel2, M4_P_MODEL );
	}

	if( szWeaponId == CSW_AK47 && g_bUserHas[ id ][ AK47 ] ) {

		set_pev( id, pev_viewmodel2, AK_V_MODEL );
		set_pev( id, pev_weaponmodel2, AK_P_MODEL );
	}

	if( szWeaponId == CSW_DEAGLE && g_bUserHas[ id ][ DEAGLE ] ) {

		set_pev( id, pev_viewmodel2, DE_V_MODEL );
		set_pev( id, pev_weaponmodel2, DE_P_MODEL );
	}

	if( szWeaponId == CSW_AWP && g_bUserHas[ id ][ AWP ] ) {

		set_pev( id, pev_viewmodel2, AWP_V_MODEL );
		set_pev( id, pev_weaponmodel2, AWP_P_MODEL );
	}

	if( szWeaponId == CSW_AK47 && g_bUserHas[ id ][ AK47 ] || szWeaponId == CSW_M4A1 && g_bUserHas[ id ][ M4A1 ] || szWeaponId == CSW_DEAGLE && g_bUserHas[ id ][ DEAGLE ] || szWeaponId == CSW_AWP && g_bUserHas[ id ][ AWP ] )
		if( !( NO_UCLIP_WEAPONS_BITSUM & ( 1 << szWeaponId ) ) )
			set_pdata_int( get_pdata_cbase( id, OFFSET_ACTIVE_ITEM ), OFFSET_CLIPAMMO, g_iMaxClips[ szWeaponId ], OFFSET_LINUX_WEAPONS );

	return PLUGIN_HANDLED;
}

public event_CurWeapon( id ) {
	
	if( get_user_weapon( id ) == CSW_M4A1 && g_bUserHas[ id ][ M4A1 ] || get_user_weapon( id ) == CSW_AK47 && g_bUserHas[ id ][ AK47 ] || get_user_weapon( id ) == CSW_DEAGLE && g_bUserHas[ id ][ DEAGLE ] || get_user_weapon( id ) == CSW_AWP && g_bUserHas[ id ][ AWP ] )
		event_WeapPickup( id );

	else
		return 1;
	
	return 0;
}

public event_MakeTracer( id ) {

	new iClip, iAmmo;
	new szWeaponId = get_user_weapon( id, iClip, iAmmo );
	new g_PlayerTeam[ 16 ];
		
	get_user_team( id, g_PlayerTeam, 15 );

	if( ( g_iBullets[ id ] > iClip ) && ( szWeaponId == CSW_AK47 ) && g_bUserHas[ id ][ AK47 ] || ( szWeaponId == CSW_M4A1 ) && g_bUserHas[ id ][ M4A1 ] || ( szWeaponId == CSW_DEAGLE ) && g_bUserHas[ id ][ DEAGLE ] || ( szWeaponId == CSW_AWP ) && g_bUserHas[ id ][ AWP ] ) {

		new fVector1[ 3 ], fVector2[ 3 ];

		message_begin( MSG_BROADCAST,SVC_TEMPENTITY );
		write_byte( 0 );
		write_coord( fVector1[ 0 ] );
		write_coord( fVector1[ 1 ] );
		write_coord( fVector1[ 2 ] );
		write_coord( fVector2[ 0 ] );
		write_coord( fVector2[ 1 ] );
		write_coord( fVector2[ 2 ] );
		write_short( iDot );
		write_byte( 1 );
		write_byte( 5 );
		write_byte( 2 );
		write_byte( 10 );
		write_byte( 0 );
		write_byte( 255 );
		write_byte( 215 );
		write_byte( 0 );
		write_byte( 200 );
		write_byte( 150 );
		message_end(  );
	}

	g_iBullets[ id ] = iClip;
}

public logevent_RoundStart(  ) {
	
	new szPlayers[ 32 ], iNum;
	get_players( szPlayers, iNum, "ch" );
	
	for( new i = 0; i < iNum; i++)  {

		g_bUserHas[ szPlayers[ i ] ][ Speed ] = false;
		g_bUserHas[ szPlayers[ i ] ][ Jump ] = false;
		g_iMultiJumps[ szPlayers[ i ] ] = 0;
		iJumpNum[ szPlayers[ i ] ] = 0;

		if( task_exists( szPlayers[ i ] + TASK_SECRET_MSG ) )
			remove_task( szPlayers[ i ] + TASK_SECRET_MSG );
		
		set_task( get_pcvar_float( g_cvar_show_msgs ), "task_ShowMessage", szPlayers[ i ] + TASK_SECRET_MSG );
	}
}

public logevent_RoundEnd(  ) {
	
	new szPlayers[ 32 ], iNum;
	get_players( szPlayers, iNum, "ch" );
	
	for( new i = 0; i < iNum; i++ )
		remove_task( szPlayers[ i ] );
}

public forward_PlayerPreThink( id ) {

	if( !is_user_alive( id ) || !g_iMultiJumps[ id ] )
		return 0;

	if( ( pev( id, pev_button ) & IN_JUMP ) && !( pev( id, pev_flags ) & FL_ONGROUND ) && !( pev( id, pev_oldbuttons ) & IN_JUMP ) ) {

		if( iJumpNum[ id ] < g_iMultiJumps[ id ] ) {

			g_bUserHas[ id ][ Jump ] = true;
			iJumpNum[ id ]++;

			return 0;
		}
	}

	if( ( pev( id, pev_button ) & IN_JUMP ) && ( pev( id, pev_flags ) & FL_ONGROUND ) ) {

		iJumpNum[ id ] = 0;
		return 0;
	}

	return 0;
}

public forward_PlayerPostThink( id ) {

	if( !is_user_alive( id ) || !g_iMultiJumps[ id ] )
		return 0;

	if( g_bUserHas[ id ][ Jump ]/* = true*/ ) {

		new Float:fVelocity[ 3 ];

		pev( id, pev_velocity, fVelocity );

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

		set_pev( id, pev_velocity, fVelocity );

		g_bUserHas[ id ][ Jump ] = false;
		return 0;
	}

	return 0;
}

public Ham_PlayerSpawnPost( id ) {
	
	if( !is_user_alive( id ) && !is_user_vip( id ) )
		return HAM_IGNORED;
	
	if( is_user_vip( id ) && !is_user_bot( id ) )
		set_task( 1.0, "task_GiveSkillsAllVips", id );
	
	return HAM_IGNORED;
}

public task_GiveSkillsAllVips( id ) {

	//drop_prim( id );

	g_bUserHas[ id ][ Speed ] = true;
	fm_set_user_maxspeed( id, get_pcvar_float( g_cvar_speed_spawn ) );

	new szCommand[ 128 ];
	formatex( szCommand, sizeof( szCommand ) - 1, "cl_forwardspeed %.1f;cl_sidespeed %.1f;cl_backspeed %.1f", get_pcvar_float( g_cvar_speed_spawn ), get_pcvar_float( g_cvar_speed_spawn ), get_pcvar_float( g_cvar_speed_spawn ) );
	client_cmd( id, szCommand );

	if( get_pcvar_num( g_cvar_enable_vip_multijump ) == 1 )
		if( g_iMultiJumps[ id ] < g_iMaxJumps || !g_iMaxJumps )
			g_iMultiJumps[ id ]++;

	fm_set_user_health( id, get_pcvar_num( g_cvar_health_spawn ) );
	fm_set_user_armor( id, get_pcvar_num( g_cvar_armor_spawn ) );
	fm_set_user_gravity( id, get_pcvar_float( g_cvar_gravity_spawn ) );

	fm_give_item( id, "weapon_hegrenade" );
	fm_give_item( id, "weapon_flashbang" );
	fm_give_item( id, "weapon_flashbang" );
	fm_give_item( id, "weapon_smokegrenade" );

	//GiveRifle( id );

	if( get_pcvar_num( g_cvar_enable_glow ) == 1 ) {
				
		switch( get_user_team( id ) ) {
	
			case 1: fm_set_rendering( id, kRenderFxGlowShell, 200, 10, 20, kRenderNormal, 0 );
			case 2: fm_set_rendering( id, kRenderFxGlowShell, 10, 240, 200, kRenderNormal, 0 );
		}
	}
}

public GiveRifle( id ) {

	fm_give_item( id, "weapon_m4a1" );
	cs_set_user_bpammo( id, CSW_M4A1, 300 );

	fm_give_item( id, "weapon_ak47" );
	cs_set_user_bpammo( id, CSW_AK47, 300 );

	fm_give_item( id, "weapon_awp" );
	cs_set_user_bpammo( id, CSW_AWP, 100 );

	fm_give_item( id, "weapon_deagle" );
	cs_set_user_bpammo( id, CSW_DEAGLE, 70 );
}

public task_ShowMessage( taskid ) {

	new id = taskid - TASK_SECRET_MSG;

	ColorChat( id, GREEN, "%s^x01 Vrei sa cumperi si tu^x03 Membru V.I.P^x01? Contacteaza-l pe^x03 %s^x01 la^x03 %s^x01 !!!", g_szTag, YourNick, YourMessenger );

	set_task( get_pcvar_float( g_cvar_show_msgs ) * 0.5, "task_ShowMessage2", id );

	if( task_exists( taskid ) )
		remove_task( taskid );
}

public task_ShowMessage2( id ) {

	ColorChat( id, GREEN, "%s^x01 Vrei sa faci rost de^x03 Membru VIP^x01 si nu stii cum? Tasteaza^x03 /wantvip^x01 !!!", g_szTag );

	set_task( get_pcvar_float( g_cvar_show_msgs ) * 1.2, "task_PrintVipList", id );
}

public task_PrintVipList( user ) {

	new szAdminNames[ 33 ][ 32 ];
	new szMessage[ 256 ];
	new iCount, iLen;
	
	for( new id = 1 ; id <= g_iMaxPlayers ; id++ )
		if( is_user_connected( id ) )
			if( is_user_vip( id ) )
				get_user_name( id, szAdminNames[ iCount++ ], 31 );

	iLen = format( szMessage, 255, "%sVIP's Online: ", COLORG );

	if( iCount > 0 ) {

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

			iLen += format( szMessage[ iLen ], 255 - iLen, "^x03%s^x01 | ", szAdminNames[ i ], COLORT, COLORD );

			if( iLen > 96 ) {

				print_message( user, szMessage );
				iLen = format( szMessage, 255, "%s", COLORG );
			}
		}

		print_message( user, szMessage );
	}

	else {

		iLen += format( szMessage[ iLen ], 255 - iLen, "^x01Nu sunt VIP-i online.", COLORD );
		print_message( user, szMessage );
	}
}

public Ham_ResetMaxSpeedPost( id ) {

	if( is_user_alive( id ) && is_user_vip( id ) && fm_get_user_maxspeed( id ) != 1.0 ) {

  		new Float:flMaxSpeed;

  		if( g_bUserHas[ id ][ Speed ] )
   			flMaxSpeed = float( get_pcvar_num( g_cvar_speed_spawn ) );

  		if( flMaxSpeed > 0.0 )
   			set_pev( id, pev_maxspeed, flMaxSpeed );
	}
}

public Ham_TakeDamagePre( iVictim, iInflictor, iAttacker, Float:fDamage ) {

	if( iVictim == iAttacker || !is_user_player( iAttacker ) || !is_user_alive( iAttacker ) )
		return HAM_HANDLED;

	if( get_pcvar_num( g_cvar_enable_gold_menu ) == 0 )
		if( is_user_vip( iAttacker ) && is_user_player( iAttacker ) )
			SetHamParamFloat( 4, fDamage * get_pcvar_float( g_cvar_multidmg ) );

	if( is_user_vip( iAttacker ) && is_user_player( iAttacker ) 
			&& ( get_user_weapon( iAttacker ) == CSW_AWP && g_bUserHas[ iAttacker ][ AWP ] ) 
			|| ( get_user_weapon( iAttacker ) == CSW_DEAGLE && g_bUserHas[ iAttacker ][ DEAGLE ] ) 
			|| ( get_user_weapon( iAttacker ) == CSW_AK47 && g_bUserHas[ iAttacker ][ AK47 ] ) 
			|| ( get_user_weapon( iAttacker ) == CSW_M4A1 && g_bUserHas[ iAttacker ][ M4A1 ] ) )
		SetHamParamFloat( 4, fDamage * float( get_pcvar_num( g_cvar_multi_dmg_gold ) ) );

	return HAM_IGNORED;
}

public MessageScoreAttrib( iMsgId, iMsgDest, id ) {

	if( get_pcvar_num( g_cvar_ebable_vip_scoreboard ) == 1 ) {

		new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID );
        
		if( access( iPlayer, read_flags( g_szVipFlags ) ) )
			set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP );
	}
}

public MessageScreenFade( iMsgId, iMsgDest, id ) {

	if( is_user_vip( id ) && is_user_alive( id ) && get_pcvar_num( g_cvar_enable_vip_noflash ) ) {

		static szData[ 4 ];

		szData[ 0 ] = get_msg_arg_int( 4 );
		szData[ 1 ] = get_msg_arg_int( 5 );
		szData[ 2 ] = get_msg_arg_int( 6 );
		szData[ 3 ] = get_msg_arg_int( 7 );
		
		if( szData[ 0 ] == 255 && szData[ 1 ] == 255 && szData[ 2 ] == 255 && szData[ 3] > 199 )
			return 1;
	}

	return 0;
}

public check_time(  ) {

	static preluare_ora[ 3 ], ora;
	get_time( "%H", preluare_ora, 2 );

	ora = str_to_num( preluare_ora );

	if( 10 >= ora || ora < 12 ) {

		if( !VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost activat!", g_szTag );

		VipEvent = true;
		server_cmd( "amx_default_access ^"t^"" );
	}

	else {

		if( VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost activat!", g_szTag );

		VipEvent = false;
		server_cmd( "amx_default_access ^"z^"" );
	}

	server_cmd( "amx_reloadadmins" );
}

public hud_mess(  ) {

	if( VipEvent ) {

		set_hudmessage( 200, 200, 10, -1.0, 0.0, 1, 1.0, 1.0, 0.1, 0.1 );
		show_hudmessage( 0, "Toti jucatorii beneficiaza de VIP free aceasta ora!" );
	}
}

public ClCmdSayVipMenu( id ) {

	if( get_pcvar_num( g_cvar_enable_gold_menu ) > 0 ) {

		if( is_user_vip( id ) ) {

			if( is_user_alive( id ) ) {

				if( HasChoose[ id ] >= get_pcvar_num( g_cvar_max_choose ) ) {

					ColorChat( id, GREEN, "%s^x01 Ai folosit meniul runda asta de^x03 %i^x01 ori !!!", g_szTag, get_pcvar_num( g_cvar_max_choose ) );
					return 1;
				}

				switch( get_user_team( id ) ) {

					case 1: set_task( 0.1, "ShowVipMenu", id );
					case 2: set_task( 0.1, "ShowVipMenu", id );
				}
			}

			else {

				ColorChat( id, GREEN, "%s^x01 Nu poti accesa meniul cand esti^x03 mort^x01 !!!", g_szTag );
				return 1;
			}
		}
	
		else {

			ColorChat( id, GREEN, "%s^x01 Nu esti membru^x03 VIP^x01. Doneaza !!!", g_szTag );
			return 1;
		}
	}

	else {

		ColorChat( id, GREEN, "%s^x01 Meniul de^x03 arme gold^x01 este dezactivat !!!", g_szTag );
		return 1;
	}
	
	return 1;
}

public ShowVipMenu( id ) {    
	
	new szMenu = menu_create( "\yV\rI\wP\r Menu", "VipMenuGiver" );
	
	menu_additem( szMenu, "\yAK-47 Kalashnikov\r Gold\w +\y Deagle\r Gold", "1", 0 );
	menu_additem( szMenu, "\yM4A1 Carambine\r Gold\w +\y Deagle\r Gold", "2", 0 );
	menu_additem( szMenu, "\yAWP Magnum Sniper\r Gold\w +\y Deagle\r Gold", "3", 0 );
	menu_additem( szMenu, "\yMagic Grenade", "4", 0 );

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

public VipMenuGiver( id, szMenu, szItem ) {
	
	if( szItem == MENU_EXIT ) {
		
		menu_destroy( szMenu );
		return PLUGIN_HANDLED;
	}
	
	new szData[ 6 ], szName[ 64 ];
	new iAccess, iCallBack;
	menu_item_getinfo( szMenu, szItem, iAccess, szData, charsmax( szData ), szName, charsmax( szName ), iCallBack );
	
	new iKey = str_to_num( szData );
	
	switch( iKey ) {
		
		case 1: {

			if( user_has_weapon( id, CSW_AWP ) || user_has_weapon( id, CSW_AK47 ) || user_has_weapon( id, CSW_M4A1 ) || user_has_weapon( id, CSW_DEAGLE ) )
				drop_prim( id );

			if( g_bUserHas[ id ][ AK47 ] ) {

				ColorChat( id, GREEN, "%s^x01 Ai deja^x03 AK-47 gold^x01 !!!", g_szTag );
				return 1;
			}
	
			else {

				fm_give_item( id, "weapon_ak47" );
				fm_give_item( id, "weapon_deagle" );

				g_bUserHas[ id ][ AK47 ] = true;
				g_bUserHas[ id ][ DEAGLE ] = true;
	
				ColorChat( id, GREEN, "%s^x01 Ai primit free^x03 AK-47 gold^x01 +^x03 deagle gold^x01 !!!", g_szTag );
	
				HasChoose[ id ]++;
			}
		}
		
		case 2: {
			
			if( user_has_weapon( id, CSW_AWP ) || user_has_weapon( id, CSW_AK47 ) || user_has_weapon( id, CSW_M4A1 ) || user_has_weapon( id, CSW_DEAGLE ) )
				drop_prim( id );

			if( g_bUserHas[ id ][ M4A1 ] ) {

				ColorChat( id, GREEN, "%s^x01 Ai deja^x03 m4a1 gold^x01 !!!", g_szTag );
				return 1;
			}

			else {

				fm_give_item( id, "weapon_m4a1" );
				fm_give_item( id, "weapon_deagle" );

				g_bUserHas[ id ][ M4A1 ] = true;
				g_bUserHas[ id ][ DEAGLE ] = true;

				ColorChat( id, GREEN, "%s^x01 Ai primit free^x03 m4a1 gold^x01 +^x03 deagle gold^x01 !!!", g_szTag );

				HasChoose[ id ]++;
			}
		}

		case 3: {

			if( user_has_weapon( id, CSW_AWP ) || user_has_weapon( id, CSW_AK47 ) || user_has_weapon( id, CSW_M4A1 ) || user_has_weapon( id, CSW_DEAGLE ) )
				drop_prim( id );

			if( g_bUserHas[ id ][ AWP ] ) {

				ColorChat( id, GREEN, "%s^x01 Ai deja^x03 awp gold^x01 !!!", g_szTag );
				return 1;
			}

			else {

				fm_give_item( id, "weapon_awp" );
				fm_give_item( id, "weapon_deagle" );

				g_bUserHas[ id ][ AWP ] = true;
				g_bUserHas[ id ][ DEAGLE ] = true;

				ColorChat( id, GREEN, "%s^x01 Ai primit free^x03 AWP gold^x01 +^x03 deagle gold^x01 !!!", g_szTag );

				HasChoose[ id ]++;
			}
		}

		case 4: {

			if( bUserHasAnyNade( id ) ) {

				ColorChat( id, GREEN, "%s^x01 Ai cel putin ^x03o grenada ^x01in mana, nu poti cumpara altele!", g_szTag );
				return 1;
			}

			else {

				fm_give_item( id, "weapon_hegrenade" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_flashbang" );
				fm_give_item( id, "weapon_smokegrenade" );

				ColorChat( id, GREEN, "%s^x01 Ai primit^x03 pachetul full^x01 de grenade !!!", g_szTag );

				HasChoose[ id ]++;
			}
		}
	}
	
	menu_destroy( szMenu );
	return PLUGIN_HANDLED;
}

public ShowAbilityForVip( id ) {

	new iCfgDir[ 32 ], iFile[ 192 ];
        
	get_configsdir( iCfgDir, charsmax( iCfgDir ) );
	formatex( iFile, charsmax( iFile ), "%s/vip.html", iCfgDir );

	show_motd( id, iFile );
}

public ClCmdSayResetDeath( id ) {

	if( !is_user_vip( id ) ) {

		ColorChat( id, GREEN, "%s^x01 Nu esti^x03 Membru VIP^x01 !!!", g_szTag );
		return 1;
	}

	else if( cs_get_user_deaths( id ) == 0 ) {

		ColorChat( id, GREEN, "%s^x01 Ai deja^x03 0^x01 decese !!!", g_szTag );
		return 1;
	}

	else {

		cs_set_user_deaths( id, 0 );
		ColorChat( id, GREEN, "%s^x01 Tocmai ti-ai resetat decesele! Acum ai^x03 0^x01 decese^x01 si^x03 %i^x01 fraguri !!!", g_szTag, get_user_frags( id ) );
	}

	return 0;
}

public ClCmdAddVips( id, level, cid ) {

	if( !cmd_access( id, level, cid, 2 ) )
		return 1;

	new szTarget[ 32 ];	
	read_argv( 1, szTarget, 31 );

	new iPlayer = cmd_target( id, szTarget, 8 );

	if( !iPlayer )
		return 1;

	new szPlayerName[ 32 ], szAdminName[ 32 ];
	get_user_name( iPlayer, szPlayerName, charsmax( szPlayerName ) );
	get_user_name( id, szAdminName, charsmax( szAdminName ) );

	AddVIP( id, szPlayerName, VIP_FLAGS, VIP_PASSWORD, VIP_FLAGS_TYPE, szAdminName );
	server_cmd( "amx_reloadadmins" );

	console_print( id, "%s Vip-ul a fost adaugat in lista!", g_szTag );
	ColorChat( 0, GREEN, "^x04%s^x01 Adminul^x03 %s^x01 l-a adaugat ca VIP pe^x03 %s^x01 !", g_szTag, szAdminName, iPlayer );
	ColorChat( iPlayer, GREEN, "^x04%s^x01 Felicitari! Ai fost adaugat ca membru^x03 VIP^x01! VIP-ul se va activa harta viitoare!", g_szTag );

	return 1;
}

stock bool:is_user_vip( id ) {

	if( get_user_flags( id ) & read_flags( g_szVipFlags ) )
		return true;
	
	return false;
}

stock drop_prim( id ) {

	new szWeapons[ 32 ], iNum;
	get_user_weapons( id, szWeapons, iNum );

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

		if( WeaponAK47 & ( 1<<szWeapons[ i ] ) || WeaponM4a1 & ( 1<<szWeapons[ i ] ) || WeaponDeagle & ( 1<<szWeapons[ i ] ) || WeaponAWP & ( 1<<szWeapons[ i ] ) ) {

			static szWeaponName[ 32 ];

			get_weaponname( szWeapons[ i ], szWeaponName, sizeof szWeaponName - 1 );
			engclient_cmd( id, "drop", szWeaponName );
		}
	}
}

stock print_message( id, msg[  ] ) {

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

// stock by Askhanar
stock bool:bUserHasAnyNade( id ) {
	
	if( user_has_weapon( id, CSW_HEGRENADE ) || user_has_weapon( id, CSW_FLASHBANG ) || user_has_weapon( id, CSW_SMOKEGRENADE ) )
		return true;
		
	return false;
}

// stocks from "fakemeta_util"
stock fm_give_item( index, const item[  ] ) {

	if( !equal( item, "weapon_", 7 ) && !equal( item, "ammo_", 5 ) && !equal( item, "item_", 5 ) && !equal( item, "tf_weapon_", 10 ) )
		return 0;

	new ent = fm_create_entity( item );

	if( !pev_valid( ent ) )
		return 0;

	new Float:fOrigin[ 3 ];
	pev( index, pev_origin, fOrigin );

	set_pev( ent, pev_origin, fOrigin );
	set_pev( ent, pev_spawnflags, pev( ent, pev_spawnflags ) | SF_NORESPAWN );

	dllfunc( DLLFunc_Spawn, ent );

	new save = pev( ent, pev_solid );

	dllfunc( DLLFunc_Touch, ent, index );

	if( pev( ent, pev_solid ) != save )
		return ent;

	engfunc( EngFunc_RemoveEntity, ent );

	return -1;
}

stock fm_set_user_armor( index, armor ) {

	set_pev( index, pev_armorvalue, float( armor ) );

	return 1;
}

stock fm_set_user_health( index, health ) {

	health > 0 ? set_pev( index, pev_health, float( health ) ) : dllfunc( DLLFunc_ClientKill, index );

	return 1;
}

stock fm_get_user_health( index )
	return pev( index, pev_health );

stock fm_set_user_maxspeed( index, Float:speed = -1.0 ) {

	engfunc( EngFunc_SetClientMaxspeed, index, speed );

	set_pev( index, pev_maxspeed, speed );

	return 1;
}

stock Float:fm_get_user_maxspeed( index ) {

	new Float:speed;
	pev( index, pev_maxspeed, speed );

	return speed;
}

stock fm_set_user_gravity( index, Float:gravity = 1.0 ) {

	set_pev( index, pev_gravity, gravity );

	return 1;
}

stock fm_set_rendering( entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16 ) {

	new Float:RenderColor[ 3 ];
	RenderColor[ 0 ] = float( r );
	RenderColor[ 1 ] = float( g );
	RenderColor[ 2 ] = float( b );

	set_pev( entity, pev_renderfx, fx );
	set_pev( entity, pev_rendercolor, RenderColor );
	set_pev( entity, pev_rendermode, render );
	set_pev( entity, pev_renderamt, float( amount ) );

	return 1;
}

stock fm_create_entity( const classname[  ] )
	return engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, classname ) );


AddVIP( id, name[  ], accessflags[  ], password[  ], flags[  ], comment[  ]="" ) {

#if defined USING_SQL
	new error[ 128 ], errno;

	new Handle:info = SQL_MakeStdTuple(  );
	new Handle:sql = SQL_Connect( info, errno, error, 127 );

	if( sql == Empty_Handle ) {

		server_print( "[AMXX] %L", LANG_SERVER, "SQL_CANT_CON", error );
#endif
		// Make sure that the users.ini file exists.
		new configsDir[ 64 ];
		get_configsdir( configsDir, 63 );
		format( configsDir, 63, "%s/users.ini", configsDir );

		if( !file_exists( configsDir ) ) {

			console_print( id, "%s File ^"%s^" doesn't exist.", g_szTag, configsDir );
			return;
		}

		// Make sure steamid isn't already in file.
		new line = 0, textline[ 256 ], len;
		const SIZE = 63;
		new line_steamid[ SIZE + 1 ], line_password[ SIZE + 1 ], line_accessflags[ SIZE + 1 ], line_flags[ SIZE + 1 ], parsedParams;

		// <name|ip|steamid> <password> <access flags> <account flags>
		while( ( line = read_file( configsDir, line, textline, 255, len ) ) ) {

			if ( len == 0 || equal( textline, ";", 1 ) )
				continue; // comment line

			parsedParams = parse( textline, line_steamid, SIZE, line_password, SIZE, line_accessflags, SIZE, line_flags, SIZE );

			if( parsedParams != 4 )
				continue;	// Send warning/error?
			
			if( containi( line_flags, flags ) != -1 && equal( line_steamid, name ) ) {

				console_print( id, "%s %s already exists!", g_szTag, name );
				return;
			}
		}
	
		// If we came here, steamid doesn't exist in users.ini. Add it.
		new linetoadd[ 512 ];
		
		if( comment[ 0 ]==0 )
			formatex( linetoadd, 511, "^r^n^"%s^" ^"%s^" ^"%s^" ^"%s^"", name, password, accessflags, flags );

		else
			formatex( linetoadd, 511, "^r^n^"%s^" ^"%s^" ^"%s^" ^"%s^" ; %s", name, password, accessflags, flags, comment );

		console_print( id, "Adding:^n%s", linetoadd );
		
		if( !write_file( configsDir, linetoadd ) )
			console_print( id, "%s Failed writing to %s!", g_szTag, configsDir );
#if defined USING_SQL
	}
	
	new table[ 32 ];

	get_cvar_string( "amx_sql_table", table, 31 );

	new Handle:query = SQL_PrepareQuery( sql, "SELECT * FROM `%s` WHERE (`auth` = '%s')", table, name );
	
	if( !SQL_Execute( query ) ) {

		SQL_QueryError( query, error, 127 );
		server_print( "[AMXX] %L", LANG_SERVER, "SQL_CANT_LOAD_ADMINS", error );
		console_print( id, "[AMXX] %L", LANG_SERVER, "SQL_CANT_LOAD_ADMINS", error );
	} 
		
	else if( SQL_NumResults( query ) )
		console_print( id, "%s %s already exists!", g_szTag, name );

	else {

		console_print( id, "Adding to database:^n^"%s^" ^"%s^" ^"%s^" ^"%s^"", name, password, accessflags, flags );

		SQL_QueryAndIgnore( sql, "REPLACE INTO `%s` (`name`, `password`, `access`, `flags`) VALUES ('%s', '%s', '%s', '%s')", table, name, password, accessflags, flags );
	}

	SQL_FreeHandle( query );
	SQL_FreeHandle( sql);
	SQL_FreeHandle( info );
#endif
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Uita-te in primul post pentru configurarea pluginului si pentru ceilalti pasi :) !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
PuNNNcT^
Membru, skill 0
Membru, skill 0
Posts: 1
Joined: 04 Apr 2014, 16:09
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

04 Apr 2014, 16:14

YONT te rog ajuta-ma si pe mne sa-l pun pe sv ca am incercat dar nu merge :-??
m4s4cru
Membru, skill 0
Membru, skill 0
Posts: 4
Joined: 07 Jan 2011, 16:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 3 times
Contact:

15 May 2014, 20:08

salut folosesc acest plugin vip system v1.0.2,cum pot da vip la orice admin care nu are flagul t pus la ultimate_who sa apara ca vip si ca admin? daca dau cu amx_addvips nume apare ca vip dar nu are acces la comenzi,daca pun gradul t la admini in ultimate_who si nu ii dau vip cu comanda amx_addvips nu apare ca vips online dar are acces de vip?ma poate ajuta cinveva?daca ma inteles ce am vrut sa zic!
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

16 May 2014, 18:52

Nu inteleg ce vrei sa spui? :)) Mai repeta o data! ;))
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
m4s4cru
Membru, skill 0
Membru, skill 0
Posts: 4
Joined: 07 Jan 2011, 16:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 3 times
Contact:

16 May 2014, 20:44

folosesc acest plugin vip system v1.0.2,si doresc sa dau vip la oricine,daca am un admin cu gradul sergend de exemplu si vreau sai dau vip cu comanda amx_addvips apare va vip in /vips dar nu are beneficiile vipului:|,dacai trec in users.ini "t" numai apare in lista de admini
Hwin
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 06 Dec 2012, 13:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

17 May 2014, 17:13

e super, imi poti scoate viteza si gravitatia sau orce mai este acolo care poate influenta pluginurile de baga de la un mod furien? , ca eu le-am scos dar nu cred ca e bine ce am facut ca nu a mers.Dar daca se poate la CT sa lase viteza doar unpic mai mica
m4s4cru
Membru, skill 0
Membru, skill 0
Posts: 4
Joined: 07 Jan 2011, 16:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 3 times
Contact:

18 May 2014, 20:22

folosesc acest plugin vip system v1.0.2,si doresc sa dau vip la oricine,daca am un admin cu gradul sergend de exemplu si vreau sai dau vip cu comanda amx_addvips apare va vip in /vips dar nu are beneficiile vipului:|,dacai trec in users.ini "t" numai apare in lista de admini NIMENI??
User avatar
Emp`
Membru, skill 0
Membru, skill 0
Posts: 1
Joined: 31 May 2014, 09:27
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

31 May 2014, 09:35

Code: Select all

    register_event( "DeathMsg", "event_DeathMsg", "a" );
    register_event( "DeathMsg", "event_DeathMsg2", "ae" ) 
Dc chemi de 2 ori eventul ?
Staff Doctor
aLxKinG
Membru, skill 0
Membru, skill 0
Posts: 86
Joined: 16 Apr 2013, 17:54
Detinator Steam: Nu
Has thanked: 4 times
Been thanked: 1 time

31 May 2014, 10:42

Deci daca vreau sa pun ca de exemplu sa fie vip-i free seara la ora 18:00 pana la ora 20:00


Sursa. | Afiseaza codul
public check_time(  ) {

	static preluare_ora[ 3 ], ora;
	get_time( "%H", preluare_ora, 2 );

	ora = str_to_num( preluare_ora );

	if( 18 >= ora || ora <20 ) {

		if( !VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost activat!", g_szTag );

		VipEvent = true;
		server_cmd( "amx_default_access ^"t^"" );
	} else {

		if( VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost dezactivat!", g_szTag );

		VipEvent = false;
		server_cmd( "amx_default_access ^"z^"" );
	}

	server_cmd( "amx_reloadadmins" );
}
?????
Image
Cautam admini cu experienta , cerere pe forum.
Y!M: [email protected]
Steam: gorj.cs
User avatar
Snow.
Membru, skill +1
Membru, skill +1
Posts: 243
Joined: 18 Mar 2014, 21:59
Detinator Steam: Nu
Has thanked: 58 times
Been thanked: 24 times

31 May 2014, 11:34

aLxKinG wrote:Deci daca vreau sa pun ca de exemplu sa fie vip-i free seara la ora 18:00 pana la ora 20:00


Sursa. | Afiseaza codul
public check_time(  ) {

	static preluare_ora[ 3 ], ora;
	get_time( "%H", preluare_ora, 2 );

	ora = str_to_num( preluare_ora );

	if( 18 >= ora || ora <20 ) {

		if( !VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost activat!", g_szTag );

		VipEvent = true;
		server_cmd( "amx_default_access ^"t^"" );
	} else {

		if( VipEvent )
			ColorChat( 0, GREEN, "^x04%s^x01 Eventul^x03 Free VIP^x01 a fost dezactivat!", g_szTag );

		VipEvent = false;
		server_cmd( "amx_default_access ^"z^"" );
	}

	server_cmd( "amx_reloadadmins" );
}
?????
// Aici schimbati orele cand jucatorii pot avea VIP free( pentru a dezactiva setati caloarea 0 cvar-ului "vip_enable_vip_event" )
#define FIRST_HOUR 12
#define LAST_HOUR 13
Ion Creanga - Romania Juna, 1869 wrote:Stiu ca sunt prost, dar cand ma uit in jurul meu, prind curaj !
Image
User avatar
HamletEagle
Fost moderator
Fost moderator
Posts: 750
Joined: 21 Sep 2013, 15:05
Detinator Steam: Da
CS Status: Inactiv cateva zile.
SteamID: privat
Reputatie: Fost Scripter eXtreamCS.com
Fost Moderator ajutator
Has thanked: 19 times
Been thanked: 85 times

31 May 2014, 12:30

Emp` wrote:

Code: Select all

    register_event( "DeathMsg", "event_DeathMsg", "a" );
    register_event( "DeathMsg", "event_DeathMsg2", "ae" )
Dc chemi de 2 ori eventul ?
Asta e lordofnothing clar, din 2 motive:
1. El ii copiaza pe cei de pe allied.
2. Dupa ultimul lui topic in care s-a facut urat de ras,isi face alt cont,asta e stilul lui.

Nu conteaza daca il cheama de 15 ori atat timp cat flagurile difera ( "a" si "ae" ).
Daca vreti ajutorul meu, nu dati bump la topic, fara intrebari de genu "cat mai dureaza/mai astept mult?".
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: Mail.RU [Bot] and 13 guests