11.12.2010, 22:02
How would I be able to make it that only people next to you could see what you've said. Like in a RP server how it's not broad casted to the whole server. Would I basically have to just use SendClientMessage instead?
forward NearByMessage(playerid, color, string[]);
public NearByMessage(playerid, color, string[])
{
new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
foreach(Player, i)
{
GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
if(IsPlayerInRangeOfPoint(i, 12, PlayerX, PlayerY, PlayerZ))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}