Jump to content

Search the Community

Showing results for tags 'localchat'.

  • 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

Found 2 results

  1. local chat_range=25 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 msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("#838B83[ #FFFF00вcɢ ʟᴏᴄᴀʟ #838B83] "..nick..": #FFFF00"..msg,v,r,g,b,true) end end end addCommandHandler(onChat) [PT-BR] Salve Comunidade do MTA, Então estou tendo um probleminha no meu chat local que é o seguinte: Queria que essa mensagem do outputChatBox fosse mandada no say, com uma distancia para servir como chat local, Não manjo muito de programação e venho aqui pedir uma ajuda de vcs! Recalculando: Chat local no no "t"(say) com uma distancia que ja esta no codigo para servir de chat local TMJ!
  2. 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.
×
×
  • Create New...