GTAONLINE.PL
Użytkownicy
Grupy
FAQ
Regulamin
Piwa
Reklama/Vip
Raporty
Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: mutowanie
1.
Mutowanie gracza
Witam mam problem poniewa? w ponizszym kodzie antyspamer nie mutuje gracza.
Kod:
antiSpam = {}
function antiChatSpam()
if isTimer(antiSpam[source]) then
cancelEvent()
outputChatBox("#ffffff"..getPlayerName(source).." #ff6600Zosta? zmutowany za spam na chacie! ( 60 sekund )", getRootElement(), 255, 255, 0,true)
setPlayerMuted(source, true)
setTimer ( autoUnmute, 30000, 1, source)
else
antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 1000, 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? odmutowany !",getRootElement(), 255, 255, 0,true )
end
end