Forum

> > CS2D > Scripts > Point System - Scott
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Point System - Scott

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Point System - Scott

OutstandingPP
BANNED Off Offline

Zitieren
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 ?
1× editiert, zuletzt 18.01.17 16:59:00

alt Re: Point System - Scott

Bowlinghead
User Off Offline

Zitieren
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

alt Re: Point System - Scott

Rainoth
Moderator Off Offline

Zitieren
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.

alt Here

Scott
BANNED Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht