18.06.2012, 01:40
You're welcome. The reason that it wasn't working is because you had:
COLOR_PURPLE once.
Where as it was defined to be used in that stock 5 times.
The best way to solve this would be:
Much quicker and easier to use.
COLOR_PURPLE once.
Where as it was defined to be used in that stock 5 times.
The best way to solve this would be:
pawn Код:
forward CloseMessageEx(playerid, color, string[], Float:range);
public CloseMessageEx(playerid, color, string[], Float: range)
{
new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
if(IsPlayerInRangeOfPoint(i, range, PlayerX, PlayerY, PlayerZ))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
SendClientMessage(i, color, string);
}
}
}
}
}

