Ajutor mesaj

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
JuNNNNkieWho
Membru, skill +1
Membru, skill +1
Posts: 106
Joined: 20 Dec 2015, 08:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

25 Mar 2018, 23:39

Aveti idee de ce nu apare colorat in chat? eu zic ca pare ok are alea definite

Code: Select all

	new name[33];
	get_user_name(id,name,charsmax(name));
	if(g_time[id] == get_pcvar_num(time))
		zp_colored_print(id,"!gDe ce nu se pun culorile?",name)
}
stock zp_colored_print(const id,const input[], any:...)
{
	new msg[191], players[32], count = 1;
	vformat(msg,190,input,3);
	replace_all(msg,190,"!g","^x04");// green
	replace_all(msg,190,"!y","^x01");// normal
	replace_all(msg,190,"!team","^x03");// team
	
	if (id) players[0] = id; else get_players(players,count,"ch");

	for (new i=0;i<count;i++)
	{
		if (is_user_connected(players[i]))
		{
			message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
			write_byte(players[i]);
			write_string(msg);
			message_end();
		}
	}
}
RoyalServer 2
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5138
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

26 Mar 2018, 02:08

incearca cu acest stock

Code: Select all

stock print_color( const id, const input[ ], any:... )
{
    new count = 1, players[ 32 ];
    
    static msg[ 191 ];
    vformat( msg, 190, input, 3 );
    
    replace_all( msg, 190, "!v", "^4" ); //- verde
    replace_all( msg, 190, "!g", "^1" ); //- galben
    replace_all( msg, 190, "!e", "^3" ); //- echipa
    replace_all( msg, 190, "!n", "^0" ); //- normal
    
    if( id ) players[ 0 ] = id; else get_players( players, count, "ch" ); 
        {
    
    for( new i = 0; i < count; i++ )
    {
        if( is_user_connected( players[ i ] ) )
        {
            message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
            write_byte( players[ i ] );
            write_string( msg );
            message_end( );
        }
    }
}
} 
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information