SA-MP Forums Archive
How can I block flood ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I block flood ? (/showthread.php?tid=320393)



How can I block flood ? - tal_peretz - 22.02.2012

When player get banned he can flood the server like this -



How can I block it ?


Thank you alot !


Re: How can I block flood ? - BrandyPenguin - 22.02.2012

Without banning code we can't help you.


Re: How can I block flood ? - tal_peretz - 22.02.2012

it's the code when player exit from the server not the banning code ..

PHP код:
new pName[MAX_PLAYER_NAME];
new 
string[128];
GetPlayerName(playeridpNamesizeof(pName));
    switch(
reason)
    {
        case 
0format(stringsizeof(string), "(Crash) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)"pNameplayerid);
        case 
1format(stringsizeof(string), "(Leaving) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)"pNameplayerid);
        case 
2format(stringsizeof(string), "(Kicked/Banned) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)"pNameplayerid);
    }
    
scmToAll(redstring); 



Re: How can I block flood ? - [ABK]Antonio - 22.02.2012

Can you show us your scmToAll?


Re: How can I block flood ? - BrandyPenguin - 22.02.2012

can you show what do scmToAll() ? This is not part of SA-MP include.
// [ABK]Antonio was faster..


Re: How can I block flood ? - tal_peretz - 22.02.2012

PHP код:
forward scmToAll(colormessage[]);
public 
scmToAll(colormessage[])
{
  for(new 
ii<= MAX_PLAYERSi++)
  {
    if(
IsPlayerConnected(i))
     {
    if(
PlayerConnect[i] == && KSawn[CloseChat] == 0)
        {
            
SendClientMessage(i,colormessage);
        }
    }
  }
 return 
1;




Re: How can I block flood ? - IceCube! - 22.02.2012

pawn Код:
stock SCMToAll(colour, string[])
{
         SendClientMessageToAll(colour, string);
         Return 1;
}
^^ Untested


Re: How can I block flood ? - tal_peretz - 22.02.2012

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
pawn Код:
stock SCMToAll(colour, string[])
{
         SendClientMessageToAll(colour, string);
         Return 1;
}
^^ Untested
what? O.O man the code is wrong and how does it help me? :X


Re: How can I block flood ? - tal_peretz - 22.02.2012

jump


Re: How can I block flood ? - BrandyPenguin - 22.02.2012

Is this only place where it get multilines?