Forum

> > CS2D > Scripts > Point System - Scott
Forums overviewCS2D overview Scripts overviewLog in to reply

English Point System - Scott

6 replies
To the start Previous 1 Next To the start

old Point System - Scott

OutstandingPP
BANNED Off Offline

Quote
This point system was given to me by scott

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
----------------------
-- Initial Setup    --
----------------------
function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
ms.money=initArray(32)
function ms.moneyshow(id)
     parse('hudtxt2 '..id..' 1 "©255255000# Points: ©255255255'..ms.money[id]..' " 7 140')
end

addhook("spawn","ms.spawn")
function ms.spawn(id)
     ms.moneyshow(id)
end

addhook("kill","ms.kill")
function ms.kill(id)
     ms.money[id]=ms.money[id]+1
     ms.moneyshow(id)
end

addhook("die","ms.die")
function ms.die(id)
     ms.money[id]=ms.money[id]-0
     ms.moneyshow(id)
end

I want some thing from scott

how to restart our points and make it 0 like !resetpoints and then our points restart and be 0 again... anyone can answer me ?
edited 1×, last 18.01.17 04:59:00 pm

old Re: Point System - Scott

Bowlinghead
User Off Offline

Quote
1
2
3
4
5
6
7
addhook("say","ms.say")
function ms.say(id,txt)
	if (txt == "!resetpoints") then
		ms.money[id] = 0
		ms.showmoney(id)
	end
end

old Re: Point System - Scott

Rainoth
Moderator Off Offline

Quote
because you can't figure out that ms.showmoney and ms.moneyshow are two different names.
This just goes on to show that you don't check the code at all.

old Here

Scott
BANNED Off Offline

Quote
Here you have
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
39
----------------------
-- Initial Setup    --
----------------------
function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
ms.money=initArray(32)
function ms.moneyshow(id)
     parse('hudtxt2 '..id..' 1 "©255255000# Points: ©255255255'..ms.money[id]..' " 7 140')
end

addhook("spawn","ms.spawn")
function ms.spawn(id)
     ms.moneyshow(id)
end

addhook("kill","ms.kill")
function ms.kill(id)
     ms.money[id]=ms.money[id]+1
     ms.moneyshow(id)
end

addhook("die","ms.die")
function ms.die(id)
     ms.money[id]=ms.money[id]-0
     ms.moneyshow(id)
end

addhook("say","ms.say")
function ms.say(id,txt)
     if (txt == "!resetpoints") then
     ms.money[id]= 0
     ms.moneyshow(id)
     end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview