Raised This Month: $ Target: $400
 0% 

Colored message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 06-25-2010 , 08:39   Re: Colored message
Reply With Quote #1

Here is a stock:
PHP Code:
// Prints chat in colours
// use !g for green color
// use !t for team color [Team color can be red ,blue or grey, It depends on players team]
// use !y for yellow color
stock client_colored_print(const id, const input[], any:...)
{
 new 
iCount 1iPlayers[32]
 
 static 
szMsg[191]
 
vformat(szMsgcharsmax(szMsg), input3)
 
 
replace_all(szMsg190"!g""^4"// green txt
 
replace_all(szMsg190"!y""^1"// orange txt
 
replace_all(szMsg190"!t""^3"// team txt
 
 
if(idiPlayers[0] = id
 
else get_players(iPlayersiCount"ch")
 
 for (new 
0iCounti++)
 {
  if (
is_user_connected(iPlayers[i]))
  {
   
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_iPlayers[i])
   
write_byte(iPlayers[i])
   
write_string(szMsg)
   
message_end()
  }
 }

Usage:
PHP Code:
client_colored_printid"!gHy  , !t Bye "
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Reply



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 14:46.


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