But you must strore players ID somewhere,somehow.
You can loop through players and do some checks
PHP Code:
for(new i=1; i<=32; i++)
{
if(is_user_alive(i))
{
}
}
Maybe you need somthing like this? How you know if player is Captain?
PHP Code:
new CT_captain_found, T_captain_found;
for(new i=1; i<=32; i++)
{
if(is_user_alive(i))
{
if(CT_captain_found == 0 && cs_get_user_team(i) == CS_TEAM_CT && is captain)
{
//somethings goes here
CT_captain_found = 1;
}
if(T_captain_found == 0 && cs_get_user_team(i) == CS_TEAM_T && is captain)
{
//somethings goes here
T_captain_found = 1;
}
}
}