05.02.2011, 11:48
Yeah. For /b text you should use NearByMessage function
And for /o simply use SendClientMessageToAll()
pawn Код:
public NearByMessage( playerid, colour, string[])
{
new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx( i ) && IsPlayerSpawned( playerid ) )
{
GetPlayerPos( playerid, PlayerX, PlayerY, PlayerZ);
if(IsPlayerInRangeOfPoint(i, 12, PlayerX, PlayerY, PlayerZ) )
{
if(GetPlayerVirtualWorld( playerid ) == GetPlayerVirtualWorld( i ) && GetPlayerInterior( playerid ) == GetPlayerInterior( i ) )
{
SendClientMessage(i, colour, string);
}
}
}
}
return true;
}
And for /o simply use SendClientMessageToAll()