SA-MP Forums Archive
[Help] Virtual Worlds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Virtual Worlds (/showthread.php?tid=91079)



[Help] Virtual Worlds - Oi! - 12.08.2009

So I have this dynamic housing system only thing is, is when someone makes a house it sets their VW to something random, so their house and everything works VW's work but when their in the same int as someone else with a different VW, they can still see their text, all their /me's etc etc. Can I make it so that if the player is in a different VW then the other player then they can't see their text?


Re: [Help] Virtual Worlds - WrathOfGenesis - 12.08.2009

pawn Код:
OnPlayerText ( playerid , text [ ] )
{
  new string [ 256 ] , playername [ MAX_PLAYER_NAME ];
  GetPlayerName ( playerid , playername , MAX_PLAYER_NAME );
  format ( string , sizeof ( string ) , "%s: %s" , playername , text );

  for ( new giveplayerid = 0; giveplayerid < MAX_PLAYERS; giveplayerid ++ )
  {
    if ( GetPlayerVirtualWorld ( playerid ) == GetPlayerVirtualWorld ( giveplayerid ) )
    {
      SendClientMessage ( giveplayerid , color , string );
    }
  }
  return 0;
}
Something like that?