SA-MP Forums Archive
Please help with player chat{Not Fixed Yet Plz Help} - 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: Please help with player chat{Not Fixed Yet Plz Help} (/showthread.php?tid=129139)



Please help with player chat{Not Fixed Yet Plz Help} - Keeboo13 - 21.02.2010

how do i make it so people cant talk to each other if there far away...


Re: PLease help with player chat - [HiC]TheKiller - 21.02.2010

Use a IsPlayerInRangeOfPoint check =].


Re: PLease help with player chat - Keeboo13 - 21.02.2010

okay ill try



Re: PLease help with player chat - Keeboo13 - 21.02.2010

dude how do i supose to do it



Re: Please help with player chat{Not Fixed Yet Plz Help} - Keeboo13 - 21.02.2010

help anyone can help


Re: Please help with player chat{Not Fixed Yet Plz Help} - Born2die - 21.02.2010

Quote:
Originally Posted by Keeboo13
help anyone can help
www.******.com . It's the first result that pops...

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: Please help with player chat{Not Fixed Yet Plz Help} - Keeboo13 - 21.02.2010

onwiki it says this
Код:
if(!strcmp("/stadium",cmdtext))
{
  if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
  {
    SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
  }
  return 1;
}
and this
Код:
Parameters:
(playerid, Float:range, Float:x, Float:y, Float:z)
playerid The ID of the player you want to check the point range of. 

Float:range The furthest distance the player can be to be in range. 

Float:x The X coordinate of the point to check the range to. 

Float:y The Y coordinate of the point to check the range to. 

Float:z The Z coordinate of the point to check the range to. 




Returns 1 if the player is in range of the point, otherwise 0.
i dont understand that



Re: Please help with player chat{Not Fixed Yet Plz Help} - kLx - 21.02.2010

pawn Код:
new textt[ 128 ], name[24];
        GetPlayerName( playerid, name, 24 );
        format( textt, 128, "%s sako: %s", name, text );
        new
          pos[ 2 ];
        GetPlayerPos( playerid, pos[ 0 ], pos[ 1 ], pos[ 2 ] );
        for (new t = 1; t < GetMaxPlayers( ); t++)
        {
          if( IsPlayerInRangeOfPoint( t, 15.0, pos[ 0 ], pos[ 1 ], pos[ 2 ] )
          {
            SendClientMessage( t, 0xB4B5B7FF, textt );
            }
        }
        return 0;
Add this to your
pawn Код:
public OnPlayerText(playerid, text[])
Untested, should work anyway.