I'm using it for Zombie Plague. I've seen many threads but most of them is not working or totally incorrect. This is my current 1.
PHP Code:
new iPlayers[32], iNum
if(g_isBotAllowed)
get_players(iPlayers, iNum, "ah")
else
get_players(iPlayers, iNum, "ach")
if(!iNum)
return -1
iRandomPlayer = random(iNum)
g_bBodyGuard[iPlayers[iRandomPlayer]] = true
iRandomPlayer is the index/id.
g_isBotAllowed is a PCVar.
Does this works?