04.09.2010, 17:45
Then you would use this stock, like so:
Excuse me if I missed something, it's 3.19 AM here. Yawn.
pawn Code:
stock localMessage(playerid, colour, string[], Float: Distance)
{
new Float:PosFloats[3];
GetPlayerPos(playerid, PosFloats[0], PosFloats[1], PosFloats[2]);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, Distance, PosFloats[0], PosFloats[1], PosFloats[2])
{
SendClientMessage(i, colour, string);
}
}
return 1;
}
pawn Code:
public OnPlayerText(playerid, text[])
{
new
string[128], // 56 cells isn't going to get you very far when the text I/O is 128.
PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s says: %s",PlayerName,text);
localMessage(playerid, 0xFF0000AA, string, 15.0); // Distance you want to send it to
return 1;
}