Forum

> > CS2D > Mods > set maxhealth if teamid==1...
Forums overviewCS2D overview Mods overviewLog in to reply

English set maxhealth if teamid==1...

2 replies
To the start Previous 1 Next To the start

old set maxhealth if teamid==1...

4Vendetta
User Off Offline

Quote
Hi, someone can make one code for me like this..
1
2
3
if team=1 setmaxhealt 150
if team=2 setmaxhealt 30
if player [team 2] health<10 player join team 1...

old Re: set maxhealth if teamid==1...

Apache uwu
User Off Offline

Quote
Nice pseudocode you got there.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
addhook("spawn","_spawn")
addhook("hit","_hit")

function _spawn(id)
	local team=player(id,"team")
	if team==1 then
		parse("setmaxhealth "..id.." 150")
	elseif team==2 then
		parse("sexmaxhealth "..id.." 30")
	end
end

function _hit(id,source,weapon,hpdmg)
	if player(id,"health")-hpdmg<10 then
		parse("maket "..id)
		return 1
	end
end

old Re: set maxhealth if teamid==1...

4Vendetta
User Off Offline

Quote
user Apache uwu has written
Spoiler >

Thanks!!1
To the start Previous 1 Next To the start
Log in to reply Mods overviewCS2D overviewForums overview