What Da Bishop was saying is...
Code:
add(sLong,255,sName)
add(sLong,255," ")
add(sLong,255,sSteamID)
add(sLong,255,"^n")
// or
format(sLong,255,"%s %s^n",sName,sTeamID);
Anyway, cs_get_user_team technically returns CS_TEAM_T, CS_TEAM_CT, or CS_TEAM_SPECTATOR, so you have to compare it to that instead of an integer (even though they are in essence integers). This code works:
Code:
public cmd_listids(id,level,cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new sPlayers[32]
new iPlayerCount
new i
new j
new uid
new sLong[256]
new sSteamID[20]
new sName[32]
get_players(sPlayers, iPlayerCount,"e")
for (j=1; j<=3; j++)
{
new CsTeams:team;
switch(j) {
case 1: { team = CS_TEAM_T; }
case 2: { team = CS_TEAM_CT; }
case 3: { team = CS_TEAM_SPECTATOR; }
}
for (i=0; i<iPlayerCount; i++)
{
uid = sPlayers[i]
if (cs_get_user_team(uid) == team)
{
get_user_info(uid,"name",sName,31)
get_user_authid(uid,sSteamID,31)
sLong=""
add(sLong,255,sName)
add(sLong,255," ")
add(sLong,255,sSteamID)
add(sLong,255,"^n")
client_print(id,print_console,sLong)
}
}
}
return PLUGIN_HANDLED
}
__________________