30.08.2010, 20:50
Fiz agora pra o Sr.
Quanto ao loop altere a seu gosto. (foreach, getmaxplayer, etc)
pawn Код:
#define COORDS_SF -1249.533,-2989.536,1471.412,-642.2831
#define COORDS_LS 2954.502,116.7788,-887.5186,-2709.267
#define COORDS_LV 2954.502,817.4513,2989.536,572.2159
pawn Код:
stock SendClientMessageToSF(const msg[])
{
fow(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInArea(playerid,COORDS_SF))
{
SendClientMessage(playerid,COR,msg);
}
}
return false;
}
pawn Код:
stock SendClientMessageToLS(const msg[])
{
fow(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInArea(playerid,COORDS_LS))
{
SendClientMessage(playerid,COR,msg);
}
}
return false;
}
pawn Код:
stock SendClientMessageToLV(const msg[])
{
fow(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInArea(playerid,COORDS_LV))
{
SendClientMessage(playerid,COR,msg);
}
}
return false;
}
pawn Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
new Float:XX, Float:YY, Float:ZZ;
GetPlayerPos(playerid, XX, YY, ZZ);
if(XX <= max_x && XX >= min_x && YY <= max_y && YY >= min_y) return 1;
return 0;
}