Forum

> > CS2D > Scripts > Points system
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Points system

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Points system

J4x
User Off Offline

Zitieren
Hi, i need some help here, i was wondering if someone can help me making a points system. I know i have to use hudtext, but i don't know how to make that the points increase each time you kill a player.

~ FN_Linkin Park

alt Re: Points system

Banaan
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local points = {}

addhook("join", "point_reset")
addhook("kill","point_increase")

function point_reset(id) points[id] = 0 point_update(id) end

function point_increase(id)
	if not points[id] then points[id] = 0 return end
	points[id] = points[id] + 1
	point_update(id)
end

function point_update(id)
	-- update your hudtxt2 here, e.g.
	-- parse("hudtxt2 " .. id .. " 0 \"Points: " .. points[id] or 0 .. "\" 20 20 0")
end
1× editiert, zuletzt 05.03.11 16:39:23
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht