10.12.2011, 18:51
ok i got a probelm i made the Range "50" so its a local chat but i dont know why the ppl still can talk as example from LV to LS the range didnt changed its no local chat
or did i changed the range in the wronge part?
PHP код:
public Chat_LocalRange(playerid, color, string[])
{
new Float: mPlayerX, Float: mPlayerY, Float: mPlayerZ;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(playerid, mPlayerX, mPlayerY, mPlayerZ);
if(IsPlayerInRangeOfPoint(i, 50, 50, 50, 50))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
{
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}