Jump to content

Search the Community

Showing results for tags 'chat'.

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. suddenly my chat became unreadable, many ppl says problems with font, but fonts are ok i think so. Pls help
  2. Queria remover isso do chat quando entra no servidor, para o chat ficar clean
  3. Olá pessoal Gostaria de saber se alguem pode me ajudar com isso, esse codigo faz parte de uma concessionaria, que estou editando as mensagens mas essas mensagens dai (voce nao tem dinheiro para comprar esse carro!) (voce pode comprar apenas 10 carros) ficam floodando aparece umas 20 vezes nao sei porque alguem consegue me dar uma ajuda aqui porfavor? Lembrando que esse mod foi retirado da Net não é meu function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 10 then outputChatBox("Você pode comprar apenas 10 veiculos!", source, 38, 122, 216, true) return end if abc == true then return end if getPlayerMoney(source) >= tonumber(cost) then takePlayerMoney ( source, cost ) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local shopID = getElementData ( source, "atVehShop") local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 if shopID and shopsVehSpawns[shopID] then vehicle = createVehicle(Model, shopsVehSpawns[shopID][1], shopsVehSpawns[shopID][2], shopsVehSpawns[shopID][3], shopsVehSpawns[shopID][4], shopsVehSpawns[shopID][5], shopsVehSpawns[shopID][6]) else vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) end setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() local Placa = getElementData(vehicle,"Placa") if Placa == nil or not Placa then local NewPlate = getFreePlate(vehicle,id, source) end local Placa = getElementData(vehicle,"Placa") setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, Placa, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, false, cost, 1000, 0) updateVehicleInfo(source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) warpPedIntoVehicle ( source, vehicle ) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 150, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else outputChatBoxError ("Você não tem dinheiro suficiente para esse carro!", source, 38, 122, 216, true) end end)
  4. local sx,sy = guiGetScreenSize () local chatData = getChatboxLayout() local x, y = sx/2-50, sy-180 local oocState = true local maxLines = 9 local oocMessages = {} local font = "default-bold" local _,scale = chatData["chat_scale"] local bg = {chatData["chat_color"]} local lines = chatData["chat_lines"] -- local chatX,chatY = x,y local chatX,chatY = 0.015625*sx,16 + 15*lines + 25 addEventHandler ("onClientRender",getRootElement(), function () if getElementData(localPlayer, "loggedin") then if oocState and getElementData(localPlayer, "enableall") then chatX, chatY = exports.sas_hud:getNode(11, "x"), exports.sas_hud:getNode(11, "y") dxDrawText("OOC Chat (Kikapcsoláshoz /togooc | Takarítás: /co)",chatX+1,chatY+1,0,0,tocolor(0,0,0),1,font) dxDrawText("OOC Chat (Kikapcsoláshoz /togooc | Takarítás: /co)",chatX,chatY,0,0,tocolor(205,205,205),1,font) for k,v in ipairs(oocMessages) do local tx,ty = chatX,chatY + (maxLines+2)*15 - k*15 dxDrawText(v,tx+1,ty+1,0,0,tocolor(0,0,0),1,font) dxDrawText(v,tx,ty,0,0,tocolor(205,205,205),1,font) end end end end ) addEvent ("onOOCMessageSend",true) addEventHandler ("onOOCMessageSend",getRootElement(), function (message) local player = source local int,dim = getElementInterior (player),getElementDimension(player) if int == getElementInterior(localPlayer) and dim == getElementDimension(localPlayer) then local length = #oocMessages if #oocMessages >= maxLines then table.remove (oocMessages,maxLines) end local text = message table.insert (oocMessages,1,text) outputConsole ("[OOC]"..text) end end ) sziasztok azt szeretném megcsinálni hogy ooc-chat-en az adminnak mutatssa a színét/rangját pl ((SzuperAdmin Fory: példa)) és az ooc egybe van az ic-chattal 3 lua van. server.lua ooc.lua client.lua hogy tudnám oda be írni azt hogy ha adminszoliba vagyok, vagy nem vagyok adminszoliba, de színes a ooc ((SzuperAdmin Fory: példa)) a fenti az az ooc.lua
  5. Estou querendo deixar que os staff vejam o anonimo menos os players, quais comandos tenho que utilizar pra isso? Meu código está assim: function Anonimo(source, cmd, ...) local anonimo = table.concat({ ... }, " ") local nome = getPlayerName(source) --conta = getAccountName( getPlayerAccount (player)) for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user." .. nome, aclGetGroup("Staff")) then return outputChatBox("#000000[ Anonimo ] #FFFFFF "..nome.." #FFFFFF: #FFFFFF"..anonimo,v, 255, 255, 255, true) else outputChatBox("#000000[ Anonimo ] #FFFFFF " .. " #FFFFFF: #FFFFFF"..anonimo,v, 255, 255, 255, true) end end end addCommandHandler("anonimo", Anonimo)
  6. função adminchat4 ( thePlayer , _ , ...) mensagem local = table.concat ({ ... }, "" ) if ( isPlayerOnGroup (thePlayer)) then para _, jogador em ipairs ( getElementsByType ( "player" )) faça if ( isPlayerOnGroup (player)) then if getElementData (thePlayer, "ChatGlobal: Delay1" , true ) então outputChatBox (MensagemFalandoRapidoDemaisGlobal, thePlayer, 255 , 255 , 255 , true ) return end conta = getAccountName ( getPlayerAccount (thePlayer)) if isObjectInACLGroup ( "user." ..conta, aclGetGroup ( "Console" )) então outputChatBox ( "# 838b83 @ Anónimo: #ffffff" ..message, player, 255 , 255 , 255 , true ) elseif isObjectInACLGroup ( "user." ..conta, aclGetGroup ( "Admin" )) então outputChatBox ( "# 838b83 @ Anónimo: #ffffff:" ..message, player, 255 , 255 , 255 , true ) elseif isObjectInACLGroup ( "user." ..conta, aclGetGroup ( "SuperModerator" )) então outputChatBox ( "# 838b83 @ Anónimo: #ffffff" ..message, player, 255 , 255 , 255 , true ) elseif isObjectInACLGroup ( "user." ..conta, aclGetGroup ( "Moderador" )) então outputChatBox ( "# 838b83 @ Anónimo: #ffffff" ..message, player, 255 , 255 , 255 , true ) elseif isObjectInACLGroup ( "user." ..conta, aclGetGroup ( "Everyone" )) então outputChatBox ( "# 838b83 @ Anónimo: #ffffff" ..message, player, 255 , 255 , 255 , true ) fim fim fim fim setElementData (thePlayer, "ChatGlobal: Delay2" , true ) setTimer (setElementData, 100 , 1 , thePlayer, "ChatGlobal: Delay2" , false ) fim addCommandHandler (ComandoDoChatGlobal4, adminchat4)
  7. i tryed everithing,the servers,unstall and install etc.but nothing works
  8. how can i implement voice chat phone and radio in mta? ( for roleplay server )
  9. Hello everyone! As i play on a server with an international community, there's a lot of languages involved. To make insulting others/understanding others insulting me easier, i've decided to make a program which will translate chat messages in real-time. I used Wireshark to capture packets coming from the server, and - after some digging - i found out which ones correspond to the chat messages. Sadly, it turns out MTA apparently uses some kind of encoding, as no two packets supposed to contain the same chat string, share the same byte series. I made a quick search through MTA source code, but i'm too dumb to find the piece of code responsible for decoding it into a usable format. I don't know if that's of any use, but i found this file: https://github.com/multitheftauto/mtasa-blue/blob/1d66aad10cc68f44503fb0d618c78c4541ee6c52/Client/mods/deathmatch/logic/CPacketHandler.cpp It's supposed to process the packets and it has a piece of code called "Packet_ChatEcho". I guess it's something related. Has anyone tried this before? Any help will be very much appreciated. I think it's a cool idea. Regards, Koksiasz
  10. Olá, gostaria de saber como posso por uma linha a mais no meu Chat, de preferência vazia, apenas para dar um espaçamento dentro as outras mensagens. Sou novo em configurações de scripts. aqui está o script do chat que estou utilizando: (alguém saberia como adicionar a linha com base nele?) function MensagemRP(source, cmd, ...) local MessagemFRP = table.concat ( { ... }, " " ); local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox(" #FFD700[RJRP] 「ғᴏʀᴀ ᴅᴏ ʀᴘ」 #ffffff"..name..": #FFD700"..MessagemFRP,v, 255, 255, 255, true) end end addCommandHandler("forarp", MensagemRP)
  11. Gostaria de saber como faço para adicionar grupos ACL nestes chat Help-me function MensagemTwitter(source, cmd, ...) local MessagemT = table.concat ( { ... }, " " ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#00BFFF[ Twitter ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("Twitter", MensagemTwitter) function MensagemAnon(source, cmd, ...) local MessagemANS = table.concat ( { ... }, " " ); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#ffffff[ #696969 Anônimo #ffffff] #696969"..MessagemANS,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("Ans", MensagemAnon) function MensagemRP(source, cmd, ...) local MessagemFRP = table.concat ( { ... }, " " ); local name = getPlayerName(source); local getID = getElementData(source, "ID") or "n.a" for _,v in ipairs(getElementsByType("player")) do outputChatBox("#A9A9A9[ @Global ]#ffffff "..name.." #A9A9A9(ID:"..getID..") #A9A9A9 ❱ #ffffff"..MessagemFRP,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("forarp", MensagemRP) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "k", "down", "chatbox", "Ans")--bind end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"k", "down", "chatbox", "Ans") --bind end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "u", "down", "chatbox", "Twitter") --bind end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"u", "down", "chatbox", "Twitter") --bind end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "i", "down", "chatbox", "forarp") --bind end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"i", "down", "chatbox", "forarp") --bind end end )
  12. Eu tento fazer fazer o comando /discord so que nao vai! codigo utilizado addCommandHandler ("discord", function (thePlayer, cmd) local discord = "discord.gg/" setClipboard (discord) outputChatBox ("Link do discord copiado automaticamente use ctrl + v para colar", 0, 255, 0) end)
  13. Boa Tarde Eu sou 100% noobie em programação,queria pedir um favor ou tirar uma duvida com voces. Queria que no servidor,quando eu escrevo /dc aparecesse o discord do servidor apenas para o player que digitou,porem não encontro na net algum modelo para que eu possa aprender ou usar de template. Vocês poderiam me da um norte aqui??
  14. Bom dia alguem poderia me ajudar estou com uma dificuldade no meu chat local, estou tentando colocar o meu chat local para quando os jogadores usar codigos de cores no nick deles ficar branco a cor quando eles for falar no chat, Assim bloqueando as cores para não modificar no chat local. Esse script abaixo é meu chat local, espero que me ajudem, já tem muito tempo que tou tentando não consigo de jeito nenhum. DistanciaDoChatLocal = 200 -- Metros MensagemFalandoRapidoDemaisLocal = '#ffffff[ #CE98EBAnti Flood #ffffff] - #ffffffVocê Esta Digitando Muito Rapido, Aguarde 2 Segundos' -- ComandoDoChatGlobal = "f" -- Ex /g Mensagem ComandoDoChatGlobal2 = "u" ValorDoChatGlobal = 0 -- Dinheiro --MensagemFalandoRapidoDemaisGlobal = '#ffffff[ #FF0000Anti Flood #ffffff] - #ffffffVocê Esta Digitando Muito Rapido, Aguarde 5 Segundos' MensagemVoceEstaMutadoGlobal2 = '#ffffff[ #FF0000Aviso #ffffff] - #FF0000Você Esta Mutado, e Não Podera Utilizar os Chat do Servidor' MensagemVoceEstaMutadoGlobal = '#ffffff[ #FF0000Aviso #ffffff] - #FF0000Você Esta Mutado, e Não Podera Utilizar os Chat do Servidor' -------------------------------------------------------------------------------------------- -- 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("*#FFEE00ʙᴄʙ ʟᴏᴄᴀʟ #FFEE00- #FF6A6APresidente #FFEE00- #ffffff"..getPlayerName(source).. " ("..getElementData(source, "ID")..")#FFEE00 - #ffffff#FF6A6A "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("*#FFEE00ʙᴄʙ ʟᴏᴄᴀʟ #FFEE00- #FF6A6AVice Presidente #FFEE00- #ffffff"..getPlayerName(source).." ("..getElementData(source, "ID")..")#FFEE00 - #ffffff#FF6A6A "..tresc, gracze, 255, 255, 255, true)
  15. Sziasztok az adminchat-be található hogy: outputChatBox ( "#FFFFFF Nem vagy Admin!", thePlayer, 255, 255, 255, true )... ezt szeretném kitörölni,. de ha csak símán kitörlöm, akkor hibát ír és nem működik function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then outputChatBox ( "#7CC576[AdminChat] Tulajdonos #FFFFFF ".. getPlayerName ( thePlayer ) ..": ".. message, player, 255, 255, 255, true ) end end else * outputChatBox ( "#FFFFFF Nem vagy Admin!", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "a", adminchat ) function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Console", "Tulajdonos" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end
  16. if key == 'backspace' and ePress then chat.input = string.sub(chat.input, 0, string.len(chat.input) - 1) end The backspace working with default characters (a,b,c,d...), but when i type a special character, for example: á, é, ű, ő, ü...etc., the backspace not working, what wrong?
  17. 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 )
  18. 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 --------------------------------------------------------------------------------------------
  19. 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!
  20. 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?
  21. 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?
  22. 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
  23. 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!
  24. 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
  25. 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?
×
×
  • Create New...