Tutorialul este simplu, facut pentru incepatori.
Un Fake-Kill arata asa, in server_log:
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Sa incepem

Pasul 1: : Resetarea variabilei jucatorului cand acesta este spawnat
Adaugam SetPVarInt(playerid,"KilledFlood",0); sub callback-ul OnPlayerSpawn:
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Am facut asta deoarece flooderii nu se spawneaza dupa ce sunt omorati. Daca nu facem primul pas, toti jucatorii care omoara de doua ori (nu conteaza cand si cum) vor fi banati.
Poti pune si alta denumire a variabilei, nu esti obligat sa pui cum am pus eu, si anume "Killed Flood".

Pasul 2: Setarea variabilei jucatorului cand acesta este ucis
Adaugam SetPVarInt(playerid,"KilledFlood", GetPVarInt(playerid,"KilledFlood") + 1); sub callback-ul OnPlayerDeath:
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Iar variabila se va reseta cand jucatorul se va spawna. Flooderii nu se spawneaza si vor avea o variabila mai mare. Mai multe vedem la pasul al treilea.

Pasul 3: Banarea jucatorului (flooder), daca acesta are variabila 2 sau mai mare
Adaugam if(GetPVarInt(playerid,"KilledFlood") > 1) return BanEx(playerid, "(Fake Kill Flood)"); sub callback-ul OnPlayerDeath:
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Se poate folosi si functia "Kick", dar flooderii se pot reconecta si e mai bine sa ii banam, ca sa scapam de ei

Pasul 4: Resetarea variabilei jucatorului cand acesta se deconecteaza
Adaugam SetPVarInt(playerid,"KilledFlood",0); sub callback-ul OnPlayerDisconnect:
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
Scriptul intreg
Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!