Raised This Month: $12 Target: $400
 3% 

[Any] "[SM]" Prefix changer! UPDATE: March 22, 2013


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
3015
Plugin Version:
0.32
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    7247 
    Plugin Description:
    Replaces that boring ol' [SM] Chat prefix!
    Old 06-15-2012 , 01:18   [Any] "[SM]" Prefix changer! UPDATE: March 22, 2013
    Reply With Quote #1

    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


    Attached Files
    File Type: cfg sm_textcolors.cfg (158 Bytes, 4418 views)
    File Type: sp Get Plugin or Get Source (sm_defaulttextreplace.sp - 5761 views - 3.8 KB)
    File Type: sp Get Plugin or Get Source (sm_defaulttextreplace_csgo.sp - 1919 views - 4.4 KB)

    Last edited by Mitchell; 09-11-2015 at 16:52.
    Mitchell is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 06-15-2012 , 09:11   Re: [TF2/CSS] "[SM]" Prefix changer!
    Reply With Quote #2

    This code is the same as here by Bacardi https://forums.alliedmods.net/showthread.php?t=187340 then you should mention.


    btw, nice plugin
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.

    Franc1sco is offline
    Send a message via MSN to Franc1sco
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-15-2012 , 14:03   Re: [TF2/CSS] "[SM]" Prefix changer!
    Reply With Quote #3

    Quote:
    Originally Posted by Franc1sco View Post
    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.
    Mitchell is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 06-15-2012 , 14:08   Re: [TF2/CSS] "[SM]" Prefix changer!
    Reply With Quote #4

    Cool
    __________________
    Fearts is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 06-15-2012 , 21:55   Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
    Reply With Quote #5

    Awesome!
    bad thing - console output show the hex .
    __________________
    retired
    shavit is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 06-16-2012 , 10:32   Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
    Reply With Quote #6

    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
    Bacardi is offline
    C0nw0nk
    Senior Member
    Join Date: May 2011
    Location: United Kingdom
    Old 06-16-2012 , 13:22   Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
    Reply With Quote #7

    Very nice glad i was not the only one who would of thought this is a good idea
    C0nw0nk is offline
    Send a message via MSN to C0nw0nk
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-16-2012 , 14:46   Re: [Any] "[SM]" Prefix changer! UPDATE: June 15, 2012
    Reply With Quote #8

    Quote:
    Originally Posted by shavit View Post
    Awesome!
    bad thing - console output show the hex .
    I jsut thought of fixing that lol

    Quote:
    Originally Posted by Bacardi View Post
    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 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-17-2012 , 00:41   Re: [Any] "[SM]" Prefix changer! UPDATE: June 16, 2012
    Reply With Quote #9

    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.
    Mitchell is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 06-23-2012 , 21:42   Re: [Any] "[SM]" Prefix changer! UPDATE: June 16, 2012
    Reply With Quote #10

    How to make it support Translations?
    __________________
    retired
    shavit 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 06:50.


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