Forum

> > CS2D > Scripts > Score, deaths
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Score, deaths

13 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Score, deaths

HedShot
User Off Offline

Zitieren
Hi all!

I need a script that will list the top left corner of your score and death. Please write codes!

Thanks for all! (sorry for my english)

alt Re: Score, deaths

Dynamite07
User Off Offline

Zitieren
1
2
3
4
5
6
7
addhook("always","a1")
function a1()
for a = 1,32 do
parse('hudtxt2 '..a..' 0 "©000255000Kills:'..player(a,"score")..'" 10 20')
parse('hudtxt2 '..a..' 1 "©000255000Deaths:'..player(a,"deaths")..'" 10 40')
end
end

alt Re: Score, deaths

Yates
Reviewer Off Offline

Zitieren
That's the worst code ever.

@user Dynamite07: Use kill and death hook. Using always hook is like the most stupid thing you can do.

alt Re: Score, deaths

Dynamite07
User Off Offline

Zitieren
I thought the same,
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("kill","a1")
function a1()
for a = 1,32 do
parse('hudtxt2 '..a..' 0 "©000255000Kills:'..player(a,"score")..'" 10 20')
end
end

addhook("die","a1")
function a1()
for a = 1,32 do
parse('hudtxt2 '..a..' 0 parse('hudtxt2 '..a..' 1 "©000255000Deaths:'..player(a,"deaths")..'" 10 40')
end
end

user HedShot hat geschrieben
Sorry I'm new to lua.
its me.

alt Re: Score, deaths

Yates
Reviewer Off Offline

Zitieren
What are you doing!?

Both the kill and die hook have the id parameter, why are you using for?

alt Re: Score, deaths

sheeL
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
addhook("second","OnSecond")
function OnSecond()
for _,id in pairs(player(0,"table")) do
	GetFrag(id)
	end
end

function GetFrag(id)
parse('hudtxt2 '..id..' 0 "©000255000Kills:'..player(id,"score")..'" 10 20')
parse('hudtxt2 '..id..' 1 "©000255000Deaths:'..player(id,"deaths")..'" 10 40')
end

or

1
2
3
4
5
6
7
8
9
10
addhook("kill","OnStats")
addhook("die","OnStats")
function OnStats(id)
	GetFrag(id)
end

function GetFrag(id)
parse('hudtxt2 '..id..' 0 "©000255000Kills:'..player(id,"score")..'" 10 20')
parse('hudtxt2 '..id..' 1 "©000255000Deaths:'..player(id,"deaths")..'" 10 40')
end
1× editiert, zuletzt 15.03.13 17:18:55

alt Re: Score, deaths

Dousea
User Off Offline

Zitieren
Didn't tested yet, maybe works.
1
2
3
4
5
6
7
addhook("ms100","player_hud")
function player_hud()
	for _, id in pairs(player(0,"table")) do
		parse('hudtxt '..id..' 0 "'..string.char(169)..'255255255Score: '..player(id,"score")..'" 12 116')
		parse('hudtxt '..id..' 1 "'..string.char(169)..'255255255Deaths: '..player(id,"deaths")..'" 12 130')
	end
end

alt Re: Score, deaths

Yates
Reviewer Off Offline

Zitieren
Guys. STAHP!

1
2
3
4
5
addhook("kill","_kill")
function _kill(killer,victim)
	parse('hudtxt2 '..killer..' 0 "©255255255Score: '..player(killer,"score")..'" 12 115')
	parse('hudtxt2 '..victim..' 1 "©255255255Deaths: '..player(victim,"deaths")..'" 12 130')
end

That's all it is, stop using ms100, always, second it's fucking useless and crap.

And SheeL, jeez man your code does not even have ENDS!

Stop posting crap fixes if you cannot into Lua, learn instead of wasting your time.
1× editiert, zuletzt 15.03.13 17:27:23

alt Re: Score, deaths

Alistaire
User Off Offline

Zitieren
Yates going full retard, using hudtxt for a personal kpd counter and shizz

----

1
2
3
4
5
6
7
8
9
10
addhook('kill', 'killHook')

function killhud(id)
	parse('hudtxt2 '..id..' 49 "©220050050K '..player(id, 'score')..' : D '..player(id, 'deaths')..'" 12 116')
end

function killHook(id, victim)
	killhud(id)
	killhud(victim)
end

alt Re: Score, deaths

Yates
Reviewer Off Offline

Zitieren
user Alistaire hat geschrieben
Yates going full retard

Yates copy/pasting hudtxt code and did not see it was global instead of personal.

Also Yates talking in 3rd person.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht