Jump to content

Search the Community

Showing results for tags 'onplayerchat cancelevent()'.

  • 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 1 result

  1. so, i making a "chat system", but i got some problems. Here is the code cancelableworld = { ":~", ":Oyou", "bitch" } addEventHandler("onPlayerChat", root, function(message, msgTyp) local message = string.lower(message) for i,v in ipairs(cancelableworld) do if (string.find(message, cancelableworld[i])) then outputChatBox("*NO*", source, 255, 0, 0, false) cancelEvent() end end end) --————————————————————————————————————————————————————————— --————————————————————————————————————————————————————————— --< CustomChat >-- addEventHandler ( "onPlayerChat", root, local Level = getElementData(source,"Level" or 0) function(message) outputChatBox("#4C7759[LVL "..Level.."] #FFFFFF"..getPlayerName(source)..": #FFFFFF"..message,getRootElement(),255,2555,255,true) end) The script first half is canceling the worlds, but the second is enable the world. So i cancel the "Weid" worlds, but it keep showing on the chat, becase the second half not ignor that. I want to make, when player typing blocked worlds in chat, thats not showing up, what should i do?
×
×
  • Create New...