ok i reworked on the code abit and really wanted all 3 teams to be processed upon. I tried using the command cs_user_get_team command, but im still not having much look. i get argument type mismatch in the compiler but its only a warning. tried to run it on the server and its not printing anything. heres the code
Code:
/* Lists players names and steamids in console, one team at a time */
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]
for (j=1; j<=3; j++)
{
get_players(sPlayers, iPlayerCount,"e")
for (i=0; i<iPlayerCount; i++)
{
uid = sPlayers[i]
if (cs_get_user_team(uid) == j)
{
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
}