Raised This Month: $7 Target: $400
 1% 

Set a players Color/Colour & Rendering [Fun]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Plugin ID:
262
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    25 
    Plugin Description:
    Change a players colour and rendering
    Old 01-22-2008 , 11:16   Set a players Color/Colour & Rendering [Fun]
    Reply With Quote #1

    sm_colour & sm_render by Team MX | MoggieX
    Yes even the most 'illiterate' n00b can write a sourcemod plugin!

    Current Version & Changelog
    23 Jan 08 - V 1.3 - Completed phrases file and confirmation colour and render messaging
    22 Jan 08 - V 1.2 - Added sm_color for people who spell colour wrong
    22 Jan 08 - V 1.1 - Opps its now looking at the right phrases file :-)
    22 Jan 08 - V 1.0 - First public release

    History
    With mani admin plugin we were able to set players colours and rendering, this was missing from SM, so made this plugin so that we can use it.

    PS. Its really funny setting a player or even an entire team to 'invisable' for a special knife round =P

    Target Audience
    If you are a n00b, you NEED this

    What does it do?
    With sm_colour you can change a players colour and the opacity of that players colour so that they appear, green, red, blue, pink and so on.

    Then with sm_render it alters the players rendering, with some amusing results, there are 26 levels to play with, I'll let you find the funny ones.

    Some Screenies:





    ConVar's
    These are the ConVar's used by this plugin

    sm_colour_version

    Just a version stamp for tracking

    Commands
    These commands can be used via the clients console while in game:

    sm_colour <#userid|name|team|all> <RED 0-255> <GREEN 0-255> <BLUE 0-255> <OPACITY 0-255>

    sm_color <#userid|name|team|all> <RED 0-255> <GREEN 0-255> <BLUE 0-255> <OPACITY 0-255>
    Examples:
    sm_colour moggiex 0 255 0 150 - This would make me green
    sm_colour moggiex 0 0 0 0 - This would make me black
    sm_colour @all 0 0 0 0 - This would make everyone black (funny as u like for dark maps)
    sm_colour @all 255 255 255 0 - would set the colours back to normal

    sm_render <#userid|name|team|all> <RENDER 0-26>
    Examples:
    sm_render moggiex 5 - This makes me 'pulse'
    sm_render moggiex 7 - This makes me dissapear!
    sm_render @all 7 - This makes everyone dissapear! (use this for the ultimate MAYHEM!)
    sm_render moggiex 0 - This makes me re-appear (back to normal)

    Render options:
    Apparently according to here you can do all these cool things with rendering:
    PHP Code:
    RENDERFX_NONE 0
        
    RENDERFX_PULSE_SLOW
        
    RENDERFX_PULSE_FAST
        
    RENDERFX_PULSE_SLOW_WIDE
        
    RENDERFX_PULSE_FAST_WIDE
        
    RENDERFX_FADE_SLOW
        
    RENDERFX_FADE_FAST
        
    RENDERFX_SOLID_SLOW
        
    RENDERFX_SOLID_FAST,        
        
    RENDERFX_STROBE_SLOW
        
    RENDERFX_STROBE_FAST
        
    RENDERFX_STROBE_FASTER
        
    RENDERFX_FLICKER_SLOW
        
    RENDERFX_FLICKER_FAST,
        
    RENDERFX_NO_DISSIPATION,
        
    RENDERFX_DISTORT,            /**< Distort/scale/translate flicker */
        
    RENDERFX_HOLOGRAM,            /**< kRenderFxDistort + distance fade */
        
    RENDERFX_EXPLODE,            /**< Scale up really big! */
        
    RENDERFX_GLOWSHELL,            /**< Glowing Shell */
        
    RENDERFX_CLAMP_MIN_SCALE,    /**< Keep this sprite from getting very small (SPRITES only!) */
        
    RENDERFX_ENV_RAIN,            /**< for environmental rendermode, make rain */
        
    RENDERFX_ENV_SNOW,            /**<  "        "            "    , make snow */
        
    RENDERFX_SPOTLIGHT,            /**< TEST CODE for experimental spotlight */
        
    RENDERFX_RAGDOLL,            /**< HACKHACK: TEST CODE for signalling death of a ragdoll character */
        
    RENDERFX_PULSE_FAST_WIDER,
        
    RENDERFX_MAX 


    Things to do

    - Errr no idea, I even added error trapping around the 0-255 and render 0-26 values :-) and even learnt how to make a transaltion file, with multiple formats and even alter the colouring of the messaging back!

    Requirements
    Soucemod version 1858 or newer - Note here it may not work on previous versions!

    Note, if you get this error you need to upgrade SM!
    PHP Code:
    [SMUnable to load plugin "smcolour_new.smx"Native "FindSendPropInfo" was not found
    How to Install
    1. Pop the compiled .SMX file in your plugins directory
    2.
    Pop the plugin.smcolour.txt in the translations directory
    3. Change the map!

    Thanks to:
    Nican For his example arrays
    [SM] slap.sp for a good chunk of code and a good example of the ProcessTargetString() function =)
    Attached Files
    File Type: sp Get Plugin or Get Source (smcolour_new.sp - 5725 views - 5.3 KB)
    File Type: smx smcolour_new.smx (4.2 KB, 2026 views)
    File Type: txt smcolour.phrases.txt (847 Bytes, 2786 views)
    __________________

    Last edited by MoggieX; 01-23-2008 at 13:05.
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 01-22-2008 , 12:12   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #2

    How about a command to reset all color/rendering changes on a player? I see you can do 0 for rendering, but there isn't one for color.
    bl4nk is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 01-22-2008 , 12:25   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #3

    Quote:
    Originally Posted by bl4nk View Post
    How about a command to reset all color/rendering changes on a player? I see you can do 0 for rendering, but there isn't one for color.
    That woudl be sm_colour @all 255 255 255 0 or sm_colour @all 255 255 255 255 and thats a good point so I added it to the examples and updated with the correct phrases file to boot!

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 01-22-2008 , 12:31   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #4

    Ah, ok. I wasn't sure if that was going to make white or not. Looks like a good plugin, but did you test it on TF2?
    bl4nk is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 01-22-2008 , 12:37   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #5

    Yea thats what I thought when I first tried MAP's version, but no it makes them look normal again.

    Added some screenies as well, as it always helps to see what the outcome is before ya download a plugin

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 01-22-2008 , 12:42   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #6

    Quote:
    Originally Posted by MoggieX View Post


    lool Noob Saibot with a gun.
    __________________
    Extreme_One is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 01-22-2008 , 12:44   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #7

    Quote:
    Originally Posted by Extreme_One View Post
    lool Noob Saibot with a gun.
    Imagine that on a poorly lit map, even worse than being invisable :-)

    The poor n00bs on our main server aren't going to know what hit em when I unlease it on them all tonight

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    LocutusH
    Senior Member
    Join Date: Dec 2007
    Location: Hungary
    Old 01-22-2008 , 16:22   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #8

    Quote:
    Originally Posted by MoggieX View Post
    Imagine that on a poorly lit map, even worse than being invisable :-)

    The poor n00bs on our main server aren't going to know what hit em when I unlease it on them all tonight

    Matt

    A quick guide how to get our pub servers empty
    __________________
    LocutusH is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 01-22-2008 , 19:16   Re: Set a players Color & Rendering [Fun]
    Reply With Quote #9

    Quote:
    Originally Posted by LocutusH View Post
    A quick guide how to get our pub servers empty
    looool ours were full @ 63 players for 2/3 hrs tonight

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 01-23-2008 , 10:55   Re: Set a players Color/Colour & Rendering [Fun]
    Reply With Quote #10

    OK, just a quick update for version 1.3, I have now finished the translation file and the messaging around the commands (that was quite easy, yay!) and made them show pretty colours too.

    I'm happy to report, this was tested last night on our main server with 64 n00bs on with no issues or lag even with the target of @all for both colouring and rendering.

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    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 07:45.


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