AntiFurien Radar

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1130 times
Contact:

08 Oct 2013, 19:37

S!l@ba wrote:Frumos plugin,bine lucrat dar totuşi dacă îşi pot cumpăra echipament care îi camuflează nu e cam acelaşi lucru dacă nu ai plugin-ul pe sv ?
nu e tot una.. pentru ca nu o sa aiba toti bani pentru acel echipament.. si am sa fac in asa fel incat.. daca e vreun furien cu echipament de 'camuflat' ( nu e detectat de radar.. ) el nu va fi afisat pe radar.. dar sunetul tot se va auzi..
+ adauga lucruri noi la server si infrumuseteaza gameplay`ul.

iti place il pui.. crezi ca e inutil.. no offence dar nu il pune.
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
eXtreamSHOP
Cosmin
Fost moderator
Fost moderator
Posts: 9350
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

08 Oct 2013, 19:40

Askhanar vezi ce idei iti mai vin :)) asta ti-a iesit perfect. :)
User avatar
Cristian
Fost moderator
Fost moderator
Posts: 3217
Joined: 12 Sep 2010, 12:19
Detinator Steam: Da
CS Status: None!
Detinator server CS: Nu
SteamID: -
Reputatie: Fost Moderator
Nume anterior : S!l@ba, jackanape, vengeance
Fost Membru Club eXtreamCS (doua luni)
Location: Craiova
Has thanked: 34 times
Been thanked: 152 times
Contact:

09 Oct 2013, 14:24

Askhanar wrote:
S!l@ba wrote:Frumos plugin,bine lucrat dar totuşi dacă îşi pot cumpăra echipament care îi camuflează nu e cam acelaşi lucru dacă nu ai plugin-ul pe sv ?
nu e tot una.. pentru ca nu o sa aiba toti bani pentru acel echipament.. si am sa fac in asa fel incat.. daca e vreun furien cu echipament de 'camuflat' ( nu e detectat de radar.. ) el nu va fi afisat pe radar.. dar sunetul tot se va auzi..
+ adauga lucruri noi la server si infrumuseteaza gameplay`ul.

iti place il pui.. crezi ca e inutil.. no offence dar nu il pune.
Nu am spus că este inutil,dar eu nu ştiam că o să aduci aşa modificări,dacă o să aduci acele modificări o să fie ok,şi nu ştiam că necesită o sumă de bani.Totuşi dacă tu ai înţeles că am spus că e inutil,îmi cer scuze,deşii nu prea văd de ce pentru că nu am spuso.
Last edited by Ulquiorra on 09 Oct 2013, 20:00, edited 1 time in total.
Reason: asta se subintelege..
“You only live once, but if you do it right, once is enough.”
― Mae West
TrrrQ
Fost moderator
Fost moderator
Posts: 2592
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

09 Oct 2013, 18:24

Ar fi interesant când eşti anti-furien să îl poţi cumpăra doar o dată pe rundă şi să ai şansă de x% .
Aşa e cam aiurea pentru că-şi cumpără toţi rundă de rundă mai ales că majoritatea serverelor au plugin care oferă credite gratis.
Filme Online Subtitrate (Doar o singură reclamă obligatorie de la player): https://filmeonline-hd.com
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1130 times
Contact:

09 Oct 2013, 20:05

asta depinde de ei.. sa il mote pe credite sau eu stiu sa ii puna un pret mare..
sa il faca doar pentru vip sau eu stiu..

@faza cu 1 data pe runda .. nu ii vad rostul.. cine l-ar cumpara de 2 ori pe runda ?. + ca nu poate fi luat de 2 ori la rand ( daca nu ai murit ).
+ ca daca l-as face 1 data/runda.. e tot acelasi lucru pentru ca il ia runda asta si il ia si runda urmatoare. .deci il poate lua in fiecare runda ( daca are bani.. ).
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
TrrrQ
Fost moderator
Fost moderator
Posts: 2592
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

10 Oct 2013, 10:27

Mă refeream doar o dată pe rundă cu tot cu şansă de x% , adică dacă nu ai avut noroc să ţi-l dea , să nu mai poţi cumpăra iar
Last edited by Ulquiorra on 10 Oct 2013, 19:57, edited 1 time in total.
Reason: o sa vad ce pot sa fac.. desi s-ar transforma in un alt plugin..
Filme Online Subtitrate (Doar o singură reclamă obligatorie de la player): https://filmeonline-hd.com
User avatar
Ulquiorra
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2056
Joined: 25 Jul 2010, 16:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Scripter eXtreamCS
Nick anterior: sPuf ?, a^ml), Loca Tapioca, Askhanar
Fost Moderator ajutator
Location: Braila, Romania.
Has thanked: 214 times
Been thanked: 1130 times
Contact:

18 Oct 2013, 20:47

New version released ( 0.2.0 ).
Cititi primul post.
""Copilarie, iarta-ma c-am vrut sa fiu om mare.. ""
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1207
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times
Contact:

18 Oct 2013, 21:03

Noua versiune rupe >:D<
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 285
Joined: 21 Oct 2009, 02:51
Detinator Steam: Da
CS Status: Ruleaza si viseaza ;)
Detinator server CS: Cs.DynamicSpace.Ro
SteamID: RoCoFeLu92
Has thanked: 56 times
Been thanked: 6 times
Contact:

09 Dec 2013, 23:29

Foarte interesant, multumim!

Code: Select all

L 12/09/2013 - 23:27:37: [CSTRIKE] Invalid player 11
L 12/09/2013 - 23:27:37: [AMXX] Displaying debug trace (plugin "AntiFurien_Radar.amxx")
L 12/09/2013 - 23:27:37: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 12/09/2013 - 23:27:37: [AMXX]    [0] AntiFurien_Radar.sma::fw_PlayerPreThinkPre (line 230)
Image
Image
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1207
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times
Contact:

09 Dec 2013, 23:31

@RoCoFeLu
ia vezi acum
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	#include < cstrike >
	#include < fakemeta >
	
	
	#pragma semicolon 1
	
	#define RADAR_DELAY	1.0
	#define is_player(%1) (1 <= %1 <= 32)

	
	new const
		PLUGIN_NAME[ ] 		= "AntiFurien Radar",
		PLUGIN_VERSION[ ] 	= "0.2.0";
	
	new const
		PLUGIN_TAG[ ]		= "|AMXX:",
		RADAR_SOUND[ ]		= "misc/motion.wav";
	
	
	new g_iCvarMinFurienSpeed;
	new g_iCvarRadarRange;
	new g_iCvarCost;
	new g_iCvarCostTwo;
	
	new g_iMaxPlayers;
	new Float:g_fCurrentTime;
	new Float:g_fNextRadarTime[ 33 ];
	
	new bool:g_bUserHasRadar[ 33 ];
	new bool:g_bUserHasProtection[ 33 ];
	new bool:g_bDrawFurienOnRadar[ 33 ];
	
	new g_iMsgIdHostageK;
	new g_iMsgIdHostagePos;
	
	
public plugin_precache( )
{
	precache_sound( RADAR_SOUND );
}


public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	
	g_iCvarMinFurienSpeed = register_cvar( "afr_minspeed", "100" );
	g_iCvarRadarRange = register_cvar( "afr_range", "850" );
	g_iCvarCost = register_cvar( "afr_radar_cost", "14000" );
	g_iCvarCostTwo = register_cvar( "afr_protection_cost", "16000" );
	
	register_clcmd( "say /afradar", "ClCmdSayRadar" );
	register_clcmd( "say /afr", "ClCmdSayRadar" );
	register_clcmd( "say /afrprotection", "ClCmdSayProtection" );
	register_clcmd( "say /afrp", "ClCmdSayProtection" );
	
	register_event(  "DeathMsg",  "EventDeathMsg",  "a"  );
	register_forward( FM_PlayerPreThink, "fw_PlayerPreThinkPre", false );
	
	
	g_iMsgIdHostageK = get_user_msgid( "HostageK" );
	g_iMsgIdHostagePos = get_user_msgid( "HostagePos" );
	g_iMaxPlayers = get_maxplayers( );
	
	// Add your code here...
}

public ClCmdSayRadar( id )
{
	if( cs_get_user_team( id ) != CS_TEAM_CT )
	{
		client_print( id, print_chat, "%s Only AntiFuriens are allowed to buy this!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( !is_user_alive( id ) )
	{
		client_print( id, print_chat, "%s You need to be alive!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( g_bUserHasRadar[ id ] )
	{
		client_print( id, print_chat, "%s You already have one!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	new iCost = get_pcvar_num( g_iCvarCost );
	new iMoney = cs_get_user_money( id );
	
	if( iMoney < iCost )
	{
		client_print( id, print_chat, "%s You have not enough money, you need $%i more!", PLUGIN_TAG, iCost - iMoney );
		return PLUGIN_CONTINUE;
	}
	
	g_bUserHasRadar[ id ] = true;
	cs_set_user_money( id, iMoney - iCost );
	
	client_print( id, print_chat, "%s You are now detecting near furiens, watch your radar!", PLUGIN_TAG );
	return PLUGIN_CONTINUE;
}

public ClCmdSayProtection( id )
{
	if( cs_get_user_team( id ) != CS_TEAM_T )
	{
		client_print( id, print_chat, "%s Only Furiens are allowed to buy this!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( !is_user_alive( id ) )
	{
		client_print( id, print_chat, "%s You need to be alive!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( g_bUserHasProtection[ id ] )
	{
		client_print( id, print_chat, "%s You already have one!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	new iCost = get_pcvar_num( g_iCvarCostTwo );
	new iMoney = cs_get_user_money( id );
	
	if( iMoney < iCost )
	{
		client_print( id, print_chat, "%s You have not enough money, you need $%i more!", PLUGIN_TAG, iCost - iMoney );
		return PLUGIN_CONTINUE;
	}
	
	g_bUserHasProtection[ id ] = true;
	cs_set_user_money( id, iMoney - iCost );
	
	client_print( id, print_chat, "%s You are now protected against AntiFurien's radar!", PLUGIN_TAG );
	return PLUGIN_CONTINUE;
}

public client_putinserver( id )
{
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}

public client_disconnect( id )
{
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}

public EventDeathMsg(  )	
{
	static id;
	id = read_data( 2 );
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}
	

public fw_PlayerPreThinkPre( id )
{
	if( !is_user_alive( id ) )
		return FMRES_IGNORED;
	
	g_fCurrentTime = get_gametime( );
	
	if( cs_get_user_team( id ) == CS_TEAM_CT && g_bUserHasRadar[ id ] )
	{
		
		if( g_fNextRadarTime[ id ] <= g_fCurrentTime )
		{
			
			g_fNextRadarTime[ id ] = g_fCurrentTime + RADAR_DELAY;
			static bool:bBeep;
			bBeep = false;
			
			for( new iFurien = 1; iFurien <= g_iMaxPlayers; iFurien++ )
			{
				
				if( g_bDrawFurienOnRadar[ iFurien ] )
				{
					if( !g_bUserHasProtection[ iFurien ] )
					{
						static Float:fOrigin[ 3 ];
						pev( iFurien, pev_origin, fOrigin );
						
						UTIL_ShowOnRadar( id, iFurien, fOrigin );
					}
					
					bBeep = true;
				}
			}
			
			if( bBeep )
				client_cmd( id, "spk %s", RADAR_SOUND );
			
		}
		
	}
	
	else if( cs_get_user_team( id ) == CS_TEAM_T )
	{
		
		
		static Float:fFurienOrigin[ 3 ];
		pev( id, pev_origin, fFurienOrigin );
		
		static Float:fVelocity[ 3 ];
		pev( id, pev_velocity, fVelocity );
		
		static Float:fCurSpeed;
		fCurSpeed = vector_length( fVelocity );
		
		if( fCurSpeed > float( get_pcvar_num( g_iCvarMinFurienSpeed ) ) )
		{	
	
			static iAnti;
			for( iAnti = 1; iAnti <= g_iMaxPlayers; iAnti++ )
			{
				if( cs_get_user_team( iAnti ) == CS_TEAM_CT && is_user_alive( iAnti ) && is_player(iAnti))
				{
					static Float:fAntiOrigin[ 3 ];
					pev( iAnti, pev_origin, fAntiOrigin );
					
					if( get_distance_f( fFurienOrigin, fAntiOrigin ) <= float( get_pcvar_num( g_iCvarRadarRange ) ) )
					{
						g_bDrawFurienOnRadar[ id ] = true;
						
						break;
					}
				}
			}
		}
		else
		{
			g_bDrawFurienOnRadar[ id ] = false;
		}
		
	}
	
	return FMRES_IGNORED;
	
}

UTIL_ShowOnRadar( id, iTarget, Float:fOrigin[ 3 ] )
{
	
	
	//Make a dot on players radar.
	message_begin( MSG_ONE_UNRELIABLE, g_iMsgIdHostagePos, .player = id );
	write_byte( id );
	write_byte( iTarget );
	engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] );
	engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] );
	engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] );
	message_end( );
	
	//Make the dot red.
	message_begin( MSG_ONE_UNRELIABLE, g_iMsgIdHostageK, .player = id );
	write_byte( iTarget );
	message_end( );
	
}
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 285
Joined: 21 Oct 2009, 02:51
Detinator Steam: Da
CS Status: Ruleaza si viseaza ;)
Detinator server CS: Cs.DynamicSpace.Ro
SteamID: RoCoFeLu92
Has thanked: 56 times
Been thanked: 6 times
Contact:

10 Dec 2013, 15:11

FaTzZu wrote:@RoCoFeLu
ia vezi acum
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	#include < cstrike >
	#include < fakemeta >
	
	
	#pragma semicolon 1
	
	#define RADAR_DELAY	1.0
	#define is_player(%1) (1 <= %1 <= 32)

	
	new const
		PLUGIN_NAME[ ] 		= "AntiFurien Radar",
		PLUGIN_VERSION[ ] 	= "0.2.0";
	
	new const
		PLUGIN_TAG[ ]		= "|AMXX:",
		RADAR_SOUND[ ]		= "misc/motion.wav";
	
	
	new g_iCvarMinFurienSpeed;
	new g_iCvarRadarRange;
	new g_iCvarCost;
	new g_iCvarCostTwo;
	
	new g_iMaxPlayers;
	new Float:g_fCurrentTime;
	new Float:g_fNextRadarTime[ 33 ];
	
	new bool:g_bUserHasRadar[ 33 ];
	new bool:g_bUserHasProtection[ 33 ];
	new bool:g_bDrawFurienOnRadar[ 33 ];
	
	new g_iMsgIdHostageK;
	new g_iMsgIdHostagePos;
	
	
public plugin_precache( )
{
	precache_sound( RADAR_SOUND );
}


public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	
	g_iCvarMinFurienSpeed = register_cvar( "afr_minspeed", "100" );
	g_iCvarRadarRange = register_cvar( "afr_range", "850" );
	g_iCvarCost = register_cvar( "afr_radar_cost", "14000" );
	g_iCvarCostTwo = register_cvar( "afr_protection_cost", "16000" );
	
	register_clcmd( "say /afradar", "ClCmdSayRadar" );
	register_clcmd( "say /afr", "ClCmdSayRadar" );
	register_clcmd( "say /afrprotection", "ClCmdSayProtection" );
	register_clcmd( "say /afrp", "ClCmdSayProtection" );
	
	register_event(  "DeathMsg",  "EventDeathMsg",  "a"  );
	register_forward( FM_PlayerPreThink, "fw_PlayerPreThinkPre", false );
	
	
	g_iMsgIdHostageK = get_user_msgid( "HostageK" );
	g_iMsgIdHostagePos = get_user_msgid( "HostagePos" );
	g_iMaxPlayers = get_maxplayers( );
	
	// Add your code here...
}

public ClCmdSayRadar( id )
{
	if( cs_get_user_team( id ) != CS_TEAM_CT )
	{
		client_print( id, print_chat, "%s Only AntiFuriens are allowed to buy this!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( !is_user_alive( id ) )
	{
		client_print( id, print_chat, "%s You need to be alive!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( g_bUserHasRadar[ id ] )
	{
		client_print( id, print_chat, "%s You already have one!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	new iCost = get_pcvar_num( g_iCvarCost );
	new iMoney = cs_get_user_money( id );
	
	if( iMoney < iCost )
	{
		client_print( id, print_chat, "%s You have not enough money, you need $%i more!", PLUGIN_TAG, iCost - iMoney );
		return PLUGIN_CONTINUE;
	}
	
	g_bUserHasRadar[ id ] = true;
	cs_set_user_money( id, iMoney - iCost );
	
	client_print( id, print_chat, "%s You are now detecting near furiens, watch your radar!", PLUGIN_TAG );
	return PLUGIN_CONTINUE;
}

public ClCmdSayProtection( id )
{
	if( cs_get_user_team( id ) != CS_TEAM_T )
	{
		client_print( id, print_chat, "%s Only Furiens are allowed to buy this!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( !is_user_alive( id ) )
	{
		client_print( id, print_chat, "%s You need to be alive!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	if( g_bUserHasProtection[ id ] )
	{
		client_print( id, print_chat, "%s You already have one!", PLUGIN_TAG );
		return PLUGIN_CONTINUE;
	}
	
	new iCost = get_pcvar_num( g_iCvarCostTwo );
	new iMoney = cs_get_user_money( id );
	
	if( iMoney < iCost )
	{
		client_print( id, print_chat, "%s You have not enough money, you need $%i more!", PLUGIN_TAG, iCost - iMoney );
		return PLUGIN_CONTINUE;
	}
	
	g_bUserHasProtection[ id ] = true;
	cs_set_user_money( id, iMoney - iCost );
	
	client_print( id, print_chat, "%s You are now protected against AntiFurien's radar!", PLUGIN_TAG );
	return PLUGIN_CONTINUE;
}

public client_putinserver( id )
{
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}

public client_disconnect( id )
{
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}

public EventDeathMsg(  )	
{
	static id;
	id = read_data( 2 );
	
	g_bUserHasRadar[ id ] = false;
	g_bUserHasProtection[ id ] = false;
	g_bDrawFurienOnRadar[ id ] = false;
}
	

public fw_PlayerPreThinkPre( id )
{
	if( !is_user_alive( id ) )
		return FMRES_IGNORED;
	
	g_fCurrentTime = get_gametime( );
	
	if( cs_get_user_team( id ) == CS_TEAM_CT && g_bUserHasRadar[ id ] )
	{
		
		if( g_fNextRadarTime[ id ] <= g_fCurrentTime )
		{
			
			g_fNextRadarTime[ id ] = g_fCurrentTime + RADAR_DELAY;
			static bool:bBeep;
			bBeep = false;
			
			for( new iFurien = 1; iFurien <= g_iMaxPlayers; iFurien++ )
			{
				
				if( g_bDrawFurienOnRadar[ iFurien ] )
				{
					if( !g_bUserHasProtection[ iFurien ] )
					{
						static Float:fOrigin[ 3 ];
						pev( iFurien, pev_origin, fOrigin );
						
						UTIL_ShowOnRadar( id, iFurien, fOrigin );
					}
					
					bBeep = true;
				}
			}
			
			if( bBeep )
				client_cmd( id, "spk %s", RADAR_SOUND );
			
		}
		
	}
	
	else if( cs_get_user_team( id ) == CS_TEAM_T )
	{
		
		
		static Float:fFurienOrigin[ 3 ];
		pev( id, pev_origin, fFurienOrigin );
		
		static Float:fVelocity[ 3 ];
		pev( id, pev_velocity, fVelocity );
		
		static Float:fCurSpeed;
		fCurSpeed = vector_length( fVelocity );
		
		if( fCurSpeed > float( get_pcvar_num( g_iCvarMinFurienSpeed ) ) )
		{	
	
			static iAnti;
			for( iAnti = 1; iAnti <= g_iMaxPlayers; iAnti++ )
			{
				if( cs_get_user_team( iAnti ) == CS_TEAM_CT && is_user_alive( iAnti ) && is_player(iAnti))
				{
					static Float:fAntiOrigin[ 3 ];
					pev( iAnti, pev_origin, fAntiOrigin );
					
					if( get_distance_f( fFurienOrigin, fAntiOrigin ) <= float( get_pcvar_num( g_iCvarRadarRange ) ) )
					{
						g_bDrawFurienOnRadar[ id ] = true;
						
						break;
					}
				}
			}
		}
		else
		{
			g_bDrawFurienOnRadar[ id ] = false;
		}
		
	}
	
	return FMRES_IGNORED;
	
}

UTIL_ShowOnRadar( id, iTarget, Float:fOrigin[ 3 ] )
{
	
	
	//Make a dot on players radar.
	message_begin( MSG_ONE_UNRELIABLE, g_iMsgIdHostagePos, .player = id );
	write_byte( id );
	write_byte( iTarget );
	engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] );
	engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] );
	engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] );
	message_end( );
	
	//Make the dot red.
	message_begin( MSG_ONE_UNRELIABLE, g_iMsgIdHostageK, .player = id );
	write_byte( iTarget );
	message_end( );
	
}
O sa testez si revin cu edit!
EDIT! Nu stiu ce i-ai facut, dar nu mai functioneaza deloc! Nici punctul rosu pe radar, nici sunetul.
Image
Image
User avatar
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 285
Joined: 21 Oct 2009, 02:51
Detinator Steam: Da
CS Status: Ruleaza si viseaza ;)
Detinator server CS: Cs.DynamicSpace.Ro
SteamID: RoCoFeLu92
Has thanked: 56 times
Been thanked: 6 times
Contact:

18 Dec 2013, 12:47

Code: Select all

12/18/2013 - 12:46:24: [CSTRIKE] Invalid player 5
12/18/2013 - 12:46:24: [AMXX] Displaying debug trace (plugin "AntiFurien_Radar.amxx")
12/18/2013 - 12:46:24: [AMXX] Run time error 10: native error (native "cs_get_user_team")
12/18/2013 - 12:46:24: [AMXX] [0] AntiFurien_Radar.sma::fw_PlayerPreThinkPre (line 230)
12/18/2013 - 12:46:24: [META] WARNING: Plugin didn't set meta_result: fakemeta_amxx_i386.so:PlayerPreThink()
Image
Image
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: Facebook [Bot] and 8 guests