Spam issue
#6

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


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);
        }
    }
}
Reply


Messages In This Thread
Spam issue - by Eugene. - 05.10.2013, 20:46
Re: Spam issue - by IPrototypeI - 05.10.2013, 21:02
Re: Spam issue - by Limex - 05.10.2013, 21:08
Re: Spam issue - by Eugene. - 05.10.2013, 21:28
Re: Spam issue - by IPrototypeI - 05.10.2013, 21:40
Re: Spam issue - by Patrick - 05.10.2013, 22:11
Re: Spam issue - by Jefff - 05.10.2013, 22:57
Re: Spam issue - by Mattakil - 05.10.2013, 23:00
Re: Spam issue - by Eugene. - 06.10.2013, 09:25
Re: Spam issue - by xXShadowXx - 06.10.2013, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)