mottzi
06-27-2010, 06:39
Good afternoon AM!
Can you tell me how to get the ID of a random alive Terrorist?
Thanks :wink:
I tried it myself but that cant work:
new random1
new players[32], pnum, tempid;
new max1 = 0
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i]
vip[tempid] = 0
if(cs_get_user_team(tempid) == CS_TEAM_T)
{
max1++
}
}
random1 = random_num(1, max1)
Mottzi
Can you tell me how to get the ID of a random alive Terrorist?
Thanks :wink:
I tried it myself but that cant work:
new random1
new players[32], pnum, tempid;
new max1 = 0
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i]
vip[tempid] = 0
if(cs_get_user_team(tempid) == CS_TEAM_T)
{
max1++
}
}
random1 = random_num(1, max1)
Mottzi