Raised This Month: $ Target: $400
 0% 

[HELP] How to put color into the .sma plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NovinhoFDR
New Member
Join Date: Dec 2014
Old 12-01-2014 , 10:08   [HELP] How to put color into the .sma plugin?
Reply With Quote #1

[AJUDA] Como colcoar cor dentro do plugin .sma?

Olá sou NovinhoFDR. Estou começando agora em Plugins.

Queria colocar cor dentro do plugin .sma.

Exemplo:

(verde)[MFG] (amarelo)Seu ping não pode passar de %d

Alguem pode ajudar?

Obrigado.

Last edited by YamiKaitou; 12-02-2014 at 16:57.
NovinhoFDR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-01-2014 , 10:22   Re: [AJUDA] Como colcoar cor dentro do plugin .sma?
Reply With Quote #2

In English
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
NovinhoFDR
New Member
Join Date: Dec 2014
Old 12-01-2014 , 11:34   Re: [AJUDA] Como colcoar cor dentro do plugin .sma?
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
[HELP] How to put color into the .sma plugin?

Hello am NovinhoFDR. I'm starting now in Plugins.

Wanted to put color into the .sma plugin.

example:

(green) [MFG] (yellow) Your ping can not exceed% d

Can anyone help?

Thank you.

I used Google Translate. I do not know English = D

Last edited by NovinhoFDR; 12-01-2014 at 15:32. Reason: Putting help in English
NovinhoFDR is offline
Old 12-02-2014, 16:56
NovinhoFDR
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-02-2014 , 18:02   Re: [HELP] How to put color into the .sma plugin?
Reply With Quote #5

Search colorchat and chatcolor. If you are using AMXX 1.8.3 read this.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
popeye10
Senior Member
Join Date: May 2014
Location: Navi Mumbai (India)
Old 12-03-2014 , 00:23   Re: [HELP] How to put color into the .sma plugin?
Reply With Quote #6



PHP Code:
client_print_color(idprint_chat"!g[MFG] !nYour ping can not exceed !t%d"); 
PHP Code:
!green color
!normal color
!team color 
and put this code end of the plugin source code.

PHP Code:
stock client_print_color(idtype, const text[], any:...)
{
 if(
type == print_chat)
 {
  new 
g_iMsgidSayText;
  
g_iMsgidSayText get_user_msgid("SayText");

  new 
szMsg[191], iPlayers[32], iCount 1;
  
vformat(szMsgcharsmax(szMsg), text3);

  
replace_all(szMsgcharsmax(szMsg), "!g","^x04");
  
replace_all(szMsgcharsmax(szMsg), "!n","^x01");
  
replace_all(szMsgcharsmax(szMsg), "!t","^x03");

  if(
id)
   
iPlayers[0] = id;
  else
   
get_players(iPlayersiCount"ch");

  for(new 
iCount i++)
  {
   if(!
is_user_connected(iPlayers[i]))
    continue;
   
   
message_begin(MSG_ONE_UNRELIABLEg_iMsgidSayText_iPlayers[i]);
   
write_byte(iPlayers[i]);
   
write_string(szMsg);
   
message_end();
  }
 }

__________________

Last edited by popeye10; 12-03-2014 at 00:27.
popeye10 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-03-2014 , 01:36   Re: [HELP] How to put color into the .sma plugin?
Reply With Quote #7

Quote:
Originally Posted by popeye10 View Post


PHP Code:
client_print_color(idprint_chat"!g[MFG] !nYour ping can not exceed !t%d"); 
PHP Code:
!green color
!normal color
!team color 
and put this code end of the plugin source code.

PHP Code:
stock client_print_color(idtype, const text[], any:...)
{
 if(
type == print_chat)
 {
  new 
g_iMsgidSayText;
  
g_iMsgidSayText get_user_msgid("SayText");

  new 
szMsg[191], iPlayers[32], iCount 1;
  
vformat(szMsgcharsmax(szMsg), text3);

  
replace_all(szMsgcharsmax(szMsg), "!g","^x04");
  
replace_all(szMsgcharsmax(szMsg), "!n","^x01");
  
replace_all(szMsgcharsmax(szMsg), "!t","^x03");

  if(
id)
   
iPlayers[0] = id;
  else
   
get_players(iPlayersiCount"ch");

  for(new 
iCount i++)
  {
   if(!
is_user_connected(iPlayers[i]))
    continue;
   
   
message_begin(MSG_ONE_UNRELIABLEg_iMsgidSayText_iPlayers[i]);
   
write_byte(iPlayers[i]);
   
write_string(szMsg);
   
message_end();
  }
 }

Or use AMXX 1.8.3
__________________
Kia is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode