DNL291 Posted July 28, 2013 Posted July 28, 2013 It must be only for normal message. Insults = { -- Note: USE lowercase LETTERS -- Format: { "Insult Word", "Replace Word" }, { "bitch", "cow" }, } function chatL ( msg, msgType ) if (not msgType == 0) then return end for k,v in ipairs (Insults) do if string.find( string.lower ( msg ),v[1]) then msg = msg:gsub ( msg, v[2] ) end end cancelEvent ( ) outputChatBox(getPlayerName ( source )..": #ffffff"..msg,root,0,255,0,true) end addEventHandler( "onPlayerChat", getRootElement(), chatL ) Please do not PM me with scripting related question nor support, use the forums instead.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 You can remove the chat part from it. How? and in any file? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 28, 2013 Posted July 28, 2013 At "fr_server.lua". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 Ok i openned what part i have to remove? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 Why not set the code at the freeroam? To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 What you mean? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 I'm mean if you merge the codes with freeroam maybe it will works To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 It will crash the script and freeroam. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 Oh ok do as Castillo said, post the freeroam the file "fr_server.lua" To Visit Us Press Here: mtasa://5.9.206.180:22002
DNL291 Posted July 29, 2013 Posted July 29, 2013 Open fr_server.lua and replace this (at line 399): addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. '#FFFFFF: #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) For this: Insults = { -- Note: USE lowercase LETTERS -- Format: { "Insult Word", "Replace Word" }, { "bitch", "cow" }, } function chatL ( msg, msgType ) if (not msgType == 0) then return end for k,v in ipairs (Insults) do if string.find( string.lower ( msg ),v[1]) then msg = msg:gsub ( msg, v[2] ) end end cancelEvent ( ) outputChatBox(getPlayerName ( source )..": #ffffff"..msg,root,0,255,0,true) end addEventHandler( "onPlayerChat", getRootElement(), chatL ) Please do not PM me with scripting related question nor support, use the forums instead.
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 still not working If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 still not working Ok, try to delete at the line 399 in the freeroam file Delete this: addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. '#FFFFFF: #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 Wont work, and don't worry i fixed it my self Thank you all Special thanks to @FatalTeror @iMr.3a[Z]eF If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
xXMADEXx Posted July 29, 2013 Posted July 29, 2013 In the 'freeroam/fr_server.lua' the chat lines should be 401-422. Just remove those lines and it should work. The Ultimate Lua Tutorial! | MTA PHP SDK
iMr.3a[Z]eF Posted July 30, 2013 Posted July 30, 2013 Wont work, and don't worry i fixed it my self Thank you allSpecial thanks to @FatalTeror @iMr.3a[Z]eF You are very welcome. To Visit Us Press Here: mtasa://5.9.206.180:22002
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now