It is currently 15 Nov 2018 15:34



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 6 posts ] 
 plugin tag customizat 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 26 Oct 2018 12:23
Posts: 8
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Salut doresc si eu acel plugin "tag customizat" , cel cu .ini pentru adaugare ,

PS: ce am gasit pe extream , sau pe google nu mai merg . A lu hattrick cand dau sa scriu pe chat apare s1 : s1 ,, s2 : s2 etc...


10 Nov 2018 23:17
Profile multumesc WWW
Online
Moderator ajutator
Moderator ajutator
User avatar

Joined: 05 Jun 2016 23:04
Posts: 1034
Location: beyond the time
Detinator Steam: Da
Detinator server CS: GO/CSGO.WARED.RO
SteamID: DevilBoy_eXe
Reputatie: Moderator ajutator
Fond eXtream: 0
https://forums.alliedmods.net/showthread.php?t=297952

_________________


10 Nov 2018 23:45
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0

Joined: 26 Oct 2018 12:23
Posts: 8
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Altu ?


11 Nov 2018 21:05
Profile multumesc WWW
Online
Moderator
Moderator
User avatar

Joined: 12 Jun 2012 15:18
Posts: 5181
Location: Suceava
Detinator Steam: Da
Reputatie: Moderator
Fond eXtream: 0
Players Tags | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < ColorChat >


#define ADMIN_ACCESS ADMIN_BAN
#pragma semicolon 1

enum CsTeams
{
CS_TEAM_UNASSIGNED = 0,
CS_TEAM_T = 1,
CS_TEAM_CT = 2,
CS_TEAM_SPECTATOR = 3
};

static const PLUGIN[ ] = "Player Tags";
static const VERSION[ ] = "1.0";

new szFile[ 128 ];

new PlayerTag[ 33 ][ 32 ];
new bool: PlayerHasTag[ 33 ];


public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
register_concmd( "amx_reloadtags", "ClCmdReloadTags", -1, "" );

register_clcmd("say","hook_say");
register_clcmd("say_team","hook_say_team");

register_forward( FM_ClientUserInfoChanged, "fwClientUserInfoChanged" );
}

public plugin_precache( )
{

get_configsdir( szFile, sizeof ( szFile ) -1 );
formatex( szFile, sizeof ( szFile ) -1, "%s/PlayerTags.ini", szFile );

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

}

public client_putinserver( id )
{
if( is_user_bot( id ) || is_user_hltv( id ) ) return 1;

PlayerHasTag[ id ] = false;

LoadPlayerTag( id );

return 0;
}
public fwClientUserInfoChanged( id, buffer )
{
if ( !is_user_connected( id ) )
return FMRES_IGNORED;

static newname[ 32 ];
static name[ 32 ];

get_user_name( id, name, sizeof ( name ) -1 );
engfunc( EngFunc_InfoKeyValue, buffer, "name", newname, sizeof ( newname ) -1 );

if ( equal( newname, name ) )
return FMRES_IGNORED;


set_task( 0.1, "LoadPlayerTag", id );

return FMRES_SUPERCEDE;
}

public ClCmdReloadTags( id )
{
if( !( get_user_flags( id ) & ADMIN_ACCESS ) )
{
client_cmd( id, "echo Nu ai acces la aceasta comanda !");
return 1;
}

new iPlayers[ 32 ];
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
PlayerHasTag[ iPlayers[ i ] ] = false;
LoadPlayerTag( iPlayers[ i ] );
}

client_cmd( id, "echo Tag-urile jucatorilor au fost incarcate cu succes !");
return 1;
}

public hook_say( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat,"" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x04%s^x03 %s^x01: %s", name ,chat);
}
}
}
else if( !PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x03%s^x01: %s", name ,chat);
}
}
}

return 1;
}
public hook_say_team( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat, "" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( iPlayer ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s^x04 %s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s^x0 4%s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x04 %s^x03 %s^x01: %s", PlayerTag[ id ], name ,chat);
}
}
}
}
}
else if( !PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];
if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x03 %s^x01: %s", name ,chat);
}
}
}
}
}
return 1;
}
public LoadPlayerTag( id )
{
PlayerHasTag[ id ] = false;

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

new f = fopen( szFile, "rt" );

if( !f ) return 0;

new data[ 512 ], buffer[ 3 ][ 32 ] ;

while( !feof( f ) )
{
fgets( f, data, sizeof ( data ) -1 );

if( !data[ 0 ] || data[ 0 ] == ';' || ( data[ 0 ] == '/' && data[ 1 ] == '/' ) )
continue;

parse(data,\
buffer[ 0 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 1 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 2 ], sizeof ( buffer[ ] ) - 1
);

new name[ 32 ], ip[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );
get_user_ip( id, ip, sizeof ( ip ) -1, 1 );

if( equal( name, buffer[ 0 ] ) || equal( ip, buffer[ 1 ] ) )
{
PlayerHasTag[ id ] = true;
copy( PlayerTag[ id ], sizeof ( PlayerTag[ ] ) -1, buffer[ 2 ] );
break;
}
}

return 0;
}

_________________
La colțul unei case rotunde se auzi o împușcătura de cuțit. Mortul căzu spânzurat.


11 Nov 2018 21:11
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 26 Oct 2018 12:23
Posts: 8
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
smileye wrote:
Players Tags | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < ColorChat >


#define ADMIN_ACCESS ADMIN_BAN
#pragma semicolon 1

enum CsTeams
{
CS_TEAM_UNASSIGNED = 0,
CS_TEAM_T = 1,
CS_TEAM_CT = 2,
CS_TEAM_SPECTATOR = 3
};

static const PLUGIN[ ] = "Player Tags";
static const VERSION[ ] = "1.0";

new szFile[ 128 ];

new PlayerTag[ 33 ][ 32 ];
new bool: PlayerHasTag[ 33 ];


public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
register_concmd( "amx_reloadtags", "ClCmdReloadTags", -1, "" );

register_clcmd("say","hook_say");
register_clcmd("say_team","hook_say_team");

register_forward( FM_ClientUserInfoChanged, "fwClientUserInfoChanged" );
}

public plugin_precache( )
{

get_configsdir( szFile, sizeof ( szFile ) -1 );
formatex( szFile, sizeof ( szFile ) -1, "%s/PlayerTags.ini", szFile );

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

}

public client_putinserver( id )
{
if( is_user_bot( id ) || is_user_hltv( id ) ) return 1;

PlayerHasTag[ id ] = false;

LoadPlayerTag( id );

return 0;
}
public fwClientUserInfoChanged( id, buffer )
{
if ( !is_user_connected( id ) )
return FMRES_IGNORED;

static newname[ 32 ];
static name[ 32 ];

get_user_name( id, name, sizeof ( name ) -1 );
engfunc( EngFunc_InfoKeyValue, buffer, "name", newname, sizeof ( newname ) -1 );

if ( equal( newname, name ) )
return FMRES_IGNORED;


set_task( 0.1, "LoadPlayerTag", id );

return FMRES_SUPERCEDE;
}

public ClCmdReloadTags( id )
{
if( !( get_user_flags( id ) & ADMIN_ACCESS ) )
{
client_cmd( id, "echo Nu ai acces la aceasta comanda !");
return 1;
}

new iPlayers[ 32 ];
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
PlayerHasTag[ iPlayers[ i ] ] = false;
LoadPlayerTag( iPlayers[ i ] );
}

client_cmd( id, "echo Tag-urile jucatorilor au fost incarcate cu succes !");
return 1;
}

public hook_say( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat,"" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x04%s^x03 %s^x01: %s", name ,chat);
}
}
}
else if( !PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x03%s^x01: %s", name ,chat);
}
}
}

return 1;
}
public hook_say_team( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat, "" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( iPlayer ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s^x04 %s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s^x0 4%s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x04 %s^x03 %s^x01: %s", PlayerTag[ id ], name ,chat);
}
}
}
}
}
else if( !PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];
if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x03 %s^x01: %s", name ,chat);
}
}
}
}
}
return 1;
}
public LoadPlayerTag( id )
{
PlayerHasTag[ id ] = false;

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

new f = fopen( szFile, "rt" );

if( !f ) return 0;

new data[ 512 ], buffer[ 3 ][ 32 ] ;

while( !feof( f ) )
{
fgets( f, data, sizeof ( data ) -1 );

if( !data[ 0 ] || data[ 0 ] == ';' || ( data[ 0 ] == '/' && data[ 1 ] == '/' ) )
continue;

parse(data,\
buffer[ 0 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 1 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 2 ], sizeof ( buffer[ ] ) - 1
);

new name[ 32 ], ip[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );
get_user_ip( id, ip, sizeof ( ip ) -1, 1 );

if( equal( name, buffer[ 0 ] ) || equal( ip, buffer[ 1 ] ) )
{
PlayerHasTag[ id ] = true;
copy( PlayerTag[ id ], sizeof ( PlayerTag[ ] ) -1, buffer[ 2 ] );
break;
}
}

return 0;
}


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textOlRF0X.sma(4) : fatal error 100: cannot read from file: "ColorChat"


11 Nov 2018 23:41
Profile multumesc WWW
Online
Moderator
Moderator
User avatar

Joined: 10 Jul 2013 21:26
Posts: 2002
Location: Constanta
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 0
umbra_reflex wrote:
smileye wrote:
Players Tags | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < ColorChat >


#define ADMIN_ACCESS ADMIN_BAN
#pragma semicolon 1

enum CsTeams
{
CS_TEAM_UNASSIGNED = 0,
CS_TEAM_T = 1,
CS_TEAM_CT = 2,
CS_TEAM_SPECTATOR = 3
};

static const PLUGIN[ ] = "Player Tags";
static const VERSION[ ] = "1.0";

new szFile[ 128 ];

new PlayerTag[ 33 ][ 32 ];
new bool: PlayerHasTag[ 33 ];


public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
register_concmd( "amx_reloadtags", "ClCmdReloadTags", -1, "" );

register_clcmd("say","hook_say");
register_clcmd("say_team","hook_say_team");

register_forward( FM_ClientUserInfoChanged, "fwClientUserInfoChanged" );
}

public plugin_precache( )
{

get_configsdir( szFile, sizeof ( szFile ) -1 );
formatex( szFile, sizeof ( szFile ) -1, "%s/PlayerTags.ini", szFile );

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

}

public client_putinserver( id )
{
if( is_user_bot( id ) || is_user_hltv( id ) ) return 1;

PlayerHasTag[ id ] = false;

LoadPlayerTag( id );

return 0;
}
public fwClientUserInfoChanged( id, buffer )
{
if ( !is_user_connected( id ) )
return FMRES_IGNORED;

static newname[ 32 ];
static name[ 32 ];

get_user_name( id, name, sizeof ( name ) -1 );
engfunc( EngFunc_InfoKeyValue, buffer, "name", newname, sizeof ( newname ) -1 );

if ( equal( newname, name ) )
return FMRES_IGNORED;


set_task( 0.1, "LoadPlayerTag", id );

return FMRES_SUPERCEDE;
}

public ClCmdReloadTags( id )
{
if( !( get_user_flags( id ) & ADMIN_ACCESS ) )
{
client_cmd( id, "echo Nu ai acces la aceasta comanda !");
return 1;
}

new iPlayers[ 32 ];
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
PlayerHasTag[ iPlayers[ i ] ] = false;
LoadPlayerTag( iPlayers[ i ] );
}

client_cmd( id, "echo Tag-urile jucatorilor au fost incarcate cu succes !");
return 1;
}

public hook_say( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat,"" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s^x04 %s^x03 %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x04%s^x03 %s^x01: %s", name ,chat);
}
}
}
else if( !PlayerHasTag[ id ] )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( 0, RED,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( 0, BLUE,"^x03%s %s^x01: %s", is_user_alive( id ) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( 0, GREY,"^x03%s^x01: %s", name ,chat);
}
}
}

return 1;
}
public hook_say_team( id )
{

if( is_user_bot( id ) ) return 0;

static chat[ 192 ];
read_args( chat, sizeof( chat ) - 1 );
remove_quotes( chat );

if( equali( chat, "" ) ) return 0;

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

if( PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( iPlayer ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s^x04 %s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s^x0 4%s^x03 %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", PlayerTag[ id ], name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x04 %s^x03 %s^x01: %s", PlayerTag[ id ], name ,chat);
}
}
}
}
}
else if( !PlayerHasTag[ id ] )
{
new iPlayers[ 32 ], iPlayer;
new iPlayersNum;

get_players( iPlayers, iPlayersNum, "c" );
for( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];
if( get_user_team( id ) == get_user_team( iPlayer ) )
{
switch( get_user_team( id ) )
{
case CS_TEAM_T:
{
ColorChat( iPlayer, RED, "^x01(Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_CT:
{
ColorChat( iPlayer, BLUE, "^x01(Counter-Terrorist)^x03%s %s^x01: %s",is_user_alive(id) ? "" : "*Mort*", name ,chat);
}
case CS_TEAM_SPECTATOR:
{
ColorChat( iPlayer, GREY, "^x01(Spectator)^x03 %s^x01: %s", name ,chat);
}
}
}
}
}
return 1;
}
public LoadPlayerTag( id )
{
PlayerHasTag[ id ] = false;

if( !file_exists( szFile ) )
{
write_file( szFile, ";Aici treceti tag-urile jucatorilor !", -1 );
write_file( szFile, ";ex: ^"Nume Player^" ^"Ip Player^" ^"Tag Player^" ", -1 );
write_file( szFile, ";Numele sa fie exact( ex: Askhanar va fi Askhanar nu askhanar ! ) ", -1 );
}

new f = fopen( szFile, "rt" );

if( !f ) return 0;

new data[ 512 ], buffer[ 3 ][ 32 ] ;

while( !feof( f ) )
{
fgets( f, data, sizeof ( data ) -1 );

if( !data[ 0 ] || data[ 0 ] == ';' || ( data[ 0 ] == '/' && data[ 1 ] == '/' ) )
continue;

parse(data,\
buffer[ 0 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 1 ], sizeof ( buffer[ ] ) - 1,\
buffer[ 2 ], sizeof ( buffer[ ] ) - 1
);

new name[ 32 ], ip[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );
get_user_ip( id, ip, sizeof ( ip ) -1, 1 );

if( equal( name, buffer[ 0 ] ) || equal( ip, buffer[ 1 ] ) )
{
PlayerHasTag[ id ] = true;
copy( PlayerTag[ id ], sizeof ( PlayerTag[ ] ) -1, buffer[ 2 ] );
break;
}
}

return 0;
}


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textOlRF0X.sma(4) : fatal error 100: cannot read from file: "ColorChat"



Compileaza-l cu amxx 1.8.2 si adauga in include-ul in folderul ”include”.

_________________


12 Nov 2018 08:15
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 75 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group