Raised This Month: $32 Target: $400
 8% 

Greentexter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
rowedahelicon
Senior Member
Join Date: Feb 2011
Location: The Observatory
Plugin ID:
3034
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Gives users the ability to Greentext
    Old 06-20-2012 , 22:00   Greentexter
    Reply With Quote #1

    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
    Attached Thumbnails
    Click image for larger version

Name:	440_screenshots_2012-06-20_00001.jpg
Views:	2317
Size:	89.3 KB
ID:	105335  
    Attached Files
    File Type: smx greentext.smx (5.6 KB, 550 views)
    File Type: sp Get Plugin or Get Source (greentext.sp - 475 views - 1.1 KB)
    __________________
    SCG, A furry community in the stars - https://www.scg.wtf
    rowedahelicon is offline
    Send a message via Skype™ to rowedahelicon
    Warnink
    SourceMod Donor
    Join Date: Aug 2006
    Location: United Kingdom
    Old 06-23-2012 , 08:09   Re: Greentexter
    Reply With Quote #2

    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.
    Attached Thumbnails
    Click image for larger version

Name:	greentext.jpg
Views:	663
Size:	94.2 KB
ID:	105454  

    Last edited by Warnink; 06-23-2012 at 08:16.
    Warnink is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 06-23-2012 , 08:44   Re: Greentexter
    Reply With Quote #3

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (greentext.sp - 345 views - 1.1 KB)
    File Type: smx greentext.smx (5.6 KB, 385 views)
    minimoney1 is offline
    Warnink
    SourceMod Donor
    Join Date: Aug 2006
    Location: United Kingdom
    Old 06-23-2012 , 12:37   Re: Greentexter
    Reply With Quote #4

    Yup that sorted it, thanks for your help.
    Warnink is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 06-23-2012 , 13:05   Re: Greentexter
    Reply With Quote #5

    Quote:
    Originally Posted by rowedahelicon View Post
    HOW USE
    /g "text"
    sm_g "text"
    To clarify, use "quotes"
    Bacardi is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-23-2012 , 13:25   Re: Greentexter
    Reply With Quote #6

    Quote:
    Originally Posted by Bacardi View Post
    To clarify, use "quotes"
    That's lame if you have to use quotes.
    Mitchell is offline
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 06-24-2012 , 00:05   Re: Greentexter
    Reply With Quote #7

    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.
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP is offline
    Helvetica
    Senior Member
    Join Date: Nov 2011
    Location: U.S.
    Old 06-24-2012 , 17:41   Re: Greentexter
    Reply With Quote #8

    This is extremely trivial...but...wouldn't it make more sense to use {olive} rather than {green} ?
    Helvetica is offline
    rowedahelicon
    Senior Member
    Join Date: Feb 2011
    Location: The Observatory
    Old 06-25-2012 , 04:38   Re: Greentexter
    Reply With Quote #9

    Quote:
    Originally Posted by MasterOfTheXP View Post
    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
    __________________
    SCG, A furry community in the stars - https://www.scg.wtf
    rowedahelicon is offline
    Send a message via Skype™ to rowedahelicon
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 06-25-2012 , 09:04   Re: Greentexter
    Reply With Quote #10

    The regex would be something simple, like this:
    Code:
    (\s+)?<.+>
    minimoney1 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 11:01.


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