Hi.
I've always been strugling with this particular problem: getting the count of players
I need to get number of counter terrorists in ham_killed function, and if there is only one of him, the code will continue, but getting number of counter terrorists seems to be an issue for me, I've been trying to solve this problem 2 hours I think and I just can't get over it, so I finally came here for help, and this is what my final "art" looks like:
PHP Code:
if(team(victim) == 2)
{
for(new i = 0; i < get_maxplayers(); i++)
{
new ct = 0
if(team(i) == 2)
{
ct += 1
return HAM_IGNORED
}
if(ct == 1)
{
if(team(i) == 2)
{
set_user_health(i, 1000)
}
}
ct = 0
}
}
Thank you in advance for help. -Fixsek Kot.