krazyY Posted October 11, 2019 Share Posted October 11, 2019 Estou com um chat Rp mas Não esta funcionando se alguém puder me ajudar Quote function MensagemTwitter(source, cmd, ...) local MessagemT = table.concat ( { ... }, "T" ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("Twitter", MensagemTwitter) function MensagemAnon(source, cmd, ...) local MessagemANS = table.concat ( { ... }, "T" ); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("DeepWeb", MensagemAnon) function MensagemRP(source, cmd, ...) local MessagemFRP = table.concat ( { ... }, "" ); local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("forarp", MensagemRP) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "Y", "down", "chatbox", "Twitter") bindKey(source, "U", "down", "chatbox", "Deepweb") bindKey(source, "i", "down", "chatbox", "forarp") end ) Link to comment
DNL291 Posted October 11, 2019 Share Posted October 11, 2019 MessagemT não está definido nos outros comandos e a concatenação também tem erro. Link to comment
root. Posted October 12, 2019 Share Posted October 12, 2019 function msg( player, cmd, ...) local msg = table.concat({...}, ' ') for i,player in pairs(getElementsByType('player')) do local acc = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup('user.'..acc, aclGetGroup('Everyone')) then outputChatBox('[User] '..getPlayerName(player)..': '..msg, player, 255, 255, 255, true) end end end addCommandHandler('sendmsg', msg) Use isso como uma referência Link to comment
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