05.06.2011, 02:29
Quote:
Wait, will this allow me to just do /me and everyone in 10 meters or w/e will hear it? Im confused...
Show me an example of a local connection, where when the player connects, only the few people in 10 meters will see it. |
pawn Код:
COMMAND:w(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, Grey, "Usage: /w [message]");
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
format(String, sizeof(String), "[Whisper] %s: %s.",Name,params);
foreach(Player,i)
{
if(GetDistanceBetweenPlayers(playerid,i) < 5.0)//Only player within 5.0 meters will see it.
SendClientMessage(i,0xE3FFBBFF,String);
}
return 1;
}