05.10.2013, 22:11
Even though someone already posted some, I don't really recommend placing a function like,[pawn]SendClientMessage or print("Message");[/b] inside a loop
inside a MAX_PLAYERS variable = 500, if you put a SendClientMessage function inside the loop it will send the message 500 message, i'd rather use this, if i were you
inside a MAX_PLAYERS variable = 500, if you put a SendClientMessage function inside the loop it will send the message 500 message, i'd rather use this, if i were you
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -111.3551,1566.8140,17.5715))
{
if(IsGov(i) && duty[i]})
{
SendGovMessage(i,COLOR_FACTION,"[Ground Detector] We have detected a vehicle heading towards Area 51! Intercept it!");
}
}
return 1;
}
SendGovMessage(color, string[]);
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnectedEx(i))
{
SendClientMessageA(i, color, string);
}
}
}