28.02.2018, 15:53
Spuneti-mi si mie un anti-flood bun ca astia dau /report cu %s
Use English cuz this is the English section, if you're looking for an anti command spam check this out :
https://sampforum.blast.hk/showthread.php?tid=649080 i provided a good way to prevent spamming any callback at the end. |
if( strfind( Reason, "%", true ) != - 1 )
{
SendClientMessage( playerid, 0xFF0000FF, "ERROR: {FFFFFF}The Reason must not contain invalid characters." );
return 1;
}
ENG:
Nah, he said that he needs a Anti-Flood because someone is crashing his server when it uses "/report" command and "report text" = with "%s" or "%d" or another parameter. So i don't really think he needs a Anti-Flood for this, just an exception in the "/report" command using "strfind" function. Ex: PHP код:
Board Romвnă/Romanian: http://forum.sa-mp.com/forumdisplay.php?f=40 Invata sa postezi in sectiunea potrivita. Aici nu e o sectiune destinata vorbirii in limba romana, in principal e destinata tuturor oamenilor, dar se vorbeste engleza sau discuti in engleza daca ai vreo problema, exista o sectiune doar pentru romania, daca ai fi cautat-o ai fi gasit-o cu siguranta, acolo ti se poate raspunde in romana, de catre romani, daca nu sti engleza in limitele normale ca sa porti o discutie aici. Tot ce trebuie sa faci legat de problema ta este sa folosesti functia "strfind" si totul se va rezolva, daca tu gasesti alta solutie ma bucur, eu asta ti-as spune sa faci, ti-am dat un exemplu mai sus, sper sa pricepi si sa iti fie de folos. |