05.02.2011, 11:41
Does someone have an idea how i make a local OOC and a OOC command? Ex. When i type /B [text] other people on some distance can see it, and when i do /O [text] everyone sees it. Thanks
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;
}