Ulysses
Ulysses Stuff => Ulysses Release Archives => Releases => Releases for ULX v1.* => Topic started by: Golden-Death on November 28, 2005, 04:12:26 PM
-
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:
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" )
If you choose this script, you may set the RED - GREEN - BLUE - ALPHA to different values, as seen in the script above.
RED = 255
GREEN = 0
BLUE = 255
ALPHA = 100
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
--------------------------------------------------------------------
-- 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" )
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)
(http://img55.imageshack.us/img55/163/gmconstruct00360hh.th.jpg) (http://img55.imageshack.us/my.php?image=gmconstruct00360hh.jpg)
(http://img340.imageshack.us/img340/2637/gmconstruct00378zs.th.jpg) (http://img340.imageshack.us/my.php?image=gmconstruct00378zs.jpg)
-
Nice one, instead of making lots of small scripts how about you make one interesting one like your glow plugin!
-
the problem is finding ideas ;)
-
the problem is finding ideas ;)
Hehe... no kidding. Programmers aren't creative, they just think of ways to implement other's ideas.
-
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.
-
Sorry to be a but could you maybe zip this up and make it downloadable?
I'm not sure how to lake a .lua file... ;D
-
open notepad
copy the stuff above into it
click save as
browse to gmod9/lua
in the dropdown box, select 'All Files'
Name the file as textfloat.lua
save
-
http://www.upload2.net/download2/Ee7qSX5ANoK3X0r/txt_plug.lua.html
Or use that
-
Now hosted on Blue Fire: http://www.goldendeath.byethost11.com/
-
yo dragon ur post up there about the jetpack.
I see no reason why u couldnt do that in hammer, and some lua, then simply vmfloader it or compile it for gmod+
just use an invisible pod, somtething that looks like a jetpack (vmfloader supports brushes now)
add the right entities, thrusters, logic etc
and i can load it up any time by the click of a button.
As for the bananas you would need to place a banana image in sprites, then use a laser setits width and bingo!
Hope that gets u creating :D
-
ahaha, i would but im too busy atm :(
-
erm. i cant get the floating text to work and am a bit confused about the commands needed to make it work. i have saved the file as textfloatuncvar.lua and added the line _OpenScript( "textfloatuncvar.lua" ) to ulx_init.lua but nothing works... can anyone explain?
-
erm. i cant get the floating text to work and am a bit confused about the commands needed to make it work. i have saved the file as textfloatuncvar.lua and added the line _OpenScript( "textfloatuncvar.lua" ) to ulx_init.lua but nothing works... can anyone explain?
I havnt used it in a while, but if you are using the uncvar version, it should work like this if installed correctly
Ingame in console, type the following:
sv_cheats 1
thirdperson
gd_msg test
ulx_floatmsg "your player name here"
-
ok, ive done all that but when i say ulx_floatmsg "[**RvB**]Griff" it just says it cant find player name. (i copied and pasted it correctly from console) so i know the name is spelt correctly... any ideas?
-
Might be a problem wiht your name, try changing your name to bob and seeing if it works.
-
nope :( sadly it still doesnt work :(:(:(
-
Please update this plugin to use ULX v1.1's new module system