Need a /nearplayers command
#3

Quote:
Originally Posted by kLx
pawn Код:
SendClientMessage( playerid, COLOR_GRAD1, "Near players:" );
    new
      Float:ax, Float:ay, Float:az, name[ MAX_PLAYER_NAME ];
    GetPlayerPos( playerid, ax, ay, az );
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      if( IsPlayerInRangeOfPoint( i, 10.0, ax, ay, az ) )
      {
        GetPlayerName( i, name, MAX_PLAYER_NAME );
            SendClientMessage( i, COLOR_GRAD2, name );
        }
    }
untested, should work anyway.
should send it to the player not the one near him

pawn Код:
SendClientMessage( playerid, COLOR_GRAD1, "Near players:" );
    new
      Float:ax, Float:ay, Float:az, name[ MAX_PLAYER_NAME ];
    GetPlayerPos( playerid, ax, ay, az );
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      if( IsPlayerInRangeOfPoint( i, 10.0, ax, ay, az ) )
      {
        GetPlayerName( i, name, MAX_PLAYER_NAME );
            SendClientMessage( playerid, COLOR_GRAD2, name );
        }
    }
Reply


Messages In This Thread
Need a /nearplayers command - by Fay-Tony - 11.05.2010, 14:06
Re: Need a /nearplayers command - by kLx - 11.05.2010, 17:31
Re: Need a /nearplayers command - by Think - 11.05.2010, 17:31
Re: Need a /nearplayers command - by kLx - 11.05.2010, 17:32
Re: Need a /nearplayers command - by Fay-Tony - 12.05.2010, 13:21

Forum Jump:


Users browsing this thread: 1 Guest(s)