Kod: Tümünü seç
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < fakemeta >
#include <hamsandwich>
#include <cstrike>
#pragma semicolon 1
// --| Credite lui CryWolf pentru 'layout' !!
new const
PLUGIN_NAME[ ] = "Furien Score & Round",
PLUGIN_VERSION[ ] = "0.2.1";
/* Copyright (c) 2013 Askhanar @eXtreamCS.com Edit YeKTaBEY
www.eXtreamCS.com/forum
www.amxmodx.org
www.amxmodx.ro
*/
// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
// --| Aici sunt culorile de la mesajele: Furien AntiFurien si Round
#define iNameRed 0
#define iNameGreen 255
#define iNameBlue 255
#define OFFSET_TEAM 114
#define user_team(%1) get_pdata_int(%1, OFFSET_TEAM)
// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
// --| Aici sunt culorile de la mesajele: numarul de castiguri si runde.
#define iScoreRed 255
#define iScoreGreen 0
#define iScoreBlue 0
new const
g_szTeamsMessage[ ] = " |- Terorist Counter Terorist -| ",
g_szScoreMessage[ ] = "%02i %02i";
new ctwin,tewin;
new g_iRounds,nKiller,nVictim;
new SyncHudTeamNames, SyncHudTeamScore;
public plugin_init( )
{
register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
register_event( "HLTV", "ev_NewRound", "a", "1=0", "2=0" );
register_event( "TextMsg", "ev_RoundRestart", "a", "2&#Game_C", "2&#Game_w" );
register_event("DeathMsg","death","ae");
g_iRounds = 0;
SyncHudTeamNames = CreateHudSyncObj( );
SyncHudTeamScore = CreateHudSyncObj( );
set_task( 1.0, "task_DisplayHudScore", _, _, _, "b", 0 );
// Add your code here...
}
public ev_NewRound( ) g_iRounds++;
public ev_RoundRestart( ) g_iRounds = 0, ctwin = 0, tewin = 0 ;
public death()
{
nKiller = read_data(1);
nVictim = read_data(2);
if(!is_user_connected(nKiller)) return;
if(user_team(nVictim) == user_team(nKiller)) // team kill
return;
if (cs_get_user_team (nKiller) == CS_TEAM_CT )
{
ctwin++;
}
else {
tewin++;
}
}
public task_DisplayHudScore( )
{
static iPlayers[ 32 ];
static iPlayersNum;
get_players( iPlayers, iPlayersNum, "ch" );
if( !iPlayersNum )
return;
static id,i;
for( i = 0; i < iPlayersNum; i++ )
{
id = iPlayers[ i ];
}
if( 1 <= get_user_team( id ) <= 3 )
{
set_hudmessage( iNameRed, iNameGreen, iNameBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 2 );
ShowSyncHudMsg( id, SyncHudTeamNames, g_szTeamsMessage );
set_hudmessage( iScoreRed, iScoreGreen, iScoreBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 3 );
ShowSyncHudMsg( id, SyncHudTeamScore, g_szScoreMessage,tewin,ctwin );
}
}