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(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "(Crash) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)", pName, playerid);
case 1: format(string, sizeof(string), "(Leaving) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)", pName, playerid);
case 2: format(string, sizeof(string), "(Kicked/Banned) {FFFFFF}.йца одщшъ {FF0000}%s {FFFFFF}(id: %d)", pName, playerid);
}
scmToAll(red, string);
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(color, message[]);
public scmToAll(color, message[])
{
for(new i; i<= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerConnect[i] == 0 && KSawn[CloseChat] == 0)
{
SendClientMessage(i,color, message);
}
}
}
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?