How to create T text only here around u! and....
#1

How to create that when u use T to make text !
Well... AGH... - exeple: U press T and then u make - " bla bla bla " this text here only poople around u! How to create that?

Is it possible to create - When u enter my boat - ID 493 it say - This is - Krisis32 boat! And then u get kicked out of the boat!
Is it possible to create for speciifec cars too? If in server is more than one car whit - exemple id - 579

Reply
#2

Get every players position and see if he is near the player, if not return 0. You can see a example in (no i dont suggest you to use this gamemode) godfather and PlayerToPoint.

Good luck :P
Reply
#3

Didnt get it.....
Reply
#4

Go check GODFATHER, you dont understand any basics of pawn, please search for "godfather" omg.. and than download that script and check for "stock PlayerToPoint" by using ctrl+f. Also as already suggested in your other topic, ****** for pawn-lang.pdf and check it out!
Reply
#5

I did remember it

I did look at my old real life script - Here it is -

LimitGlobalChatRadius(40.0); Onlt T text here around u
ShowPlayerMarkers(0); - if u dont want to see any player on map
Reply
#6

"LimitGlobalChatRadius" affects the whole chat. For example, when you say something, it will only send it to everyone who's within 40m radius of the person who spoke.

If you want to make a local chat, that is sent to players within 40m radius, use this:

// Will send a message to everyone who is within 40m radius of you, when using "-message".

Код:
public OnPlayerText(playerid, text[])
{
  new string[128],
     name[17];

  GetPlayerName(playerid,name,sizeof(name));

  if(text[0] == '-')
  {
    format(string,sizeof(string),"%s: %s",name,text);
    SendProximityMessage(40.0,playerid,string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
    for(new i = 0; i <= MAX_PLAYERS; i++)
      if(GetDistanceBetweenPlayers(i,playerid) > 40 && i != playerid)
        return false;
    SendClientMessage(playerid,COLOR_GREY,"| Nobody was close enough to hear you.");
    return false;
  }
  return 0;
}
Код:
stock SendProximityMessage(Float:radi, playerid, string [], col1, col2, col3, col4, col5)
{
	new Float:posx, Float:posy, Float:posz;
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1 && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
		{

				GetPlayerPos(i, posx, posy, posz);
				tempposx = (oldposx - posx);
				tempposy = (oldposy - posy);
				tempposz = (oldposz - posz);
				if(((tempposx < radi / 16) && (tempposx > -radi / 16)) && ((tempposy < radi / 16) && (tempposy > -radi / 16)) && ((tempposz < radi / 16) && (tempposz > -radi / 16)))
				{
					SendClientMessage(i, col1, string );
				}
				else if (((tempposx < radi / 8) && (tempposx > -radi / 8)) && ((tempposy < radi / 8) && (tempposy > -radi / 8)) && ((tempposz < radi / 8) && (tempposz > -radi / 8)))
				{
					SendClientMessage(i, col2, string );
				}
				else if (((tempposx < radi / 4) && (tempposx > -radi / 4)) && ((tempposy < radi / 4) && (tempposy > -radi / 4)) && ((tempposz < radi / 4) && (tempposz > -radi / 4)))
				{
					SendClientMessage(i, col3, string );
				}
				else if (((tempposx < radi / 2) && (tempposx > -radi / 2)) && ((tempposy < radi / 2) && (tempposy > -radi / 2)) && ((tempposz < radi / 2) && (tempposz > -radi / 2)))
				{
					SendClientMessage(i, col4, string );
				}
				else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
				{
					SendClientMessage(i, col5, string );
				}

		}
	}
	return 1;
}
I'm not sure if it will compile right away, but you get the idea.

Reply
#7

That is exactly the same function i told him to use as the Proximit function is completle the same as PlayerToPoint, only difference is one if(..). The actual point is, that krisis32 does not even know the basics of pawn and it doesnt help him if you do everything for him.


EDIT: SERVER_SLOTS is only defined for you, :P

Krisis if you wana use his idea you have to change SERVER_SLOTS to MAX_PLAYERS or either define SERVER_SLOTS yourself.
Reply
#8

You got a point there, I'm just too helpful sometimes. :P

Edit: Changed the 'SERVER_SLOTS' to 'MAX_PLAYERS'. Thanks for noticing it Extremo.
Reply
#9

Quote:
Originally Posted by Ettans
'SERVER_SLUTS'
lol sluts ^^
Reply
#10

Oops, sorry about that.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)