Search the Community

Showing results for tags 'chat'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 40 results

  1. Olá tenho um chat anonimo aqui e sempre vejo alguns players aproveitando ele para pode xingar e divulga e eu queria sabe ,como faço para quem tiver da ACL : STAFF vai mostrar assim [Anonimo] Nick - mensagem Bom aqui server-side addCommandHandler( "an", function ( source, cmd, ... ) local message2 = #{...} > 0 and table.concat({...}," ") or nil if message2 then outputChatBox("#ffffff[ #696969 Anônimo #ffffff] #696969 - "..message2, root, 255, 255, 255, true) else outputChatBox( "[/"..cmd.."]: Digite uma mensagem!", source, 230, 20, 20 ) end end )
  2. EU QUERIA SABER COMO COLOCO ID NO CHAT QUE TAVA EDITANDO POIS EU EDITEI E O CHAT NAO TA FUNCIONANDO
  3. On my client the dx-font working fine, but with another client the dx-font does not working.. Got this warning: WARNING: customchat\sourceC.Lua:164: Bad argument @ 'dxDrawText' [Expected dx-font at argument 8, got boolean] the code: local TwCen14s = dxCreateFont('TwCen.ttf', 10) dxDrawText("Chat: #ffFFff"..chat.input, sx / 2 - 450 - 255, sy / 2 - 356 - 60 + 25 * chat.maxShowedMessage, 450, 300, tocolor(255, 181, 64, 255), 1, TwCen14s,_,_,_,_,_,true) what wrong?... how can i fix this problem?
  4. to com um chat RP aqui e eu queria sabe ,como faço para quem tiver da ACL : STAFF vai mostrar quem Falou no anonimo tipo [Anonimo] Nick - mensagem e quem nao tiver na ACL aparecer sem o nick server-side function getPlayerID(player) return getElementData(player,"ID") end function getPlayerIDG(thePlayer) return getElementData(thePlayer,"ID") end -------------------------------------------------------------------------------------------- DistanciaDoChatLocal = 80 -- Metros ComandoDoChatGlobal = "rp" -- Ex /g Mensagem ComandoDoChatGlobal2 = "twitter" -- Ex /g Mensagem ComandoDoChatGlobal3 = "olx" -- Ex /g Mensagem ComandoDoChatGlobal4 = "anonimo" -- Ex /g Mensagem ValorDoChatGlobal = 0 -- Dinheiro -------------------------------------------------------------------------------------------- -- Config do Chat Local addEventHandler("onPlayerChat", root, function(tresc, msgtype) if (msgtype == 0) then cancelEvent() local x,y,z = getElementPosition(source) for key, gracze in ipairs(getElementsByType("player")) do local x2,y2,z2 = getElementPosition(gracze) if getElementData (source, "ChatLocal:Delay", true) then outputChatBox ( MensagemFalandoRapidoDemaisLocal, source, 255, 255, 255, true ) return end if ( getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) < DistanciaDoChatLocal ) then local int = getElementInterior ( source ) local dim = getElementDimension ( source ) local int2 = getElementInterior ( gracze ) local dim2 = getElementDimension ( gracze ) if ( int == int2 and dim == dim2 ) then conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #ffffff"..getPlayerName(source).. "[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Administrador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #40E0D0*Vip Simples #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #00FFFF*Vip Avançado #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] "..getPlayerName(source).. "[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) end end end end end setElementData (source, "ChatLocal:Delay",true) setTimer (setElementData, 100, 1, source, "ChatLocal:Delay", false) end) -------------------------------------------------------------------------------------------- -- Config do Chat Global function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if ( isPlayerMuted(thePlayer) ) then outputChatBox ( MensagemVoceEstaMutadoGlobal, thePlayer, 255, 255, 255, true ) return end if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end local money = getPlayerMoney(thePlayer) if (money < ValorDoChatGlobal ) then outputChatBox ( MensagemDinheiroInsuficienteGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Administrador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] "..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff#ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay1",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal, adminchat ) -------------------------------------------------------------------------------------------- -- Chat Twitter function adminchat2 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal2, adminchat2 ) ----------------------------------------------------------- -- Chat olx function adminchat3 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal3, adminchat3 ) -------------------------------------------------------------- -- Chat anonimo function adminchat4 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#838b83@Anónimo: #ffffff: "..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "SuperModerator" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderator" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal4, adminchat4 ) --------------------------------------------------------------------- function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Everyone" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end --------------------------------------------------------------------------------------------
  5. Why not see another players my messages? And how to add built-in, and addCommandHandler commands to this chat system? Client: Server: Thanks the help!
  6. Olá, eu estive trabalhando hoje em um sistema de chat muito interessante para o gênero roleplay e após estudar sobre as funções, ver alguns exemplos e pesquisar muito na Wiki eu acabei conseguindo desenvolver o que eu gostaria. Eu pretendo postar esse script no fórum por sentir que tenho uma dívida com ele, afinal se não fosse a comunidade eu não teria conseguido, porém há um problema: ele ainda não está completo. Eu pesquisei por alguma função do gênero na WIKI do MTA mas fracassei miseravelmente, então resolvi perguntar uma vez mais aqui no fórum. Há alguma função ou recurso que permita que o texto digitado apareça acima da cabeça do personagem? Se não, como começar a criar?
  7. Olá, eu tenho uma dúvida sobre MTA. Eu vim do SA:MP para o MTA com a intenção de abrir um servidor, eu realmente não gosto de PAWN e fiquei maravilhado ao ver que Lua e C++ é usado no MTA, as possibilidades são infinitas, e sinceramente sinto que a plataforma é mais bem feita, porém surge uma dúvida em minha mente. É possível fazer alterações no que se refere ao chat do MTA? Eu aprendi Lua no Tibia onde para fazer essa alteração seria necessário fazer um cliente próprio com alterações nas sources, imagino que aqui não seja o mesmo, porém essa é minha dúvida. No SA:MP há servidores que ao você apertar T, toda sua mensagem será global, e há servidores que você aperta T e digita sua mensagem, apenas quem está nas próximidades poderá ler o que você tem a dizer, podendo ser extendida essa distância com comandos que simulam um grito, enviada apenas para um jogador na sua proximidade através de um comando de sussurro, você também pode falar baixo para encurtar ainda mais a distância da sua fala porém para que todos possam ouvir. Minha dúvida é se isso é possível aqui, eu realmente procurei bastante e não encontrei nada especifico ou mesmo um servidor com um sistema assim ou parecido, eu descobri o MTA a cerca de três horas, para alguns isso pode ser uma dúvida de um leigo e realmente é, porém eu apreciaria uma resposta de alguém mais experiente, o MTA permite que você faça alterações no chat?
  8. Oi pessoal eu to criando um servidor 100% RP , e para um servidor Rp eu acho que eu chat local não é necessário quando eu aperto a tecla "t" abre o chat queria saber como remover esse chat
  9. Hello guys! , today i have a question to you! When we press the key "t" it open a chat. How i can remove this chat? Im creating a Full Roleplay Server , and for the roleplay a localchat dont make sense . So if you can help-me i really aprecciate!
  10. When i write a message to chatbox the picture appears in the right place, but when a another player output something in chatbox, the picture jumps up more than my message.. How to fix this bug?! Client: emotes = {} function showEmotes(originaltext,emote,emoteID) local totaltextwidth = getImageOffsets(originaltext) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local originalmultiplier = math.floor(totaltextwidth/chatwidth) local text,_ = string.gsub(originaltext,tostring(emoteID..".*"),"") local width = getImageOffsets(text) local multiplier = math.floor(width/chatwidth) local width = width-multiplier*chatwidth table.insert(emotes,{emote,width,lines-(originalmultiplier-multiplier),false}) local _,index1 = string.gsub(originaltext,emoteID,emoteID) if index1>1 then local text,index = string.gsub(originaltext,emoteID,"-00",1) showEmotes(text,emote,emoteID) end end addEvent("triggerChat",true) addEventHandler("triggerChat",root,showEmotes) function getImageOffsets(text) lines = getChatboxLayout()["chat_lines"] local chatboxscale = getChatboxLayout()["text_scale"] local fontint = getChatboxLayout()["chat_font"] scaleX = getChatboxLayout()["chat_scale"][1] scaleY = getChatboxLayout()["chat_scale"][2] if fontint == 0 then font = "default" end if fontint == 1 then font = "clear" end if fontint == 2 then font = "default-bold" end if fontint == 3 then font = "arial" end fontheight = dxGetFontHeight(chatboxscale,font) local width = (dxGetTextWidth(text,chatboxscale,font)+chatxoffset)*scaleX return width end local screenWidth, screenHeight = guiGetScreenSize ( ) chatxoffset = screenWidth * 0.0145 chatyoffset = screenHeight * 0.0145 function createText ( ) for index,item in ipairs(emotes) do local line = item[3] local width = item[2] local height = (chatyoffset + (line-1)*fontheight)*scaleY if (item[3]<1) then table.remove(emotes,index) else dxDrawImage(width,height,20,20,"a.png",0,0,0,tocolor(255,255,255,255),true) end end end function emotesOnOff() if emotesVisible then removeEventHandler ( "onClientRender", root, createText ) emotesVisible = false else addEventHandler ( "onClientRender", root, createText ) emotesVisible = true end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) emotesVisible = true addCommandHandler ("emotes", emotesOnOff ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) function onClientChatMessageHandler(text) local width = getImageOffsets(text) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local multiplier = math.floor(width/chatwidth)+1 for index,item in ipairs(emotes) do if item[4] then item[3] = item[3]-1*multiplier end item[4] = true end end addEventHandler("onClientChatMessage", getRootElement(), onClientChatMessageHandler) Server: emotes = { {"a","-23"} } function playerChat(text, messageType) if (messageType ~= 0) then return end local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "tesztr" ) ) then local originalText = removeColorCodes(getPlayerName(source)) for index,item in ipairs(emotes) do text,item[3] = string.gsub(originalText,item[1],item[2]) end for index,item in ipairs(emotes) do triggerClientEvent("triggerChat",source,"[HU]"..originalText,item[1],item[2]) end for index,item in ipairs(emotes) do originalText,item[3] = string.gsub(originalText,item[1]," ") end end end addEventHandler("onPlayerChat", root, playerChat) function removeColorCodes(str) return (string.gsub(str, "#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]", "")) end
  11. I want attach images to my message in default mta chat with a word, but i dont know how to attach the image to the message.. Anyone can help, and show me a example?
  12. Como eu boto pro jogador ter que digitar algum no chat pra falar com a tag que eu botar Exemplo:/Fr Olá a todos **Chat** [Fora de Roleplay]SondTheAnime:Olá a todos
  13. Ola , O Chat Do Meu servidor Parou de Funcionar,quando alguem manda alguma coisa no chat nao aparece nada !! Alguem pode me ajudar ?
  14. Ivan Orel

    Local CHAT.

    How to add a local chat to the server? Please help me.
  15. anybody can give me a resource for Random messages on chat please????
  16. Guest

    chatsound

    What is wrong with this resource: Client: function playSonido() local sound = playSound("chat.mp3",false) setSoundVolume(sound, 0.9) end addEvent("sonido",true) addEventHandler("sonido",getRootElement(),playSonido) Server: function chat (thePlayer) triggerClientEvent("sonido",getRootElement()) end addEventHandler ( "onPlayerChat", getRootElement(), chat ) Meta: <meta> <info description="Chat sound" author="Hyper" version="5.0" type="script" /> <script src="client.lua" type="client" /> <script src="server.lua" type="client" /> <file src="chat.mp3" /> </meta>
  17. Abdulelah

    help me

    hi , dear i want code for see all chat team use in resources for see all chat team
  18. Hi, I've got an interesting bug with my localchat script. When the players are in range of local chat then for some of them a *action text* part is not colored, but when they're alone in their chat distance, everything works fine and message is fully colored. function RGBToHex(red, green, blue, alpha) -- Make sure RGB values passed to this function are correct if( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 or alpha > 255 ) ) ) then return nil end -- Alpha check if alpha then return string.format("#%.2X%.2X%.2X%.2X", red, green, blue, alpha) else return string.format("#%.2X%.2X%.2X", red, green, blue) end end function localchat (msg, msgtype, cmdname) local x, y, z = getElementPosition (source) local playerdim = getElementDimension (source) local range = 30 local playerName = getPlayerName (source) for index, player in pairs(getElementsByType ("player")) do local playersdim = getElementDimension (player) if playerdim == playersdim then local xp, yp, yz = getElementPosition (player) local distance = getDistanceBetweenPoints3D (x, y, z, xp, yp, yz) if ( distance <= range ) then r = tonumber (255 - (tonumber((distance))* 3)) g = tonumber (255 - (tonumber((distance))* 3)) b = tonumber (255 - (tonumber((distance))* 3)) mr = tonumber (255 - (tonumber((distance))* 3)) mg = 0 mb = tonumber (255 - (tonumber((distance))* 3)) if msgtype == 0 then cancelEvent() msg = string.gsub(msg, "#%x%x%x%x%x%x", "") msg = msg:gsub("^%l", string.upper) playerName = string.gsub(playerName, "#%x%x%x%x%x%x", "") playerName = string.gsub(playerName, "_", " ") mecolor = RGBToHex(mr, mg, mb) normalcolor = RGBToHex(r, g, b) while true do local find,find2 = string.find(msg, "%<(.-)%>") if (find and find2) then msg = string.sub(msg,1,find-1) .. mecolor .. "*".. string.sub(msg, find+1, find2-1) .. "*" .. normalcolor .. string.sub(msg, find2+1, #msg) else break end end if string.find(msg, ".", -1, true) or string.find(msg, "?", -1, true) or string.find(msg, "!", -1, true) then outputChatBox(playerName .. " mówi: " .. msg , player, r, g, b, true) else msg = msg.. "." outputChatBox(playerName .. " mówi: " .. msg , player, r, g, b, true) --outputChatBox(playerName .. " mówi: " .. msg .. ".", player, 255, 255, 255, true) end end end end end end addEventHandler("onPlayerChat", getRootElement(), localchat)
  19. Hello, the following conversation bubble does not appear by other people. The writer see at the person c_chat local bubbles = {} -- {text, player, lastTick, alpha, yPos} local fontHeight = 22 local characteraddition = 50 local maxbubbles = 5 local selfVisible = true -- Want to see your own message? local timeVisible = 5000 local distanceVisible = 20 function addText(source, text, color, font, sticky, type) if getElementData(localPlayer, "graphic_chatbub") == "0" then return end if not bubbles[source] then bubbles[source] = {} end local tick = getTickCount() local info = { text = text, player = source, color = color or {255, 255, 255}, tick = tick, expires = tick + (timeVisible + #text * characteraddition), alpha = 0, sticky = sticky, type = type } if sticky then table.insert(bubbles[source], 1, info) else table.insert(bubbles[source], info) end if #bubbles[source] > maxbubbles then for k, v in ipairs(bubbles[source]) do if not v.sticky then table.remove(bubbles[source], k) break end end end end addEvent("addChatBubble", true) addEventHandler("addChatBubble", root, function(message, command) if source ~= localPlayer or selfVisible then if command == "ado" or command == "ame" then addText(source, message, { 255, 51, 102 }, "default-bold", false, command) else addText(source, message) end end end ) function removeTexts(player, type) local t = bubbles[player] or {} for i = #t, 1, -1 do if t[i].type == type then table.remove(t, i) end end if #t == 0 then bubbles[player] = nil end end -- Status addEventHandler("onClientElementDataChange", root, function(n) if n == "chat:status" and getElementType(source) == "player" then updateStatus(source, "status") end end) addEventHandler("onClientResourceStart", resourceRoot, function() for _, player in ipairs(getElementsByType("player")) do if getElementData(player, "chat:status") then updateStatus(player, "status") end end end) function updateStatus(source, n) removeTexts(source, n) if getElementData(source, "chat:status") then addText(source, getElementData(source, "chat:status"), {136, 87, 201}, "default-bold", true, n) end end -- -- outElastic | Got from https://github.com/EmmanuelOga/easing/blob/master/lib/easing.lua -- For all easing functions: -- t = elapsed time -- b = begin -- c = change == ending - beginning -- d = duration (total time) -- a: amplitud -- p: period local pi = math.pi function outElastic(t, b, c, d, a, p) if t == 0 then return b end t = t / d if t == 1 then return b + c end if not p then p = d * 0.3 end local s if not a or a < math.abs(c) then a = c s = p / 4 else s = p / (2 * pi) * math.asin(c/a) end return a * math.pow(2, -10 * t) * math.sin((t * d - s) * (2 * pi) / p) + c + b end local function renderChatBubbles() if getElementData(localPlayer, "graphic_chatbub") ~= "0" then local square = getElementData(localPlayer, "graphic_chatbub_square") ~= "0" local tick = getTickCount() local x, y, z = getElementPosition(localPlayer) for player, texts in pairs(bubbles) do if isElement(player) then for i, v in ipairs(texts) do if tick < v.expires or v.sticky then local px, py, pz = getElementPosition(player) local dim, pdim = getElementDimension(player), getElementDimension(localPlayer) local int, pint = getElementInterior(player), getElementInterior(localPlayer) if getDistanceBetweenPoints3D(x, y, z, px, py, pz) < distanceVisible and isLineOfSightClear ( x, y, z, px, py, pz, true, not isPedInVehicle(player), false, true) and pdim == dim and pint == int then v.alpha = v.alpha < 200 and v.alpha + 5 or v.alpha local bx, by, bz = getPedBonePosition(player, 6) local sx, sy = getScreenFromWorldPosition(bx, by, bz) local elapsedTime = tick - v.tick local duration = v.expires - v.tick if sx and sy then if not v.yPos then v.yPos = sy end local width = dxGetTextWidth(v.text:gsub("#%x%x%x%x%x%x", ""), 1, "default-bold") local yPos = outElastic(elapsedTime, v.yPos - 20, (sy - fontHeight*i ) - v.yPos - 10, 1000, 5, 500) if square then dxDrawRectangle(sx - (12 + (0.5 * width)), yPos - 2, width + 23, 19, tocolor(20, 20, 20, 200)) dxDrawRectangle(sx - (12 + (0.5 * width)), yPos + 16, width + 23, 1, tocolor(v.color[1], v.color[2], v.color[3], 255)) -- All but /say --(v.type == "ado" or v.type == "ame" or v.type == "status") and tocolor(v.color[1], v.color[2], v.color[3], 255) or tocolor(0, 0, 0, 255)) else dxDrawRectangle(sx - (3 + (0.5 * width)),yPos - 2,width + 5,19,tocolor(0,0,0,bg_color)) dxDrawRectangle(sx - (6 + (0.5 * width)),yPos - 2,width + 11,19,tocolor(0,0,0,40)) dxDrawRectangle(sx - (8 + (0.5 * width)),yPos - 1,width + 15,17,tocolor(0,0,0,bg_color)) dxDrawRectangle(sx - (10 + (0.5 * width)),yPos - 1,width + 19,17,tocolor(0,0,0,40)) dxDrawRectangle(sx - (10 + (0.5 * width)),yPos + 1,width + 19,13,tocolor(0,0,0,bg_color)) dxDrawRectangle(sx - (12 + (0.5 * width)),yPos + 1,width + 23,13,tocolor(0,0,0,40)) dxDrawRectangle(sx - (12 + (0.5 * width)),yPos + 4,width + 23,7,tocolor(0,0,0,bg_color)) end dxDrawText(v.text, sx - (0.5 * width), yPos, sx - (0.5 * width), yPos - (i * fontHeight), tocolor(unpack(v.color)), 1, "default-bold", "left", "top", false, false, false) end end else table.remove(bubbles[player], i) end end if #texts == 0 then bubbles[player] = nil end else bubbles[player] = nil end end end end addEventHandler("onClientPlayerQuit", root, function() bubbles[source] = nil end) addEventHandler("onClientRender", root, renderChatBubbles) -- s_chat.lua triggerClientEvent(source,"addChatBubble",source,message) Help me please...
  20. Gat

    [HELP] discord bot

    Hello guys My name is Gat and im new here and i want a help. I found a mta bot for discord script that echo chat between mta server and a discord channel. URL: https://github.com/Necktrox/mta-discord-bot The problem is I don't know how to use it 😂
  21. Meu Servidor De Mta Esta Com Um Problema Que Esta Aparecendo Mensagens No Chat Quando Um Jogador Morre Ou Troca o Nick ((Obs: NÃO É O SCRIPT DEATHMESSAGES POIS ESTA DESATIVADO)) | Olha:
  22. Hello everyone Today I've finished my new script : GCSS Details about this script : This is a system which allows you to chatting with other players on another server So when you open the panel, you will see on the left : The players on your current server On the right it's the Messages box, You will receive the messages from the players on your server and the players on the second server And in : Manage GCSS Tab which is for admins you will see a place to update admin message & Check new updates of the script Also you've a smiles in the script : Emoji window Note : Minimum MTA:SA Version to run all features is : 1.5.4 . _________________________________________________________________________________________________ Other Features : You can customize your messages color, All players will see the new color on each servers ( Default color is White ). You can press on "Do Not Disturb[ Silent Mode ]" checkBox to mute the alerts of the system and chatBox messages. _________________________________________________________________________________________________ Tutorial about how to use the script : Note : Do not edit the resource name, to avoid issues. 1- Write this code in a blank space in the ACL file for each servers : <group name="OutRPCGroup"> <acl name="OutRPC" /> <object name="resource.GCSS_Professional" /> </group> <acl name="OutRPC"> <right name="function.callRemote" access="true" /> </acl> <group name="InRPCGroup"> <acl name="InRPC" /> <object name="user.http_guest" /> </group> <acl name="InRPC"> <right name="resource.GCSS_Professional.http" access="true" /> </acl> 2- Go to "Settings.lua" file and edit the following : adminGroup_Permissions = 'Admin'; -- ***Edit this group name to your Admins group to give full permissions / leave if it's the same name. ManageGCSS_AccessTable = { 'Console', 'Admin', 'GCSS_Manager' }; -- ***Edit : This is the groups which can access "Manage GCSS" tab. local server_ip = '127.000.0.000:22005'; -- ***Put the server ip & port for each server you want to communicate with. -- Do not edit the codes below. addEvent( 'onServerSendMessage', true ) addEventHandler( 'onServerSendMessage', root, function( message ) local name = getPlayerName( source ) local data = getElementData( source, 'GCSS:MessageColor' ) local message = '[onPort:'..getServerPort( )..'][ '..name..' ] : '..message callRemote( server_ip, 'default', 10, 10000, getResourceName( getThisResource( ) ), 'SendGlobalMessage', callBack, message, data[1], data[2], data[3] ) triggerClientEvent( root, 'onClientReceiveMessage', source, message, data[1], data[2], data[3] ) end ) Note : You need to install the resource on each servers by use the following : On the first server : Write the ip & port of the second server & Run the resource On the second server : Write the ip & port of the first server & Run the resource _________________________________________________________________________________________________ Note : You can found the key to open the script in : "OpenKey.lua" file. _________________________________________________________________________________________________ Some pictures : Main panel & Customize panel & Emoji panel __________ Manage GCSS Tab _________________________________________________________________________________________________ Note : All shared GCSS Scripts are Demo, To Purchase full open source script or get a special edits : Contact the programmer[Me] on E-mail : ka1888868@gmail.com or us.luapro@gmail.com . *Purchase Price : $5 *Current version is : 1.0.0 *Download : Press on me :). Note : If you have any issues, please write a comment. If you have a new ideas to develop the script, please write a comment on the topic Do not forget to rate the script by percentage% in a comment Thanks.
  23. Hello have local chat in freeroam server I am new at this I try to make it look in one dimension. For example, if I am in dimension 5, only those in dimension 5 can see it Help please chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","Local") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","Local") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local dm = getElementDimension(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getPlayerNametagColor(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(Local) "..nick..": "..msg,v,r,g,b,true) end -- outputServerLog("(Local) "..nick..": "..msg,true) end end addCommandHandler("Local",onChat)
  24. Eu tenho uma hud modificada em meu servidor, mas tem momentos que a original aparece atrás da nova, tipo quando abro alguma coisa na tela como algum painel e etc, eu tenho um cinema, se eu abro ele a hud vem tmb, mas mesmo removendo cinema do servidor ela vem em outros scripts, as vezes o chat some também com isso, e tipo digamos que eu dei restart no painel de login, eu vou bugar se eu clicar em não logar e jogar como guest e o chat vai sumir. Resumindo ele some ou a hud antiga volta, e não achei nada que ativasse a antiga denovo, tanto que usei o prórpio tópico de ajuda daqui e fiz um script de showhud... mas é apenas para login, oq n me resolve pq quando faço login é normal. Obrigado a quem souber me ajudar!
  25. Pessoal é o seguinte o meu sistema de "ajudante" não está funcionando corretamente e eu não sei como corrigir isso Eu não quero que o player que perguntou no chat tenha que escrever a frase inteira igual como está escrito no script, e sim somente uma palavra por exemplo " Raidcall " e Já aparece o ajudante, quando eu coloco somente a palavra raidcall o player teria que escrever somente raidcall para funcionar e não poderia escrever nada junto por exemplo "Qual o raidcall do servidor ?" Mensagens = { ["qual o raidcall do servidor"] = true, ["qual o raidcall"] = true } addEventHandler("onPlayerChat", root) function(msg, msgType) if Mensagens[msg] then exports["notices"]:addNotification(source,"[BOT]Igor diz : Você Pode Entrar Para Alguma Gang/Corp Em Nosso Raidcall",'info'); -- Ignorem isso é de um sistema de notificação outputChatBox("#ff0000[BOT]#bebebeIgor "..getPlayerName(source).." #bebebeNosso Raidcall é #ff0000 ", root,255,255,255,true) end end Obrigado =)