chat in virtual worlds
#5

Quote:
Originally Posted by Rk_
pawn Код:
for(new i =0; i<MAX_PLAYERS; i++)
{
  if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld[playerid])
  {
    SendClientMessage(i,COLOR,text);
  }
}
UNTESTED!
I would do it like this I think:

pawn Код:
public OnPlayerText( playerid, text[] )
{
  new
    i,
    world = GetPlayerVirtualWorld( playerid );

  for ( i = 0; i < MAX_PLAYERS; i ++ )
  {
    if ( i != playerid && GetPlayerVirtualWorld( i ) == world )
    {
      SendPlayerMessageToPlayer( i, playerid, text );
    }
  }
  return false;
}
I've not got Pawno on my system right now to check that SPMTP function but I'm sure it works but isn't documented, the arguments could be the wrong way around also.
Reply


Messages In This Thread
chat in virtual worlds - by Laurentt - 20.04.2009, 18:22
Re: chat in virtual worlds - by Laurentt - 20.04.2009, 19:05
Re: chat in virtual worlds - by Donny_k - 20.04.2009, 19:13
Re: chat in virtual worlds - by Rks25 - 20.04.2009, 19:14
Re: chat in virtual worlds - by Donny_k - 20.04.2009, 19:30
Re: chat in virtual worlds - by Daren_Jacobson - 20.04.2009, 20:01
Re: chat in virtual worlds - by ICECOLDKILLAK8 - 20.04.2009, 20:06
Re: chat in virtual worlds - by Donny_k - 20.04.2009, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)