loop all online names
#4

pawn Код:
COMMAND:iplist( playerid, params[ ] )
{
    if ( Spieler[ playerid ][ AdminLevel ] > 0 )
    {
        new
            string[ MAX_PLAYER_NAME + 10 ],
            name[ MAX_PLAYER_NAME ]
        ;

        SendClientMessage( playerid, 0xFFFFFFAA, "List of players :" );
        foreach(Player,i)
        {
            GetPlayerName( i, name, sizeof( name ) );
            format( string, sizeof( string ), "Player %s", name );
            SendClientMessage( playerid, 0xFFFFFFAA, string );
        }
    }
    else
        SendClientMessage( playerid, 0xFFFFFFAA, "You are not an administrator !" );
    return 1;
}

To recommend ( new ) scripters to use zcmd/ycmd + foreach. I provided the code for you. I doubt that you will use it as you're using a gf edit ( afaik ) and you won't want to convert all the commands.
Reply


Messages In This Thread
loop all online names - by BlackWolf120 - 27.02.2011, 01:23
Re: loop all online names - by admantis - 27.02.2011, 01:25
AW: loop all online names - by BlackWolf120 - 27.02.2011, 01:28
Re: loop all online names - by Retardedwolf - 27.02.2011, 01:38
AW: loop all online names - by BlackWolf120 - 27.02.2011, 01:42
Re: loop all online names - by (SF)Noobanatior - 27.02.2011, 04:13

Forum Jump:


Users browsing this thread: 2 Guest(s)