manve1 Posted September 12, 2012 Posted September 12, 2012 it doesn't add colors if i do #FF00FF or #FFFF00 ect .. i think you get the point addEventHandler("onPlayerChat", root, function (txt) txt = string.gsub(txt,"#[%x][%x][%x][%x][%x][%x]","") local len = 0 if string.len(txt) > 48 then return end if string.find(txt, "hey chuck") then local text = string.gsub(txt,"hey chuck","") setTimer( function() outputChatBox("#FF00FF|NcO|#FFFF00Chuck: Hey!", source, 255, 255, 0, true) end, 100, 1 ) end end ) Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted September 12, 2012 Posted September 12, 2012 addEventHandler ( "onPlayerChat", root, function ( txt ) local txt = txt:gsub ( "#[%x][%x][%x][%x][%x][%x]", "" ) local len = 0 if ( txt:len ( ) > 48 ) then return end if ( txt:find ( "hey chuck" ) ) then local text = txt:gsub ( "hey chuck", "" ) setTimer ( outputChatBox, 100, 1, "#FF00FF|NcO|#FFFF00Chuck: Hey!", source, 255, 255, 0, true ) end end ) Should work. The problem was that you created another function for the timer, instead of using just 'outputChatBox', so 'source' was not defined. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted September 12, 2012 Author Posted September 12, 2012 thank you Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted September 12, 2012 Posted September 12, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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