Forum

> > CS2D > Scripts > remove hudtxt
Forums overviewCS2D overview Scripts overviewLog in to reply

English remove hudtxt

2 replies
To the start Previous 1 Next To the start

old remove hudtxt

JestemKurwom
User Off Offline

Quote
Is there a possibility to remove a hudtxt, and free the internal id if the hudtxt?

I use this function to draw a hudtxt on the screen:
1
2
3
4
5
6
7
visual.txt_iid = {}

function hudtxt2(id,iid,txt,x,y,cs2d_clr,align)
	if not align then align = 0 end
	parse('hudtxt2 '..id..' '..iid..' '..' "'..string.char(169)..cs2d_clr..txt..'" '..x..' '..y..' '..align)
	visual.txt_iid[iid] = true
end

this code to find a free iid slot:
1
2
3
4
5
6
7
8
function get_free_iid_slot()
	for i=1,50 do
		if not visual.txt_iid[i] then
			return i
		end
	end
	return -1
end

How can i remove a hudtxt ?
There is a function to free images ( freeimage) but not something like removehudtxt..

old Re: remove hudtxt

if
User Off Offline

Quote
do another hud text,(id same as first)
the second hud text has text of " " (space)

old Re: remove hudtxt

DC
Admin Off Offline

Quote
not a space, just a "" (empty string)
" " works to but "" is more efficient and faster
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview