AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013 (https://forums.alliedmods.net/showthread.php?t=187570)

Mitchell 06-15-2012 01:18

[Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
 
3 Attachment(s)
Description:
Changes the default "[SM]" prefix, with random colors, or a defined color.

Credits:
Base code made by: Bacardi

TODO:

Nothing?

Install:
• Throw the .SMX in the plugins folder.
• Read below!

CONFIG:
•Edit sm_textcolors.cfg to your liking, there is already an example of what it should look like in the file.
(Make sure it has the & and the * tags.)
& is a shortcut to \x07
* is a shortcut to \x08

All codes must be in hex.
•place sm_textcolors.cfg into your config folder.
should look like:
Code:

*AAAAAAAA[*FFFFFFAASM*AAAAAAAA]&FFFFFF
*AAAAAAAA[*FFFFFFAASM*AAAAAAAA]&FF0000
*AAAAAAAA[*FFFFFFAASM*AAAAAAAA]&00FF00
*AAAAAAAA[*FFFFFFAASM*AAAAAAAA]&0000FF

By default if only one color is in the text it wont choose a random color, duh.
But i added a cvar just cause.


CVARS:
Code:

// Uses random colors that you defined. 1- random 0-Default
// -
// Default: "1"
sm_textcol_random "1"

READ BEFORE POSTING:
I currently am aware that this is a bad way to replace text in sourcemod, but i think it might come in handy if a server owner wants some more color in his server.

Change Log:
Spoiler
Spoiler



Franc1sco 06-15-2012 09:11

Re: [TF2/CSS] "[SM]" Prefix changer!
 
This code is the same as here by Bacardi https://forums.alliedmods.net/showthread.php?t=187340 then you should mention.


btw, nice plugin

Mitchell 06-15-2012 14:03

Re: [TF2/CSS] "[SM]" Prefix changer!
 
Quote:

Originally Posted by Franc1sco (Post 1729199)
This code is the same as here by Bacardi https://forums.alliedmods.net/showthread.php?t=187340 then you should mention.


btw, nice plugin

thats what i forgot, damn, i got to the end and thought, what else do i need...? i thought of credits, but then forgot when i pushed sumbit. thanks for the notice.

Fearts 06-15-2012 14:08

Re: [TF2/CSS] "[SM]" Prefix changer!
 
Cool

shavit 06-15-2012 21:55

Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
 
Awesome!
bad thing - console output show the hex :(.

Bacardi 06-16-2012 10:32

Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
 
When you update next time your plugin, change also that buffer size to 255.
Or otherwise will bring these errors when message hit maximum.
Code:

DLL_MessageEnd:  Refusing to send user message TextMsg of 256 bytes to client, user message size limit is 255 bytes

C0nw0nk 06-16-2012 13:22

Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
 
Very nice :) glad i was not the only one who would of thought this is a good idea :D

Mitchell 06-16-2012 14:46

Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
 
Quote:

Originally Posted by shavit (Post 1729567)
Awesome!
bad thing - console output show the hex :(.

I jsut thought of fixing that lol

Quote:

Originally Posted by Bacardi (Post 1729829)
When you update next time your plugin, change also that buffer size to 255.
Or otherwise will bring these errors when message hit maximum.
Code:

DLL_MessageEnd:  Refusing to send user message TextMsg of 256 bytes to client, user message size limit is 255 bytes

will do!

Mitchell 06-17-2012 00:41

Re: [Any] "[SM]" Prefix changer! UPDATE: June 16, 2012
 
Update! June 16, 2012
Fixed the Buffer size, now 255.
Change TextMsg to SayText2 to defeat the evil console print message.
I will change this back to TextMsg when VALVe fixes this, maybe.

shavit 06-23-2012 21:42

Re: [Any] "[SM]" Prefix changer! UPDATE: June 16, 2012
 
How to make it support Translations?


All times are GMT -4. The time now is 18:04.

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