Forum

> > CS2D > Scripts > Fix This Script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Fix This Script

24 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Fix This Script

Kel9290
User Off Offline

Zitieren
Mehr >

tested for thankless guy
ps, dont add these unuseful array's because they makes this shit hard to reading...
ps2, you have 2 "kill" hooks, so i deleted one and rewrite killstreak system.
ps3, if killstreak is5 it doesn't resets, if you want it then add this string:
1
killstreak[killer] = 0
when player's killstreak is 5

alt Re: Fix This Script

Bobb1118
User Off Offline

Zitieren
well through constant coding for this past week... you can now level up and see what your level is.

sorry for not thanking, thanks to all who helped directly or indirectly. but there are still things to be done

for the level/exp bar, what is a message type that is only sent to the specific player, but doesnt spam the screen?

is there a place where i can see all the cs2d functions available? like "kill", "second" etc

assuming bombplant is a viable function, how could i combine these?

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
40
41
42
43
addhook("kill","kill")
function kill(id)
     -- Add Experience for Kill
     xp[id]=xp[id]+100
     -- Text Callout (+100 xp)
     msg2(id,"Kill +100 exp")
     -- Next Level (every 500 xp)
     if (xp[id]>=500) then
          -- Reset Experience
          xp[id]=0
		  -- Increase Level 
          level[id]=level[id]+1
          -- Text Callout (level+1)
          msg2(id,"Level up! You are now level "..level[id].."")
     end
     -- If this level is higher then 80
     if level[id]>80 then
     -- Then reset the level to 80
        level[id]=80
     end
end

addhook("bombplant","bombplant")
function bombplant (id)
-- Add Experience for Bombplant
     xp[id]=xp[id]+100
     -- Text Callout (+100 xp)
     msg2(id,"Bomb planted +100 exp")
     -- Next Level (every 500 xp)
     if (xp[id]>=500) then
          -- Reset Experience
          xp[id]=0
		  -- Increase Level 
          level[id]=level[id]+1
          -- Text Callout (level+1)
          msg2(id,"Level up! You are now level "..level[id].."")
     end
     -- If this level is higher then 80
     if level[id]>80 then
     -- Then reset the level to 80
        level[id]=80
     end
end
2× editiert, zuletzt 14.10.11 17:33:49

alt Re: Fix This Script

Cure Pikachu
User Off Offline

Zitieren
user Bobb1118 hat geschrieben
for the level/exp bar, what is a message type that is only sent to the specific player, but doesnt spam the screen?

Use cs2d cmd hudtxt2 as a cs2d lua cmd parse .
user Bobb1118 hat geschrieben
is there a place where i can see all the cs2d functions available? like "kill", "second" etc

In the sys\lua directory, there is a file named info.txt. Inside the file contains what you are looking for.

EDIT:
user Bobb1118 hat geschrieben
assuming bombplant is a viable function, how could i combine these?

I'll do a work-around then: Checking experience every 100 milliseconds or so and level up if required. Click More for the script.
Mehr >
2× editiert, zuletzt 14.10.11 19:19:25

alt Re: Fix This Script

Kel9290
User Off Offline

Zitieren
maybe do this? less lag.
Mehr >

usage:
Mehr >
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht