Liberty Unleashed
Scripting => Script Help => Topic started by: Ahmed Abouelnas on July 28, 2013, 09:31:57 pm
-
how to get the players names which in team 1
function onPlayerCommand( pPlayer, szCommand, szText )
{
if ( szCommand == "team1" )
{
Message( "The team no. 1 has - " + Team=1 );
}
return 1;
}
-
how to get the players names which in team 1
function onPlayerCommand( pPlayer, szCommand, szText )
{
if ( szCommand == "team1" )
{
Message( "The team no. 1 has - " + Team=1 );
}
return 1;
}
I Can't Understand You But Try This >>
function onPlayerCommand( pPlayer, szCommand, szText )
{
if ( szCommand == "team1" )
{
if ( pPlayer.Team == 1 )
{
Message( ""+pPlayer.Name+" In The ( 1 ) Team. );
}
}
return 1;
}
-
what i mean when i command team1 message appear to me with all players in team 1
and when i command team2 message appear to me with all players in team 2
that's all
-
what i mean when i command team1 message appear to me with all players in team 1
and when i command team2 message appear to me with all players in team 2
that's all
Bos Ana Mesh Fahem Awy Fahmny Bl 3raby 3lshan Afham Akter
-
what i mean when i command team1 message appear to me with all players in team 1
and when i command team2 message appear to me with all players in team 2
that's all
Bos Ana Mesh Fahem Awy Fahmny Bl 3raby 3lshan Afham Akter
bos lma aktob /te1 by5leeny fe team 1
ana 3ayz lma aktob /team1 yktbly message feha meen ely mawgood fe team 1
-
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