I've looked. The script uses userid for sure for its flag portions.
Code to grab userid from name provided...
function cc_playerflag( userid, args, argv, argc )
local target = getUser( userid, argv[ 1 ] )
if target == nil then
return
end
blah blah code to set colors and alpha blah blah
Code to set text above head...
_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 );
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
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)
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.