PHP Code:
new
tplayers[32],ctplayers[32],tname[32],ctname[32],
tnum,ctnum,tindex,ctindex,i,j;
new tNames[1024],ctNames[1024];
get_players(tplayers,tnum,"he","TERRORIST");
get_players(ctplayers,ctnum,"he","CT");
for(i = 0;i < tnum;i++)
{
tindex = tplayers[i];
if(!is_user_connected(tindex))
continue;
get_user_name(tindex,tname,31);
if(strlen(tNames) > 0)
format(tNames, 1023, "%s,%s", tNames, tname);
else
copy(tNames, 1023, tname);
}
for(j = 0;j < ctnum;j++)
{
ctindex = ctplayers[j];
if(!is_user_connected(tindex))
continue;
get_user_name(ctindex,ctname,31);
if(strlen(ctNames) > 0)
format(ctNames, 1023, "%s,%s", ctNames, ctname);
else
copy(ctNames, 1023, ctname);
}
console_print(id,"%s ; %s",tNames,ctNames);
It shows:
__________________