[Help] Only people who are near me can see what i write
#1

Hello there,
I've started making my own server, and i have a problem, i can't seem to make this shit of only people who are near me can hear what i am saying in the general chat, I mean when i type something, i want only the people who are around me can see it, not the whole server can see it, so please help me, is it a problem in GameTextPlayer or what? Can someone asnwer me?

Exemple how is has to be:





Exemple how it is now:

Reply
#2

https://sampwiki.blast.hk/wiki/LimitGlobalChatRadius
Reply
#3

yes you can use limitglobalchatradius...but dont forget to let the player knows that when he logs in and spawns that you have to be nearby some1 to just talk in chat.
Reply
#4

Quote:
Originally Posted by boelie
yes you can use limitglobalchatradius...but dont forget to let the player knows that when he logs in and spawns that you have to be nearby some1 to just talk in chat.
Quote:
Originally Posted by dice7
You guys didn't get me. Look, for exemple on GF, when you speak IC, i mean just /say, only the closest guys can see it, but on my server, which i made from scratch, everyone can see it, that's what i'm talking about, so how to fix this lol?
Reply
#5

Open up the search function and type in GetClosestPlayer
Reply
#6

Quote:
Originally Posted by dice7
Open up the search function and type in GetClosestPlayer
Код:
forward GetClosestPlayer(p1);
Код:
public GetClosestPlayer(p1)
{
	new x,Float:dis,Float:dis2,player;
	player = -1;
	dis = 99999.99;
	for (x=0;x<MAX_PLAYERS;x++)
	{
		if(IsPlayerConnected(x))
		{
			if(x != p1)
			{
				dis2 = GetDistanceBetweenPlayers(x,p1);
				if(dis2 < dis && dis2 != -1.00)
				{
					dis = dis2;
					player = x;
				}
			}
		}
	}
	return player;
}
Is this what you are talking about? Answer me please
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)