and I would be happy if the save system.
Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
I need bot level system
7 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
and I would be happy if the save system.
Admin/mod comment
![Rules](img/v_illegal.png)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
exp = {} addhook("kill","_k") function _k(k,v) 	if player(k,"bot") then 		exp[k] = exp[k] + 1 		parse("setmaxhealth "..k.." "..player(k,"maxhealth)+math.floor(exp[k]/10)) 	end end addhook("spawn","_s") function _s(id) 	if player(id,"bot") then 		parse("sethealth "..id.." "..player(id,"maxhealth") 	end end
Every 10 kills the bot will gain max health.
You can make other things. Just check
if exp[id] >= 50 then
or any other number. That way you can make explicit stats. For example "if bot has more than 50 kills then set his armor to 150" or anything else you want.
Note that this is a pseudo code and not an actual Lua code. I only gave you a little and basic representation of how a save/load system for bots works. For this case, our main hooks are
![cs2d lua hook](img/i_codehelp.png)
![cs2d lua hook](img/i_codehelp.png)
I would also recommend the
![cs2d lua hook](img/i_codehelp.png)
![user](img/i_friend.png)
![user](img/i_friend.png)
This of course it doesn't apply to every user demanding for a Lua code but it's also not pleasant to see people asking every time for scripts without even understanding the basics.
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)