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
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.
Its really funny setting a player or even an entire team to 'invisable' for a special knife round =P
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.
These are the ConVar's used by this plugin
Just a version stamp for tracking
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>
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>
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)
Apparently according to here
you can do all these cool things with rendering:
RENDERFX_NONE = 0,
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 */
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!
Soucemod version 1858 or newer
- Note here it may not work on previous versions!
Note, if you get this error you need to upgrade
How to Install
[SM] Unable to load plugin "smcolour_new.smx": Native "FindSendPropInfo" was not found.
Pop the compiled .SMX file in your plugins directory
Pop the plugin.smcolour.txt in the translations directory
Change the map!
For his example arrays
for a good chunk of code and a good example of the ProcessTargetString() function =)