
Forum




Health Script Smart Peoples Needed :D
3 replies




1
2
3
4
5
2
3
4
5
for id=1,32 do 	if player(id,"exists") 		parse("sethealth "..id.." "..(player(id,"health")+1)) 	end end
If I may, this has a delay timer to make it even more realistic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook("ms100","_ms100") addhook("hit","_hit") v_delay=20 --20 = 2 seconds t_wait={} function _hit(id) 	t_wait[id]=0 end function _ms100() 	if #t_wait~=0 then 		for key,value in pairs(t_wait) do 			t_wait[key]=t_wait[key]+1 				if t_wait[key]>=v_delay then 					parse("sethealth "..key.." "..player(key,"health")+1) 				end 			end 		end 	end end
So if a player is not hit for 2 seconds he will quickly regenerate.



