Forum

> > CS2D > Scripts > Points system
Forums overviewCS2D overview Scripts overviewLog in to reply

English Points system

2 replies
To the start Previous 1 Next To the start

old Points system

J4x
User Off Offline

Quote
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

old Re: Points system

Banaan
User Off Offline

Quote
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
edited 1×, last 05.03.11 04:39:23 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview