Esempio n. 1
0
void HintMessageToAllPlayers(const char *message)
{
	hudtextparms_t textParms;

	textParms.x = -1.0f;
	textParms.y = -1.0f;
	textParms.effect = 0;

	textParms.r1 = 100;
	textParms.g1 = 255;
	textParms.b1 = 100;

	textParms.r2 = 255;
	textParms.g2 = 255;
	textParms.b2 = 255;

	textParms.fadeinTime = 1.0f;
	textParms.fadeoutTime = 5.0f;
	textParms.holdTime = 5.0f;
	textParms.fxTime = 0.0f;

	textParms.channel = 0;

	UTIL_HudMessageAll(textParms, message);
}
Esempio n. 2
0
void CGameText::Display( CBaseEntity *pActivator )
{
	if ( !CanFireForActivator( pActivator ) )
		return;

	#ifdef SecobMod__Enable_Fixed_Multiplayer_AI
		// also send to all if we haven't got a specific activator player to send to 
		if ( MessageToAll() || !pActivator || !pActivator->IsPlayer() ) 
	#else
		if ( MessageToAll() )
	#endif //SecobMod__Enable_Fixed_Multiplayer_AI

	if ( MessageToAll() )
	{
		UTIL_HudMessageAll( m_textParms, MessageGet() );
	}
	else
	{
	#ifdef SecobMod__Enable_Fixed_Multiplayer_AI
			UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet() );
	#else
	// If we're in singleplayer, show the message to the player.
			if ( gpGlobals->maxClients == 1 )
			{
				CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
				UTIL_HudMessage( pPlayer, m_textParms, MessageGet() );
			}
			// Otherwise show the message to the player that triggered us.
			else if ( pActivator && pActivator->IsNetClient() )
			{
				UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet() );
			}
	#endif //SecobMod__Enable_Fixed_Multiplayer_AI
	}
}
Esempio n. 3
0
void CGameText::Display( CBaseEntity *pActivator )
{
	if ( !CanFireForActivator( pActivator ) )
		return;

	char fontbuf[48];
	FontGet(fontbuf);

	if ( MessageToAll() )
	{
		UTIL_HudMessageAll( m_textParms, MessageGet(), fontbuf );
	}
	else
	{
		// If we're in singleplayer, show the message to the player.
		if ( gpGlobals->maxClients == 1 )
		{
			CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
			UTIL_HudMessage( pPlayer, m_textParms, MessageGet(), fontbuf );
		}
		// Otherwise show the message to the player that triggered us.
		else if ( pActivator && pActivator->IsNetClient() )
		{
			UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet(), fontbuf );
		}
	}
}
Esempio n. 4
0
void CGameText::Display( CBaseEntity *pActivator )
{
	if ( !CanFireForActivator( pActivator ) )
		return;

	// also send to all if we haven't got a specific activator player to send to
	if ( MessageToAll() || !pActivator || !pActivator->IsPlayer() )
		UTIL_HudMessageAll( m_textParms, MessageGet() );
	else
		UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet() );
}
void CGameText::Display( CBaseEntity *pActivator )
{
	if ( !CanFireForActivator( pActivator ) )
		return;

	if (MessageToAll() || !pActivator || !pActivator->IsPlayer())
	{
		UTIL_HudMessageAll( m_textParms, MessageGet() );
	}
	else
	{
		UTIL_HudMessage(ToBasePlayer(pActivator), m_textParms, MessageGet());
	}
}
Esempio n. 6
0
void CGameText::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
{
	if (!CanFireForActivator(pActivator))
		return;

	if (MessageToAll())
	{
		UTIL_HudMessageAll(m_textParms, MessageGet());
	}
	else
	{
		if (pActivator->IsNetClient())
		{
			UTIL_HudMessage(pActivator, m_textParms, MessageGet());
		}
	}
}