Ulysses Stuff > Releases for ULX v1.*

Text Floating Plugin

(1/4) > >>

Golden-Death:
Finally the DNS cache cleard, so I present you...

Overhead Text Plugin

This script has two versions, one for people who don't want to touch the script in any form, and one for people who don't want to clog up their ulx_helps with menu cvars.

Version One:

--- Code: ---RED = 255
GREEN = 0
BLUE = 255
ALPHA = 100


--------------------------------------------------------------------
--                      Do Not Edit Below                          ---
--------------------------------------------------------------------




function gd_floattext( userid, args, argv, argc )
local target = getUser( userid, argv[ 1 ] )
if target == nil then
return
end



  _GModText_Start( "Default" );
  _GModText_SetColor( RED,GREEN,BLUE,ALPHA );
  _GModText_SetTime( 999, 0, 0.5 ); --How long it stays, and the fading times
  _GModText_SetEntityOffset( vector3( 0, 0, 40 ) ); --Messages appear 35 Units above Players
  _GModText_SetEntity( target ); --Entity/Player the message will follow
  _GModText_SetText( gd_msg ); --Set the message
  _GModText_Send( 0, 50+userid );



 



end





ULX_CONCOMMAND( "ulx_floatmsg", gd_floattext, ACCESS_CVAR, "Begin float text on user _ Plugin by Golden-Death", 1, "!float" )
ULX_CONVAR( "gd_msg", "This is my floating text!", ACCESS_CVAR, " Message to float" )
--- End code ---

If you choose this script, you may set the RED - GREEN - BLUE - ALPHA to different values, as seen in the script above.

--- Code: ---RED = 255
GREEN = 0
BLUE = 255
ALPHA = 100

--- End code ---
This version has 1 CVAR:
gd_msg -sets the message

Copy the code and put it anywhere in a ULX file is exec'ed.
(Ex: copy and paste to bottom of gmod9/lua/ulx/fun.lua)


Version 2

--- Code: -----------------------------------------------------------------------
--             Do Not Edit Below: Use the cvars to set            --
--------------------------------------------------------------------




function gd_floattext( userid, args, argv, argc )
local target = getUser( userid, argv[ 1 ] )
if target == nil then
return
end



  _GModText_Start( "Default" );
  _GModText_SetColor( gd_red,gd_green,gd_blue,gd_alpha );
  _GModText_SetTime( 999, 0, 0.5 ); --How long it stays, and the fading times
  _GModText_SetEntityOffset( vector3( 0, 0, 40 ) ); --Messages appear 35 Units above Players
  _GModText_SetEntity( target ); --Entity/Player the message will follow
  _GModText_SetText( gd_msg ); --Set the message
  _GModText_Send( 0, 50+userid );



 



end





ULX_CONCOMMAND( "ulx_floatmsg", gd_floattext, ACCESS_CVAR, "Begin float text on user _ Plugin by Golden-Death", 1, "!float" )
ULX_CONVAR( "gd_msg", "This is my floating text!", ACCESS_CVAR, " Message to float" )
ULX_CONVAR( "gd_red", "0", ACCESS_CVAR, " Floating text - Red Value" )
ULX_CONVAR( "gd_green", "0", ACCESS_CVAR, " Floating text - Green Value" )
ULX_CONVAR( "gd_blue", "0", ACCESS_CVAR, " Floating text - Blue Value" )
ULX_CONVAR( "gd_alpha", "255", ACCESS_CVAR, " Floating text - Transparency Value" )

--- End code ---

If you choose this one, you won't have to ever touch the script. Simply install and use CVARs to set the color and alpha
This version has 5 CVARS:
gd_red - sets amount of red
gd_green - sets amount of green
gd_blue - sets amount of blue
gd_alpha - sets amount of transparency
gd_msg - sets the message

Copy the code and put it anywhere in a ULX file is exec'ed.
(Ex: copy and paste to bottom of gmod9/lua/ulx/fun.lua)




Mank:
Nice one, instead of making lots of small scripts how about you make one interesting one like your glow plugin!

Golden-Death:
the problem is finding ideas  ;)

Megiddo:

--- Quote from: Golden-Death on November 29, 2005, 03:46:41 PM ---the problem is finding ideas  ;)

--- End quote ---

Hehe... no kidding. Programmers aren't creative, they just think of ways to implement other's ideas.

Golden-Death:
Im plenty imaginative, id have wonderful ideas if lua could implement flame throwing jetpacks with lasers that sprout flowers out of cs_italy bananas on implode.

Navigation

[0] Message Index

[#] Next page

Go to full version