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

Greentexter


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-25-2012 , 10:28   Re: Greentexter
Reply With Quote #11

Don't even use regex

Code:
if (argString[0] == '>' || (argString[0] == '"' && argString[1] == '>'))
__________________
asherkin is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 06-25-2012 , 10:35   Re: Greentexter
Reply With Quote #12

and TrimString(argString);
Leonardo is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 06-25-2012 , 11:24   Re: Greentexter
Reply With Quote #13

Quote:
Originally Posted by asherkin View Post
Don't even use regex

Code:
if (argString[0] == '>' || (argString[0] == '"' && argString[1] == '>'))
but regex gives the possibility of checking for (\s+)? if someone decides to do so
minimoney1 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 06-25-2012 , 16:11   Re: Greentexter
Reply With Quote #14

Quote:
Originally Posted by minimoney1 View Post
but regex gives the possibility of checking for (\s+)? if someone decides to do so
thats why you should use TrimString() which removes extra spaces
__________________
Leonardo is offline
YoNer
Member
Join Date: Jul 2014
Old 08-08-2016 , 02:13   Re: Greentexter
Reply With Quote #15

I made a mod for this plugin. I removed the need for quotes and the plugin will write in olive by default. I also added the possibility to change color at any part in the text using morecolors color tags.

IE: sm_g This text is {red}red
>This text is red

Two new commands will give you the available color list

sm_gweb will open the color list provided in the morecolors website to the MOTD screen

sm_gcon will dump the color list in console
Attached Files
File Type: sp Get Plugin or Get Source (greentextY.sp - 86 views - 10.6 KB)
File Type: smx greentextY.smx (14.1 KB, 74 views)

Last edited by YoNer; 08-08-2016 at 02:17.
YoNer is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 08-08-2016 , 08:47   Re: Greentexter
Reply With Quote #16

make it detect > character

It's as simple as if (szMsg[0] == '>')

And hey, people beat me to it.
__________________

Last edited by Chdata; 08-08-2016 at 08:48.
Chdata is offline
YoNer
Member
Join Date: Jul 2014
Old 08-13-2016 , 13:49   Re: Greentexter
Reply With Quote #17

An update to my mod. I added the possibility to set a custom default color.

UPDATE : Got the cookies issue solved. Now working as expected!

Commands
sm_g or sm_green

I.E.:sm_g This text is {red}red - >This text is red

Additional commands

sm_gweb - opens the color list provided in the morecolors website to the MOTD screen

sm_gcon - dumps the color list in console

sm_gdefault color - sets an alternative default color (selection is stored in clientprefs)

sm_greset - resets default color to green

sm_l / sm_lenny - same as greentext but adds ( ͡° ͜ʖ ͡°) after the username...because reasons
Attached Files
File Type: sp Get Plugin or Get Source (greentextYCookies.sp - 119 views - 14.5 KB)
File Type: smx greentextYCookies.smx (15.8 KB, 108 views)

Last edited by YoNer; 09-05-2016 at 00:21. Reason: Fixed! Commented some of the code!
YoNer is offline
The Solid lad
Senior Member
Join Date: Oct 2018
Old 01-08-2019 , 16:58   Re: Greentexter
Reply With Quote #18

Quote:
Originally Posted by YoNer View Post
An update to my mod. I added the possibility to set a custom default color.

UPDATE : Got the cookies issue solved. Now working as expected!

Commands
sm_g or sm_green

I.E.:sm_g This text is {red}red - >This text is red

Additional commands

sm_gweb - opens the color list provided in the morecolors website to the MOTD screen

sm_gcon - dumps the color list in console

sm_gdefault color - sets an alternative default color (selection is stored in clientprefs)

sm_greset - resets default color to green

sm_l / sm_lenny - same as greentext but adds ( ͡° ͜ʖ ͡°) after the username...because reasons
Thanks a lot for your efforts.
I'm really a noob in terms of plugins....so could you actually make that simple change to the plugin everyone's been talking about here, which would allow people to simply type > in front of their messages to make them green? Like it actually does on 4chan?
Would be way more intuitive for players.
(Btw, is this even compatible with CS:S? The "olive" color looks like {default} in that mod. lol)
The Solid lad 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 11:05.


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