06.02.2012, 19:31
Tinha feito aqui de hб muito tempo, 2 versхes...
Versгo 1:
Versгo 2:
Versгo 1:
pawn Код:
Detector(Float: radi, playerid, string[], color)
{
if(!IsPlayerConnected(playerid))
return false;
static Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
for(new i; i < GetMaxPlayers(); ++i)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, radi, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, color1, string);
continue;
}
if(IsPlayerInRangeOfPoint(i, radi*2, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, color2, string);
continue;
}
if(IsPlayerInRangeOfPoint(i, radi*3, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, color3, string);
}
}
}
return true;
}
pawn Код:
Detector(Float: radi, playerid, string[], color)
{
if(!IsPlayerConnected(playerid))
return false;
static Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
for(new i; i < GetMaxPlayers(); i++)
{
if(!IsPlayerInRangeOfPoint(i, radi, Pos[0], Pos[1], Pos[2])) continue;
SendClientMessage(i, color, string);
}
return true;
}