Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

OeMGje - zdjęcie

OeMGje

Rejestracja: 20.04.2011
Aktualnie: Nieaktywny
Poza forum Ostatnio: 06.12.2011 20:08
-----

#278372 Deathrun fake player

Napisane przez speedkill w 05.08.2011 21:04

/* Plugin generated by AMXX-Studio */



#include < amxmodx >

#include < engine >

#include < cstrike >

#include < fun >

#include < fakemeta >

#include < hamsandwich >



#define PLUGIN "New Plug-In"

#define VERSION "1.0"

#define AUTHOR "Administrator"



#define FAKE_PLAYER



#if defined FAKE_PLAYER

	new const g_szBotName[ ] = "Nazwa bota";

#endif



#if defined FAKE_PLAYER

	new g_iFakeplayer;

#endif





public plugin_init() {

	register_plugin(PLUGIN, VERSION, AUTHOR)

	

		#if defined FAKE_PLAYER

		new iEntity, iCount;

		

		while( ( iEntity = find_ent_by_class( iEntity, "info_player_deathmatch" ) ) > 0 )

			if( iCount++ > 1 )

				break;

		

		if( iCount <= 1 )

			g_iFakeplayer = -1;

		

		set_task( 5.0, "UpdateBot" );

		

		register_message( get_user_msgid( "DeathMsg" ), "MsgDeathMsg" );

	#endif

	} 

// FAKEPLAYER

///////////////////////////////////////////

#if defined FAKE_PLAYER

	public UpdateBot( ) {

		if( g_iFakeplayer == -1 )

			return;

		

		new id = find_player( "i" );

		

		if( !id ) {

			id = engfunc( EngFunc_CreateFakeClient, g_szBotName );

			if( pev_valid( id ) ) {

				engfunc( EngFunc_FreeEntPrivateData, id );

				dllfunc( MetaFunc_CallGameEntity, "player", id );

				set_user_info( id, "rate", "3500" );

				set_user_info( id, "cl_updaterate", "25" );

				set_user_info( id, "cl_lw", "1" );

				set_user_info( id, "cl_lc", "1" );

				set_user_info( id, "cl_dlmax", "128" );

				set_user_info( id, "cl_righthand", "1" );

				set_user_info( id, "_vgui_menus", "0" );

				set_user_info( id, "_ah", "0" );

				set_user_info( id, "dm", "0" );

				set_user_info( id, "tracker", "0" );

				set_user_info( id, "friends", "0" );

				set_user_info( id, "*bot", "1" );

				set_pev( id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT );

				set_pev( id, pev_colormap, id );

				

				new szMsg[ 128 ];

				dllfunc( DLLFunc_ClientConnect, id, g_szBotName, "127.0.0.1", szMsg );

				dllfunc( DLLFunc_ClientPutInServer, id );

				

				cs_set_user_team( id, CS_TEAM_CT );

				ExecuteHamB( Ham_CS_RoundRespawn, id );

				

				set_pev( id, pev_effects, pev( id, pev_effects ) | EF_NODRAW );

				set_pev( id, pev_solid, SOLID_NOT );

				dllfunc( DLLFunc_Think, id );

				

				g_iFakeplayer = id;

			}

		}

	}

	

	public MsgDeathMsg( const iMsgId, const iMsgDest, const id ) {

		if( get_msg_arg_int( 2 ) == g_iFakeplayer )

			return PLUGIN_HANDLED;

		

		return PLUGIN_CONTINUE;

	}

#endif

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE

*{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }

*/


  • +
  • -
  • 1


#239379 Deathrun fake player

Napisane przez Enzo w 20.04.2011 18:25

Brak spawnów w TT.
Musisz dodać spawny.
  • +
  • -
  • 1