Author Topic: !player  (Read 2053 times)

0 Members and 1 Guest are viewing this topic.

Offline locday123

  • Street Thug
  • *
  • Posts: 25
    • View Profile
!player
« on: August 17, 2011, 09:20:14 am »
someone could write me a command !player GUPS 1.16a to see the total players in the game
« Last Edit: August 17, 2011, 04:52:27 pm by locday123 »

yazeen

  • Guest
Re: !player
« Reply #1 on: September 06, 2011, 07:41:17 am »
Edited from /c admins in Gups
Warning: Not tested


[pawn]      else if ( strcmp( cmd, "players", true ) == 0 )
   {
      new a, b[ 128 ], m = GetMaxPlayers() + 1;
      for ( a = 0; a < m; a++ )
      {
         if ( IsPlayerConnected( a ))
         {
             if ( strlen( b ) ) format( b, 128, "Total: [%d]: %s, %s",GetMaxPlayers(), b, gPlayers[ a ] );
            else format( b, 128, "%s", gPlayers[ a ] );
         }
      }
      if ( strlen( b ) )
      {
         format( szMsg, 128, "Players: %s, Total: [%d]", b, GetMaxPlayers() );
         SendClientMessageToAll( COLOR_YELLOW, szMsg );
      }
   }[/pawn]

Just add this on [pawn]onplayercommandtext[/pawn]