Solved
function onPlayerCommand( pPlayer, szCommand, szText )
{
if ( szCommand == "team1" )
{
Message( "Team 1 Players:" );
local x = 0
while ( x < GetPlayers() )
{
local plr = FindPlayer( x );
if ( plr )
{
if ( plr.Team == 1 )
{
Message( plr.Name );
}
}
x++;
}
}
return 1;
}
function GetPlayer( target )
{
target = target.tostring();
if ( IsNum( target ) )
{
target = target.tointeger();
if ( FindPlayer( target ) ) return FindPlayer( target );
else return null;
}
else if ( FindPlayer( target ) ) return FindPlayer( target );
else return null;
}
Topic Locked