witam chc? zrobi? system anty spam lecz nie chc? ?e po 1 napisaniu w??cza si? anty spam tylko po wys?aniu 10 wiadomo?ci na okres 30 s kod [lua]
--[[
Resource: OURGame
Developers: Split <[email protected]>
Copyright <[email protected]> 2015-2016
You have no right to use this code without my permission.
]]
wiadomosci= {}
words = {"22003",":220","78.157","23.235","22015","22010","22020","22017","mtasa://"}
local czas = 1*60*1000 --1 minuta
local getplayernamex = getPlayerName
local function getPlayerName(plr)
if not plr then return end
if isElement(plr) then
return getplayernamex(plr):gsub("#%x%x%x%x%x%x","")
end
end
function getPlayerName2(plr)
if not plr then return end
if isElement(plr) then
return getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
end
end
local function wtf(player)
if not player then return end
if isElement ( player ) then
if not wiadomosci[player] then return end
wiadomosci[player].text = nil;
wiadomosci[player].warnings = 0
end
end
function sprawdzmute(plr,msg)
if not wiadomosci[plr] then
wiadomosci[plr] = {
lastmessage = { },
text = { },
toggle = false,
unmute = { },
warnings = 0,
}
end
if wiadomosci[plr].warnings >= 6 then
kickPlayer(plr,"SPAM")
tr...
Witam ot?? prosi?bym o skrypt ANTY-SPAM CMD, chodzi mi g??wnie o to je?eli kto? komu? spamowa? by na /pm to ?eby go kickowa?o, bardzo prosz?. Za dobry skrypt stawiam zimne piwko !
Witam posiadam skrypt na anty spam, dzia?a tylko tak ?e jak kto? zaspami na czacie to dostaje mute, ale jak zrobi? go tak aby te? dodawa?o mute jak zaspami na pm? Tak jakby anty reklama
Kod:
antiSpam = {} function antiChatSpam()
if isTimer(antiSpam[source]) then
cancelEvent() outputChatBox("#ffffff"..getPlayerName(source).." #ff6600Zosta?e? wyciszony za spam na chacie! ( 30 sekund )", source, 255, 255, 0,true) setPlayerMuted(source, true) setTimer ( autoUnmute, 15000, 1, source)
else antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 1500, 1, source) end
end
addEventHandler("onPlayerChat", root, antiChatSpam)
function autoUnmute ( player )
if ( isElement ( player ) and isPlayerMuted ( player ) ) then
setPlayerMuted ( player, false ) outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #ff6600Zosta?e? odciszony !",player, 255, 255, 0,true ) end
end
Witam na serwerze jest cz?sto atak w postaci spamu reklam?
I teraz pytanie jak zrobic Anty spam?
Chodzi mi ze jak ktos napisze Bardzo szybko z 20 razy /global albo /pm To dostanie bana za Reklame
Witam, mam tutaj sw?j skrawek kodu kt?ry mi nie dzia?a, wpisuj? go na razie w freeroama i nic, gdy bindami spami? nic si? nie blokuje, prosi?bym o poprawk? kodu lub o jaki? lepszy kod.
addEventHandler("onPlayerChat",root,function ()
if getElementData(source,"blockspam") then
local sekundy = getElementData(source,"blockspam") cancelEvent() outputChatBox("Odczekaj "..sekundy.." zanim co? napiszesz.",source,255,255,255,true)
else local player = source
setElementData(source,"blockspam",5) setTimer(function () setElementData(player,"blockspam",4) end,1000,1) setTimer(function () setElementData(player,"blockspam",3) end,2000,1) setTimer(function () setElementData(player,"blockspam",2) end,3000,1) setTimer(function () setElementData(player,"blockspam",1) end,4000,1) setTimer(function () setElementData(player,"blockspam",nil) end,5000,1) end
end)
Siema, pobra?em taki skrypt ale niestety nie dzia?a. wszystkie przekle?stwa s? w pliku w scriptfiles. Ale da si? skomplikowa? i wrzuci? na serwer, ale nie dzia?a.
Je?li kto? wie jak prosz? aby jeszcze by?o co? takiego, ?e jak kto? przeklnie to si? napisze: " Kocham Head Admina steo " <<< tak ?eby mu przypa? zrobi? troch? ;]
public OnFilterScriptInit()
{
print(" *** Anti spam by Combat Loaded ***");
print(" *** Anti Swear by Combat Loaded ***");
print(" *** Anti flood by Combat Loaded ***");
print(" *** Anti ad by Combat Loaded ***");
print(" *** Anti bot by Combat Loaded ***");
new string[128], File:file;
if((file = fopen("swear.ini",io_read)))
{
while(fread(file,string))
{
for(new i = 0, j = strlen(string); i < j; i++) i...
Witam od pewnego czasu na moim serwerze kto? wbija z botami.Zauwa?y?am ?e na innych serwerach r?wnie?. Nie chc? przenosi? PGS na 0.3e poniewa? na 0.3d mam sporo graczy i przez ca?y dzie? serwer by? prawie pe?en do pewnego dnia...
Problem dotyczy spamu botami na czacie oraz wyj?cia /wejscia tak jak tutaj: http://tinypic.com/r/2q1h43m/6 . Prosz? o pomoc w zabezpieczeniu Gamemoda.