Dodaje tutaj chyba wyszstki kolor dostępne:
Normalny:fnChat( plr, const message[], {Float,Sql,Result,_}:... )
{
static max_players, svc_saytext;
if( !max_players )
max_players = get_maxplayers( );
if( !svc_saytext )
svc_saytext = get_user_msgid( "SayText" );
static msg[192];
msg[0] = 0x01;
vformat( msg[1], sizeof msg - 2, message, 3 );
if( plr > 0 && plr <= max_players )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr );
write_byte( plr );
write_string( msg );
message_end( );
}
else if( plr == 0 )
{
for( new i = 1 ; i <= max_players ; i++ )
{
if( is_user_connected( i ) )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i );
write_byte( i );
write_string( msg );
message_end( );
}
}
}
return 1;
}
Zastosowanie:
fnChat(id, "downlony tekst który wyświetla się w czacie")
Żółty:fnYellowChat( plr, const message[], {Float,Sql,Result,_}:... )
{
static max_players, svc_saytext;
if( !max_players )
max_players = get_maxplayers( );
if( !svc_saytext )
svc_saytext = get_user_msgid( "SayText" );
static msg[192];
msg[0] = 0x02;
vformat( msg[1], sizeof msg - 2, message, 3 );
if( plr > 0 && plr <= max_players )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr );
write_byte( plr );
write_string( msg );
message_end( );
}
else if( plr == 0 )
{
for( new i = 1 ; i <= max_players ; i++ )
{
if( is_user_connected( i ) )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i );
write_byte( i );
write_string( msg );
message_end( );
}
}
}
return 1;
}
Zastosowanie:
fnYellowChat(id, "downlony tekst który wyświetla się w czacie")
Team Kolor: (Czerwony dla TT, Niebieski dla CT)
fnTeamChat( plr, const message[], {Float,Sql,Result,_}:... )
{
static max_players, svc_saytext;
if( !max_players )
max_players = get_maxplayers( );
if( !svc_saytext )
svc_saytext = get_user_msgid( "SayText" );
static msg[192];
msg[0] = 0x03;
vformat( msg[1], sizeof msg - 2, message, 3 );
if( plr > 0 && plr <= max_players )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr );
write_byte( plr );
write_string( msg );
message_end( );
}
else if( plr == 0 )
{
for( new i = 1 ; i <= max_players ; i++ )
{
if( is_user_connected( i ) )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i );
write_byte( i );
write_string( msg );
message_end( );
}
}
}
return 1;
}
Zastosowanie:
fnTeamChat(id, "downlony tekst który wyświetla się w czacie")
Zielony:fnGreenChat( plr, const message[], {Float,Sql,Result,_}:... )
{
static max_players, svc_saytext;
if( !max_players )
max_players = get_maxplayers( );
if( !svc_saytext )
svc_saytext = get_user_msgid( "SayText" );
static msg[192];
msg[0] = 0x04;
vformat( msg[1], sizeof msg - 2, message, 3 );
if( plr > 0 && plr <= max_players )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr );
write_byte( plr );
write_string( msg );
message_end( );
}
else if( plr == 0 )
{
for( new i = 1 ; i <= max_players ; i++ )
{
if( is_user_connected( i ) )
{
message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i );
write_byte( i );
write_string( msg );
message_end( );
}
}
}
return 1;
}
Zastosowanie:
fnGreenChat(id, "downlony tekst który wyświetla się w czacie")
Kolory Normalny, Żółty oraz Team są stworzone na podstawie kodu który zamieścił
berixMyślę że komuś się to przyda