Raised This Month: $ Target: $400
 0% 

SayText Color Messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-22-2007 , 02:17   SayText Color Messages
Reply With Quote #1

Hi,

Here a little script which show color messages in the chat (infinite loop) from a file (configs/messages_list.cfg).
You can specify a map to show a message on this map only. Map can also be a map type.
If none is specified, assume we want to show the message everytime.
  • Color Codes:

    $e = Team Color (red/blue/gray)
    $n = normal color (con_color, default: yellowish)
    $g = green
  • Syntax: "message" "map"

    "$eLook! I'm the same color as your team! $nOooh, pretty classic color! $gYay, I'm green!" "de_dust2"
    "$eGaaaawwwr! $gBleeeeeh!" "de_"
    "$gHello world!"
  • Cvars:

    amx_cm_delay "30" // Specify number of seconds between two messages
  • Screenshots:
    Ct


    Terro


    Spect.

It works fine. But maybe there are some optimisations to do or some bugs to find.
Any comments are welcome.


Thanks for your help!
Attached Files
File Type: cfg messages_list.cfg (562 Bytes, 282 views)
File Type: sma Get Plugin or Get Source (saytext_color_msg.sma - 872 views - 6.9 KB)
__________________

Last edited by Arkshine; 01-22-2007 at 14:23. Reason: Added screenshots
Arkshine is offline
osk522
BANNED
Join Date: Dec 2006
Location: Slöinge, Falkenberg, Hal
Old 01-22-2007 , 12:02   Re: SayText Color Messages
Reply With Quote #2

Take a look at the source code:
http://forums.alliedmods.net/showthread.php?p=127273


Code:
i_like_cookies_and_milk("Oskar")
osk522 is offline
Send a message via MSN to osk522
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-22-2007 , 12:14   Re: SayText Color Messages
Reply With Quote #3

Code:
vformat( newMsg, 191, msg, 2 );         replace_all( newMsg, 191, "$e", "^x03");                 replace_all( newMsg, 191, "$g", "^x04");                 replace_all( newMsg, 191, "$n", "^x01");                 formatex( message, 191, "^x01%s", newMsg ); for( i = 0; i < num; i++ ) {                 message_begin( MSG_ONE, g_SayText, {0,0,0}, players[i] );         write_byte( players[i] );         write_string( message );         message_end( ); }
make the format part out of the loop
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-22-2007 , 14:24   Re: SayText Color Messages
Reply With Quote #4

@jim_yang :

Oops. Fixed.

Thanks.
__________________
Arkshine is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-22-2007 , 14:51   Re: SayText Color Messages
Reply With Quote #5

I don't know if you are submitting this later, but doesn't my plugin cover all this fully?

http://forums.alliedmods.net/showthread.php?t=27814
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-22-2007 , 15:21   Re: SayText Color Messages
Reply With Quote #6

No, I have no intention to submit this.

Also your plugin is perfect.

Thanks
__________________

Last edited by Arkshine; 01-22-2007 at 18:39.
Arkshine is offline
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 22:23.


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