Forum

> > CS2D > Scripts > remove hudtxt
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch remove hudtxt

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt remove hudtxt

JestemKurwom
User Off Offline

Zitieren
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..

alt Re: remove hudtxt

if
User Off Offline

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

alt Re: remove hudtxt

DC
Admin Off Offline

Zitieren
not a space, just a "" (empty string)
" " works to but "" is more efficient and faster
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht