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. Ola , O Chat Do Meu servidor Parou de Funcionar,quando alguem manda alguma coisa no chat nao aparece nada !! Alguem pode me ajudar ?
  2. Ivan Orel

    Local CHAT.

    How to add a local chat to the server? Please help me.
  3. anybody can give me a resource for Random messages on chat please????
  4. 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>
  5. Abdulelah

    help me

    hi , dear i want code for see all chat team use in resources for see all chat team
  6. 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)
  7. 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...
  8. 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 ?
  9. 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!
  10. 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)
  11. 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 =)
  12. Gostaria de saber porque, está aparecendo duas mensagens, após digitar, aparece uma do Freeroam, e outra com a Tag que coloquei, quando dou debuscript 3, aparece que está dando erro na linha 1208 do fr_client.lua, e a linha 442 do gui.lua, gostaria de esclarecer este erro. Fica assim: #Death!^: Este erro aqui! ⟦ Đono ⟧ : #Death!^: Este erro aqui!
  13. Error: [2017-12-28 09:08:30] WARNING: chat/server.lua:44: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] [2017-12-28 09:08:30] WARNING: chat/server.lua:45: Bad argument @ 'getPlayerName' [Expected element at argument 1, got nil] [2017-12-28 09:08:30] WARNING: chat/server.lua:55: Bad argument @ 'addEventHandler' [Expected function at argument 3, got none] Code: local chat_tavolsag = 100 function onChat(player, _, msg) local X, Y, Z = getElementPosition(player) local nev = getPlayerName(player) for _, v in ipairs(getElementsByType("player")) do if messageType == 0 then if isPlayerInRangeOfPoint(v, X, Y, Z, chat_tavolsag) then outputChatBox("".. nev .." mondja: ".. msg .."", v, 255, 255, 255, true) end end end end addEventHandler("onPlayerChat", getRootElement(), onChat(player, _, messsage)) Please help, i want a local chat.
  14. Eu escrevo no chat do jogo mais não aparece o que eu escrevo,Não consigo dar /assalto entre outos tambêm
  15. ..this is not the full code from my nametag: when i press 'T', the chaticon appear on everybody.. how to fix this? i want, when a player, or me press 'T', the ballon show just on the player, or on me, not on everyplayers... sorry for my terrible english .. :c
  16. Hello I have a nametag script. And i have a chat-icon script too. But i want add the chat-icon thing to nametag script, above the player nametag. And do not appear for me, just another players. This is possible? If yes, how? Sorry for my bad english..
  17. 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 : [email protected] or [email protected] . *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.
  18. Hy, please help me I use "tagflood" script and I want to build another script ("chatfilter") Because it can not be used separately Because Since it appears twice in chatbox message. This is my "tagflood" script: time = {} muted = {} words = {} Repeat = {} function chatbox(text, msgtype) local r,g,b = getPlayerNametagColor(source) local name = getPlayerName(source) local accountname = getAccountName (getPlayerAccount(source)) local UpdateTime = get("UpdateTime")*1000 local TimeOfMute = get("TimeOfMute")*1000 local Chances = get("ChancesOfRepetitions") if (msgtype == 0) then if get("AntiRepeatSystem") == "true" then if isTimer(time[source]) and words[source] == text then local r, e, t = getTimerDetails(time[source]) local sec = r/1000 Repeat[source] = Repeat[source] + 1 outputChatBox("Ne Ismételd Magad! (No Flood)", source,255,0,0,true) cancelEvent() if Repeat[source] >= tonumber(Chances) then if isPlayerMuted(source) then Repeat[source] = 0 return end setPlayerMuted(source, true) Repeat[source] = 0 realTime = TimeOfMute/1000 muted[source] = setTimer(function(source) setPlayerMuted(source, false) muted[source] = nil end,TimeOfMute,1,source) end return end words[source] = text Repeat[source] = 0 time[source] = setTimer(function(source) time[source] = nil words[source] = nil Repeat[source] = 0 end ,UpdateTime,1,source) end if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("TarsTulajdonosGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("TarsTulajdonosTagColor").."["..get("TarsTulajdonosTag").."] #333333|BM| "..RGBToHex(0,255,255)..name..": "..get("TarsTulajdonosTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("TarsTulajdonosTag").."] " .. getPlayerName ( source ).. ": " .. text) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("AdminGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("AdminTagColor").."["..get("AdminTag").."] #333333|BM| "..RGBToHex(0,255,255)..name..": "..get("AdminTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("AdminTag").."] " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("ModeratorGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("ModeratorTagColor").."["..get("ModeratorTag").."] #333333|BM| "..RGBToHex(0,255,255)..name..": "..get("ModeratorTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("ModeratorTag").."] " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("KisModeratorGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("KisModeratorTagColor").."["..get("KisModeratorTag").."] #333333|BM| "..RGBToHex(0,255,255)..name..": "..get("KisModeratorTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("KisModeratorTag").."] " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("TulajdonosGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("TulajdonosTagColor").."["..get("TulajdonosTag").."] #333333|BM| "..RGBToHex(0,255,255)..name..": "..get("TulajdonosTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("TulajdonosTag").."] " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("VIP1GroupACLName") ) ) then cancelEvent() outputChatBox(""..get("VIP1TagColor")..""..get("VIP1Tag").." "..RGBToHex(255,255,255)..name..": "..get("VIP1TalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( ""..get("VIP1Tag").." " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("VIP2GroupACLName") ) ) then cancelEvent() outputChatBox(""..get("VIP2TagColor")..""..get("VIP2Tag").." "..RGBToHex(255,255,255)..name..": "..get("VIP2TalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( ""..get("VIP2Tag").." " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("VIP3GroupACLName") ) ) then cancelEvent() outputChatBox(""..get("VIP3TagColor")..""..get("VIP3Tag").." "..RGBToHex(255,255,255)..name..": "..get("VIP3TalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( ""..get("VIP3Tag").." " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("VIPBMGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("VIPBMTagColor")..""..get("VIPBMTag").." #333333|BM| "..RGBToHex(255,255,255)..name..": "..get("VIPBMTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( ""..get("VIPBMTag").." " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("BMGroupACLName") ) ) then cancelEvent() outputChatBox(""..get("BMTagColor")..""..get("BMTag").." "..RGBToHex(255,255,255)..name..": "..get("BMTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( ""..get("BMTag").." " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( get("EveryoneGroupACLName") ) ) then cancelEvent() if isGuestAccount ( getPlayerAccount ( source ) ) then outputChatBox(""..get("GuestTagColor").."["..get("GuestTag").."] "..RGBToHex(r,g,b)..name..": "..get("GuestTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("GuestTag").."] " .. getPlayerName ( source ).. ": " .. text ) else outputChatBox(""..get("LoginTagColor")..""..RGBToHex(r,g,b)..name..": "..get("LoginTalkColor")..""..text, getRootElement(),0,0,0,true) outputServerLog( "["..get("LoginTag").."] " .. getPlayerName ( source ).. ": " .. text ) end end end end addEventHandler("onPlayerChat", getRootElement(), chatbox) function stop ( ) for _,v in ipairs(getElementsByType("player")) do if isTimer(muted[v]) then setPlayerMuted(v, false) startResource ( source ) stopResource ( source ) end end end addEventHandler ( "onResourceStop", resourceRoot, stop ) function saveData ( ) local serial = getPlayerSerial ( source ) if isTimer(muted[source]) then local r, e, t = getTimerDetails(muted[source]) setElementData(resourceRoot,serial,r) end end addEventHandler ( "onPlayerQuit", getRootElement(), saveData ) function getData( ) local serial = getPlayerSerial ( source ) local dataSystem = tonumber(getElementData(resourceRoot,serial)) or false if dataSystem == false then return end if isPlayerMuted(source) then return end if get("AntiRepeatSystem") == "false" then return end if dataSystem < 1 then setElementData(resourceRoot,serial,false) return end local timeData = dataSystem/1000 setPlayerMuted(source, true) muted[source] = setTimer(function(source) setPlayerMuted(source, false) setElementData(resourceRoot,serial,false) muted[source] = nil end,dataSystem,1,source) end addEventHandler ( "onPlayerJoin", getRootElement(), getData ) function RGBToHex(red, green, blue, alpha) 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 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 In this I want to incorporate this swearWords = { ":O", ":~", "piss", "bitch", "ass", "tard", ":O", "nazi", "fack", "fock", "cock", "pussy", "fack", "gay", "lesbian", "whore", ":O", ":O", ":O", ":O", } -- Intercept chat messages addEventHandler("onPlayerChat",getRootElement(), function(msg,type) -- Only affect normal messages if type == 0 then -- Cancel output cancelEvent() -- Clean up the message from any bad words local new = "" local iter = 0 for word in msg:gmatch("%S+") do iter = iter + 1 for i,swr in ipairs(swearWords) do local src = word:lower():gsub("%s","") local src = src:gsub("#%x%x%x%x%x%x","") local src = src:gsub("%c","") local src = src:gsub("%p","") local pat = swr:lower():gsub("%s","") if src:find(pat) then local replaceString = "" for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do replaceString = replaceString.."*" end word = word:gsub(word,replaceString) end end if iter == 1 and word:len() > 2 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end if new ~= "" then msg = new end -- Get appropriate team colors and output the clean message local pTeam = getPlayerTeam(source) if pTeam then local r,g,b = getTeamColor(pTeam) local hr,hg,hb = decToHex(r),decToHex(g),decToHex(b) local color = "#"..hr..hg..hb outputMessage(color..getPlayerName(source),msg) else outputMessage(getPlayerName(source),msg) end end end) -- Output preformatted message to the chatbox function outputMessage(author,message) outputChatBox(author..": #E0D0B0"..message,getRootElement(),255,255,255,true) end -- Convert number from decimal to hexadecimal function decToHex(num) return string.format("%02X",num) end So that it's all together and one chatbox Thanks
  19. 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:
  20. Olha oque está acontecendo , apareceu isso depois dessa atualização do mta
  21. my client: function coronaa() triggerServerEvent ("szoveg", root, getLocalPlayer()) end addEventHandler ( "onClientMarkerHit", ajtomegilyenek, coronaa ) and the server: addEvent( "szoveg", true ) addEventHandler( "szoveg", root, function(thePlayer) outputChatBox("Text", thePlayer, r,g,b, true) end) how to fix this?
  22. local function ujteamsay(message, messageType) if messageType == 2 then cancelEvent() outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, root, red, green, blue, true ) end end addEventHandler("onPlayerChat", root, ujteamsay) how to fix this? i want just team mates see the message.. *sorry for my very bad English :c*
  23. So, my problem is, that i made a GUI, and when it opens, it opens for all the players online and the setElementFrozen affects every player, etc. The GUI is attached to markers, so when you enter the marker, the GUI pops up. But it pops up for everyone. If you're not in the ACL group, you're not allowed to use the GUI, so it closes, when you press a button and outputs a message that you're not allowed to use it. I have the same problem with outputChatBox. The message appears for everyone. So my question is, that how could is make the GUI appear and affect only the actual user, and the outputChatBox appear only for the player i want? If you need the Scripts, just let me know and I'll instert it here. Thanks for the help.
  24. Всем привет, есть вопрос. В моём ресурсе после загрузки файлов, люди получают фоновую картинку и Окно GUI. Фоновая картинка грузится таким образом: welcome_gui = guiCreateStaticImage(0, 0, screenW, screenH, "welcome.jpg", false) Далее появляется gui window где форма входа. При этом картинка на заднем фоне перекрывает чат, где выводятся сообщения об ошибках при вводе данных. Как сделать картинку на заднем плане от чата? Спасибо, а то его совсем не видно за ней.
  25. CertER

    Chat Problem

    Hi all. So, I have a problem with global chat in game. On my server only members with acl group Admin, Moderator, SModerator and VIP can use global chat. I don't know why but normal players can't use chat. Need Help. Any Ideas? PS. Please of fast answer. Thanks. -CertER
×
×
  • Create New...