Posts: 294
Threads: 80
Joined: Oct 2013
Reputation:
0
I just wanted to say, that I would like to disable the regular chat, and to exchange it with RolePlay chat, as you played already in RP server, you saw that it goes trought ' CLOSER CHAT ' only people that 10m or so can hear you.
If someone will make me the command I'll +REP.
Posts: 175
Threads: 16
Joined: Sep 2013
Reputation:
0
Its not a command.. Check below OnPlayerText in your gm..
Posts: 141
Threads: 14
Joined: Feb 2013
pawn Код:
stock CloseMessage(playerid, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(i, 10.0, x, y, z))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
if(GetPlayerInterior(playerid) == GetPlayerInterior(i))
{
SendClientMessage(i, color, string);
}
}
}
}
}
Add this under OnPlayerText: CloseMessage(playerid, WHITE, text);
Posts: 22
Threads: 5
Joined: Nov 2013
Quote:
Originally Posted by iFiras
Use GetDistanceBetweenPlayers
It's easy, try this command for example
pawn Код:
CMD:w(playerid,params[]) { new string[128]; if(!strlen(params)) { SendClientMessage(playerid,-1,"[USAGE] {FFFFFF}/w [MESSAGE]"); return 1; } format(string, sizeof(string), "<Whisper>: %s(%d): %s",PlayerName(playerid),playerid,params); printf("%s", string); IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string); for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10) { format(string, sizeof(string), "<Whisper> %s(%d): {FFFFFF}%s",PlayerName(playerid),playerid,params); SendClientMessage(i,-1,string); } } return 1; }
|
Use what he say ^