Forum

> > CS2D > Scripts > See USGN List.
Forums overviewCS2D overview Scripts overviewLog in to reply

English See USGN List.

9 replies
To the start Previous 1 Next To the start

old See USGN List.

Blacko
User Off Offline

Quote
Hello !

∗I search a Script who made this :
>When a player say "!usgn ID" (Replace ID by the number in Server) a message apear for this player and say "*Name of player* is login in *USGN*"
I don't know if it's possible.

Thanks you so much.

iDios

old Re: See USGN List.

Dovahkin
User Off Offline

Quote
Ummmm.... Idios are you meaning when you say usgn id it says there?

ok here try this?

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
30
31
32
33
34
35
36
37
38
counter={}

function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
counter=initArray(32)

counter={}

function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
counter=initArray(32)

addhook("team","hhspawn")
function hhspawn(id)
if player(id,"team")==2 then
if player(id,'usgn') == usgn then
end
end
end

addhook("say","hhsecond")
function hhsecond(id,txt)
	if(txt=="!usgnid") then
	parse('hudtxt2 '..id..' 1 "©000255000Your Usgn Id is : 

'..player(id,"usgn")..' " 5 280')
	end
end

Spoiler >

old Re: See USGN List.

DC
Admin Off Offline

Quote
Five: this script doesn't make much sense and over 75% of it are not required.

the part
1
2
3
4
5
6
7
8
9
10
counter={}

function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
counter=initArray(32)
is in there TWICE. this doesn't make any sense. absolutely not requried.

moreover neither "counter" nor "initArray" are used later. so the whole counter and initArray part can be removed! it's completely pointless in this script!

the next pointless thing is a hook which simply does nothing:
1
2
3
4
5
6
7
addhook("team","hhspawn")
function hhspawn(id)
if player(id,"team")==2 then
if player(id,'usgn') == usgn then
end
end
end
this piece of script does only one thing: slowing down CS2D for no reason. it adds a hook which checks some conditions but which does nothing else. it doesn't change anything. you can remove this part of the script as well.

so the only thing left is:
1
2
3
4
5
6
addhook("say","hhsecond")
function hhsecond(id,txt)
     if(txt=="!usgnid") then
     parse('hudtxt2 '..id..' 1 "©000255000Your Usgn Id is: '..player(id,"usgn")..' " 5 280')
     end
end
which looks like it could work. but the rest of this script is simply pointless and not required... you only need those 6 lines!

old Re: See USGN List.

Blacko
User Off Offline

Quote
Thanks that's work!
But, I don't want exactly that, I want per example if a player say "!usgn 2" the player show the USGN of the player who have the ID 2 in Server.
I tried to made it, but don't work :S :
1
2
3
4
5
6
7
8
9
10
11
addhook("say","showusgn")

function showusgn(id, txt)
     if txt:lower():sub(1, 5) == "!usgn" then
          local PlayerUSGN = tonumber(txt:sub(6))
          if player(PlayerUSGN, "exists") then
               parse('sv_msg2 '..id..' "©000255000'..player(id,"name")..' USGN : '..player(id,"usgn")..' " 5 280')
		  else parse('sv_msg2 '..id..' "©255000000Player dont exist ! " 5 280')
          end
     end
end
I can see only my USGN.. Not other USGN
Please help.

Thanks you

iDios

old Re: See USGN List.

CmDark
User Off Offline

Quote
@iDios, notice you put in parse- player(id,"usgn") and not player(PlayerUSGN,"usgn").
Problem Solved.

Wait do I mean both?
I have no idea what he wants.

eh just change both player(id,"name") and player(id,"usgn") to player(PlayerUSGN,"name") and player(PlayeruSGN,"usgn")
edited 2×, last 03.05.11 06:38:03 am

old Re: See USGN List.

CmDark
User Off Offline

Quote
@Five I clearly meant usgn and name o-o -edits post-

further note, Five you clearly did not read the code thoroughly enough.
edited 1×, last 03.05.11 07:07:57 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview