04.11.2014, 20:07
you don't want to use "IsPlayerConnected" In Foreach.
try this code:
try this code:
pawn Код:
SendLocalClientMessage(playerid, Float:dist, color, str[])
{
if(IsPlayerConnected(playerid))
{
new Float:ppos[3];
GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
SendClientMessage(playerid, color, str);
foreach(Player, i)
{
if(i != playerid)
{
if(IsPlayerInRangeOfPoint(i, dist, ppos[0], ppos[1], ppos[2]))
{
return SendClientMessage(i, color, str);
}
}
}
}
}