Jump to content
  • 0

Anti Spam



6 answers to this question

Recommended Posts

=-" post="43021" timestamp="1286801059"]

Adica sa o foloseasca doar adminii de level mai mare.

Cred ca ce vrea el e sa nu mai paote fa foloseasca comanda BAN repetat.

Ca de ex dupa 1 ban sa stea 10 secunde de exemplu si dupaia sa poata sa o re foloseasca.

Link to comment
Share on other sites

Sus de tot (global) scrii new TimpBan[MAX_PLAYERS]; (o variabila globala).

In comanda de ban scrii urm. :

//comanda ce ai tu p aici

//totul e in regula
if( TimpBan[playerid] == 1 ) return SendClientMessage(playerid, COLOR_RED, "Spam BAN");// (aici scrii ce vrei tu)

TimpBan[playerid] = 1;
SetTimerEx("BanTimp", 10000, 0, "i", playerid);//nume timer, milisecunde, nu se repeta, "i" (denota INTEGER, adica un numar), ce numar -> playerid
//iar dupa verificarea asta Banul in sine.

//aici restul de comanda.
iar apoi, tot pe sus scrii:
forward BanTimp(id);
public BanTimp(id)
    BanTimp[id] = 0;
    return 1;

Timerul care reseteaza variabila dupa 10 secunde.

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.