English need hudtxt

7 replies
Goto Page
To the start Previous 1 Next To the start
05.06.13 04:33:21 pm
Up
thesk5tera
User
Offline Off
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
05.06.13 04:46:17 pm
Up
limonata
User
Offline Off
I didnt test it.

Code:
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
edited 1×, last 05.06.13 04:58:15 pm
05.06.13 04:53:36 pm
Up
KagamineLen
User
Offline Off
user limonata has written:
I didnt test it.

Code:
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?

Code:
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.
05.06.13 05:08:30 pm
Up
MikuAuahDark
User
Offline Off
Updated every seconds
Code:
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
Code:
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
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
05.06.13 05:17:57 pm
Up
limonata
User
Offline Off
whats mean "auah" and \"\
05.06.13 05:22:47 pm
Up
MikuAuahDark
User
Offline Off
user limonata has written:
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: ©
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
05.06.13 05:26:19 pm
Up
limonata
User
Offline Off
Thanks o.o
05.06.13 06:01:05 pm
Up
thesk5tera
User
Offline Off
thx all
To the start Previous 1 Next To the start