Forum

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

Englisch need hudtxt

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt need hudtxt

thesk5tera
User Off Offline

Zitieren
please i need help
i need hudtxt

Login as :"here USGN of player"
if not login:" Please check your U.S.G.N. account settings"

please i need help

alt Re: need hudtxt

limonata
User Off Offline

Zitieren
I didnt test it.

1
2
3
4
5
6
7
8
9
10
addhook("join","hud")
function hud(id)
	if player(id,"exists") then
	if player(id,"usgn") ~= nil then
	parse('hudtxt 1 "©255255000Login as: ' .. player(id,"usgn"))
	else
	parse('hudtxt 1 "©255000000Login as: None, Failed to login!')
		end
	end
end
1× editiert, zuletzt 05.06.13 16:58:15

alt Re: need hudtxt

KagamineLen
User Off Offline

Zitieren
user limonata hat geschrieben
I didnt test it.

1
2
3
4
5
6
7
8
9
10
addhook("ms100","hud")
function hud()
	if player(id,"exists") then
	if player(id,"usgn") ~= nil then
	parse('hudtxt 1 "©255255000Login as: ' .. player(id,"usgn"))
	else
	parse('hudtxt 2 "©255000000Login as: None, Failed to login!')
		end
	end
end


then where'd you got "id" variable?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
if pbs==nil then pbs={} end

--// CFG

HUD = {
	["USGN"] = {x = 470, y = 135, a = 0}
}

function hudtxt2(player,id,text,x,y,align)
	parse('hudtxt2 '..player..' '..id..' "'..text..'" '..x..' '..y..' '..align)
end

function CheckUSGNStatus(id)
	local USGN = player(id,"usgn")
	if USGN ~= 0 then
		return USGN, (string.char(169)..'005116250')
	else
		return "Not Logged!", (string.char(169)..'255025000')
	end
end

addhook("second","pbs.second")
function pbs.second()
	local playerlist=player(0,"table")
	for _, id in pairs(playerlist) do
		local STATUS, KULAY = CheckUSGNStatus(id)
		hudtxt2(id, 10, (string.char(169)..(116255005).."Login as: "..KULAY..""..STATUS),HUD["USGN"].x, HUD["USGN"].y, HUD["USGN"].a)
	end
end

i just copied this from my script, too lazy to make another one.

alt Re: need hudtxt

MikuAuahDark
User Off Offline

Zitieren
Updated every seconds
1
2
3
4
5
6
7
8
9
10
addhook("second","AuahDark_sec")
function AuahDark_sec()
	for _, id in next,player(0,"table"),nil do
		if player(id,"usgn")>0 then
			parse("hudtxt2 "..id.." auah \"\169000255000Logged in As "..player(id,"usgn").."\" 0 120")
		else
			parse("hudtxt2 "..id.." auah \"\169255000000Please check your U.S.G.N. account settings\" 0 120")
		end
	end
end

Updated on join only
1
2
3
4
5
6
7
8
addhook("join","OnPlayerConnect")
function OnPlayerConnect(id)
	if player(id,"usgn")>0 then
		parse("hudtxt2 "..id.." auah \"\169000255000Logged in As "..player(id,"usgn").."\" 0 120")
	else
		parse("hudtxt2 "..id.." auah \"\169255000000Please check your U.S.G.N. account settings\" 0 120")
	end
end

untested but should works

alt Re: need hudtxt

MikuAuahDark
User Off Offline

Zitieren
user limonata hat geschrieben
whats mean "auah" and \"\

auah is the ID of the hudtxt
\" is to insert a actual double-quote(a " )
\ and followed by 169 used to put this character: ©
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht