Chaky Posted August 29, 2014 Posted August 29, 2014 Bueno tengo un script que lo que hace es que cuando el usuario diga lo mismo 2 veces seguidas automáticamente se le mutea para ello antes aparece un anuncio ante todo el server por medio del chat el cual dice que el servidor muteo al usuario el anuncio aparece y el script aparenta andar bien pero el problema es que no se mutea el user el usuario puede seguir usando el chat de forma normal aca les dejo el script antiSpam = {} function antiChatSpam(play) if isTimer(antiSpam[source]) then cancelEvent() outputDebugString ("Servidor GPX Muteo Al Usuario"..getPlayerName(source).." 5 Min Por PENDEJO") outputChatBox("Servidor GPX Muteo Al Usuario "..getPlayerName(source).." 5 Min Por PENDEJO", getRootElement(), 255, 0, 0,true) setPlayerMuted(source, true) setTimer ( autoUnmute, 60000, 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 (""..getPlayerName ( player ).." Fue Desmuteado (Fin del Mute)",getRootElement(), 0, 255, 9,true ) end end
Chaky Posted August 29, 2014 Author Posted August 29, 2014 le has dado permisos de Admin a tu script ?Si ya añadi la linea al Grupo admin en el ACL
Bc# Posted September 2, 2014 Posted September 2, 2014 intenta usando isPlayerMuted, te quedaría mas simple.
Tomas Posted September 2, 2014 Posted September 2, 2014 intenta usando isPlayerMuted, te quedaría mas simple. ... function autoUnmute ( player ) if ( isElement ( player ) and isPlayerMuted ( player ) ) then setPlayerMuted ( player, false ) outputChatBox (""..getPlayerName ( player ).." Fue Desmuteado (Fin del Mute)",getRootElement(), 0, 255, 9,true ) end end
Recommended Posts