All help greatly appreciated.
Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Lua Request: After player dies 'x' times...
5 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)
All help greatly appreciated.
1
2
3
2
3
if player(id,"deaths)>=x then -- ur code end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
deathc=0; addhook("die","_die") addhook("startround","resdeath") function _die(id) deathc=deathc+1 	if (deathc == x ) then -- change x to the number 	parse("trigger blahblah") 	end end function resdeath() deathc=0 end
1
2
3
4
5
6
7
2
3
4
5
6
7
limit = 10 addhook("die","_die") function _die(id) 	if player(id,"deaths") == limit then 		parse("trigger nameoftrigger") 	end end
Change 'limit' to how many deaths need to be completed before the trigger works. Mind that this will not reset deaths of a player so the next round when the player dies, he'll have 11 deaths and will no longer trigger. If you want it to work differently, use
1
parse("setdeaths "..id.." 0")
![user](img/i_friend.png)
if player(id,"deaths")%limit==0
EDIT: And thanks for letting me know,
![user](img/i_friend.png)
![user](img/i_friend.png)
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)