gustavorn Posted June 22, 2013 Posted June 22, 2013 Hello, Well I want this command by typing / chat, it blocks the chat for users, but it does not. Could someone help me? I know I do not have many bugs may be something small, more like I always say. I can not keep looking because I have no time to even write the topic takes a lot more help, someone? function bbc(source) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then if blockc == true then outputChatBox("#FFFF00* GM "..getPlayerName(source).."#00FF00 normalizou o chat para demais usuários.", getRootElement(), 255, 255, 255, true) blockc = false else outputChatBox("#FFFF00* GM "..getPlayerName(source).."#00FF00 trancou o chat para demais usuários.", getRootElement(), 255, 255, 255, true) blockc = true end else return outputChatBox("#ffff00Access denied.", source, 255, 255, 255, true) end return 0 end addCommandHandler("chat", bbc) Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Castillo Posted June 22, 2013 Posted June 22, 2013 You must cancel the 'onPlayerChat' event when the chat is blocked. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 (edited) DOWN @ Edited June 22, 2013 by Guest Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Castillo Posted June 22, 2013 Posted June 22, 2013 I don't understand what you said. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 (edited) I don't understand what you said. function bbc(source) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then if blockc == true then outputChatBox("#FFFF00* GM "..getPlayerName(source).."#00FF00 normalizou o chat para demais usuários.", getRootElement(), 255, 255, 255, true) blockc = false else outputChatBox("#FFFF00* GM "..getPlayerName(source).."#00FF00 trancou o chat para demais usuários.", getRootElement(), 255, 255, 255, true) cancelEvent() blockc = true end else return outputChatBox("#ffff00Access denied.", source, 255, 255, 255, true) end return 0 end addCommandHandler("chat", bbc) Edited June 22, 2013 by Guest Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Castillo Posted June 22, 2013 Posted June 22, 2013 local blockc = false function bbc ( source ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Admin" ) ) then if ( blockc == true ) then outputChatBox ( "#FFFF00* GM ".. getPlayerName ( source ) .."#00FF00 normalizou o chat para demais usuários.", getRootElement(), 255, 255, 255, true ) blockc = false else outputChatBox ( "#FFFF00* GM ".. getPlayerName ( source ) .."#00FF00 trancou o chat para demais usuários.", getRootElement(), 255, 255, 255, true ) blockc = true end else outputChatBox ( "#ffff00Access denied.", source, 255, 255, 255, true ) end end addCommandHandler ( "chat", bbc ) addEventHandler ( "onPlayerChat", root, function ( ) if ( blockc ) then cancelEvent ( ) end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 (edited) Very thanks man, i love you. You saved my night; @Edit I rushed ops, users continue typing to chat. Edited June 22, 2013 by Guest Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Castillo Posted June 22, 2013 Posted June 22, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 @Up Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 In the server no have resource , 'Freeroam'. I also think it would not have problems with the FR Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Castillo Posted June 22, 2013 Posted June 22, 2013 You must have a resource making his own chatbox outputs. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
gustavorn Posted June 22, 2013 Author Posted June 22, 2013 Truth is yes, Castillo I love you. Site: http://safbrasil.net Facebook: http://facebook.com/sanandreasfusini Youtube: http://youtube.com/safbrasilofc Twitter: http://twitter.com/safbrasilofc Desenvolvimento para versão beta 89 %....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now