Jump to content

[AYUDA] Freeze Chat / Desactivar Chat


lLinux

Recommended Posts

Posted

Hola a todos, bueno esta publicacion es para preguntar como puedo hacer un freeze chat, o algo para detener el chat, que no puedan chatear, se que tengo que usar el evento onPlayerChat me podrian ayudar o dar un ejemplo, gracias por su atencion.

Skype: HackerlLinux

¿Quieres aprender scripting para MTA? - http://www.scriptingmtasa.wordpress.com

"La disciplina es la clave del exito"

  • MTA Team
Posted

Ejemplo de la wiki:

-- define another handler function that cancels the event so that the message won't be delivered through the  
function blockChatMessage() 
    cancelEvent() 
end 
-- attach it as a handler to onPlayerChat 
addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) 

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted
Ejemplo de la wiki:
-- define another handler function that cancels the event so that the message won't be delivered through the  
function blockChatMessage() 
    cancelEvent() 
end 
-- attach it as a handler to onPlayerChat 
addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) 

Lo siento eso no funciona. ya he intentado pero aparece el mensaje de todas maneras

Skype: HackerlLinux

¿Quieres aprender scripting para MTA? - http://www.scriptingmtasa.wordpress.com

"La disciplina es la clave del exito"

Posted

Estas usando freeroam?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Estas usando freeroam?

Ya logre solucionarlo mira

function chatfreze (message, messageType) 
 if (messageType == 0) then 
 cancelEvent() 
 outputChatBox("#00B3C7ExtremeBattle >#ffffff El chat esta bloqueado ", source, 255, 255, 255, true) 
end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatfreze) 

Skype: HackerlLinux

¿Quieres aprender scripting para MTA? - http://www.scriptingmtasa.wordpress.com

"La disciplina es la clave del exito"

  • MTA Team
Posted

Mi script tambien funciona, solo que en el tuyo solo decides cancelar el evento de el Say, y no de todos los demas..Lo mas probable tenias activado el freeroam :) Salu2

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...