|
Author
|
Message
|
|
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
|

12-03-2014
, 01:36
Re: [HELP] How to put color into the .sma plugin?
|
#1
|
Quote:
Originally Posted by popeye10
PHP Code:
client_print_color(id, print_chat, "!g[MFG] !nYour ping can not exceed !t%d");
PHP Code:
!g = green color
!n = normal color
!t = team color
and put this code end of the plugin source code.
PHP Code:
stock client_print_color(id, type, const text[], any:...)
{
if(type == print_chat)
{
new g_iMsgidSayText;
g_iMsgidSayText = get_user_msgid("SayText");
new szMsg[191], iPlayers[32], iCount = 1;
vformat(szMsg, charsmax(szMsg), text, 3);
replace_all(szMsg, charsmax(szMsg), "!g","^x04");
replace_all(szMsg, charsmax(szMsg), "!n","^x01");
replace_all(szMsg, charsmax(szMsg), "!t","^x03");
if(id)
iPlayers[0] = id;
else
get_players(iPlayers, iCount, "ch");
for(new i = 0 ; i < iCount ; i++)
{
if(!is_user_connected(iPlayers[i]))
continue;
message_begin(MSG_ONE_UNRELIABLE, g_iMsgidSayText, _, iPlayers[i]);
write_byte(iPlayers[i]);
write_string(szMsg);
message_end();
}
}
}
|
Or use AMXX 1.8.3
__________________
|
|
|
|