Forum

> > CS2D > Scripts > Fix This Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Fix This Script

24 replies
Page
To the start Previous 1 2 Next To the start

old Re: Fix This Script

Kel9290
User Off Offline

Quote
More >

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

old Re: Fix This Script

Bobb1118
User Off Offline

Quote
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
edited 2×, last 14.10.11 05:33:49 pm

old Re: Fix This Script

Cure Pikachu
User Off Offline

Quote
user Bobb1118 has written
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 has written
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 has written
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.
More >
edited 2×, last 14.10.11 07:19:25 pm

old Re: Fix This Script

Kel9290
User Off Offline

Quote
maybe do this? less lag.
More >

usage:
More >
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview