AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Greentexter (https://forums.alliedmods.net/showthread.php?t=188003)

rowedahelicon 06-20-2012 22:00

Greentexter
 
3 Attachment(s)
First and probably only plugin, just something stupid one of my users requested so I figured I'd try and make it, so here ya go, the ability to Greentext.

http://www.quora.com/What-is-greentexting

HOW USE
/g "text"
sm_g "text"

Compiles with http://forums.alliedmods.net/showthread.php?t=96831 Colors

Warnink 06-23-2012 08:09

Re: Greentexter
 
1 Attachment(s)
Fun little idea, however when I tried this out on servers for a couple of mods I host it doesn't seem to print any text after the first space (see attached image).

I haven't changed anything with the code, I did compile it myself though using sourcemod 1.4.3 (not sure this matters).

Both mods are source 2007 based.

EDIT: Just tried with the smx you posted and still get the same result.

minimoney1 06-23-2012 08:44

Re: Greentexter
 
2 Attachment(s)
It's because he is using
Code:
GetCmdArg(1, CleanText,sizeof(CleanText));
you can fix it by just changing it to
Code:
GetCmdArgString(CleanText, sizeof(CleanText));
or by using the attached file.
Use QuickDiff to see the differences.

Warnink 06-23-2012 12:37

Re: Greentexter
 
Yup that sorted it, thanks for your help.

Bacardi 06-23-2012 13:05

Re: Greentexter
 
Quote:

Originally Posted by rowedahelicon (Post 1732937)
HOW USE
/g "text"
sm_g "text"

To clarify, use "quotes"

Mitchell 06-23-2012 13:25

Re: Greentexter
 
Quote:

Originally Posted by Bacardi (Post 1734541)
To clarify, use "quotes"

That's lame if you have to use quotes.

MasterOfTheXP 06-24-2012 00:05

Re: Greentexter
 
Why not check if their message starts with ">"? That's what I do for mine.

...And it looks like I need to start releasing more plugins, as other people keep releasing stuff that I've already done for myself.

Helvetica 06-24-2012 17:41

Re: Greentexter
 
This is extremely trivial...but...wouldn't it make more sense to use {olive} rather than {green} ?

rowedahelicon 06-25-2012 04:38

Re: Greentexter
 
Quote:

Originally Posted by MasterOfTheXP (Post 1734889)
Why not check if their message starts with ">"? That's what I do for mine.

...And it looks like I need to start releasing more plugins, as other people keep releasing stuff that I've already done for myself.

That's what I've been trying to do, I'm REALLY new at this so I've been trying to read through the Regex stuff on my spare time but my test one didn't work well :c

minimoney1 06-25-2012 09:04

Re: Greentexter
 
The regex would be something simple, like this:
Code:

(\s+)?<.+>


All times are GMT -4. The time now is 12:41.

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