Ulysses Stuff > Releases for ULX v1.*

aVoN's extra fun commands

<< < (2/3) > >>

Megiddo:
Once again you blame ULX for something that is not it's fault GD....

This is a problem with GMod, since you have to specify the entid for the text. An easy fix would be to listen for a disconnect.

I am in no way saying that this problem exists (might be user error), but if it did, that would be the most likely reason for it being so.

JamminRJ:
I've looked. The script uses userid for sure for its flag portions.
Code to grab userid from name provided...

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

--- End code ---
blah blah code to set colors and alpha blah blah
Code to set text above head...

--- Code: ---        _GModText_Start( texts[textsize] );
_GModText_SetColor( red, green, blue, alpha );
_GModText_SetTime( 9999, 0, 0 );
_GModText_SetEntityOffset( vector3( 0, 0, 60 ) );
_GModText_SetEntity( target );
_GModText_SetText( argv[2] );
_GModText_Send( 0, 2000+target );

--- End code ---
the sentEntity( target ) uses the userid

I like the fact I can flag someone (or minge, which I don't really use cause we are all minges at new things in life) and have them leave, then come back and still get the flag, so adding Playerremove isn't something I'd like.
However, having the steamid tracked for the time (9999, or whatever I set to) instead of userid would
1) Fix the 'different person joins and gets same flag' issue, and
2) Still allow admins to track any flags set on troublemakers, or anyone else, that might leave and come back within that time under a different name or IP.

I figure theres not really an easy (at least for me) way to add the code to track steamids in arrays.
In easy script like english, I figure it would be

--- Code: ---set a time variable ? tracktime = blah
playerflag (get nickname, text)
target = get userid of nickname
track = get steamid of userid, add to array for tracktime
blah blah set color, give userid text for tracktime blah blah
onspawn if steamid isin (look through array of steamids) then add text for tracktime again
else do nothing
(if someone really wanted to get even more complicated, figure out some way to remove time they've already been in array, but, I figure if you're using flag to track troublemakers, they leave, then come back, part of the punishment is getting tracktime reset)

--- End code ---

The ulx_minge does the same (userid)
So, it would do same, as I've noticed on my server userids get recycled quite a bit it seems.

Jewcookie:
This script is pretty cool Avon! Nice work!!   I can't help you guys with the script cause i know about lua. Only the problem with the userid instead of steamid isn't a big deal for me. I rather have it working from the init folder witch it doesn't  ???.
It gives an error at line 67: attempt to call global "ULX_COMMAND" (a nil value). Hope you guys know why it does that.   ;D

JamminR:
Jewcookie,
 1) You _have_ to have ULX for this to work. Commands in it rely on ULX.
 2) If you have ULX, make sure its the latest version, and place Avons script in your lua/ulx/modules folder.
 Anything there gets executed after ULX gets executed. Kind of like in the original lua/init folder, but afterwards so scripts that rely on ULX commands have them in 'memory' already (so to speak).
ulx_init.lua has to be in the lua/init folder to tell the ULX code that set commands to run first.
 Hope that helps.

Jewcookie:
JamminR, thnx alot! That worked. I had alot of troubles with different scripts cause i always put them in the init folder and had to load the script with the lua_openscript command. Very anoying. But problem solved!  ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version