rabe3 Posted October 10, 2013 Share Posted October 10, 2013 السلام عليكم عندي هاذ المود مثلا لو واحد كتب كلمه بذيه يقلبها لكلمه غيرها بس مشكلته الالوان ابيه لما يحكي بلشات يكون لون الاسم نفس لون التاج ولون الفريق بلصور playercolorهنا اذا شغلت المود مع ال http://im37.gulfup.com/DrOeT.png playercolorهنا لما اكون طافي http://im37.gulfup.com/YrMoU.png Insults = { -- Note: USE lowercase LETTERS -- Format: { "Insult Word", "Replace Word" }, { "fuck", "cow" }, } function chatL ( msg ) 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,r,g,b,true) end addEventHandler( "onPlayerChat", getRootElement(), chatL ) ان شاء الله في حل Link to comment
3NAD Posted October 10, 2013 Share Posted October 10, 2013 Insults = { -- Note: USE lowercase LETTERS -- Format: { "Insult Word", "Replace Word" }, { ":O", "cow" }, } function chatL ( msg ) 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 ( ) local plrTeam = getPlayerTeam ( source ) if plrTeam then local r, g, b = getTeamColor ( plrTeam ) outputChatBox ( getPlayerName ( source )..": #ffffff"..msg, root, r, g, b, true ) else local r, g, b = getPlayerNametagColor ( source ) outputChatBox ( getPlayerName ( source )..": #ffffff"..msg, root, r, g, b, true ) end end addEventHandler ( "onPlayerChat", root, chatL ) مو مرتاح لـ كود البحث عن الكلمات احس فيه غلط صغير .. Link to comment
rabe3 Posted October 10, 2013 Author Share Posted October 10, 2013 Insults = { -- Note: USE lowercase LETTERS -- Format: { "Insult Word", "Replace Word" }, { ":O", "cow" }, } function chatL ( msg ) 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 ( ) local plrTeam = getPlayerTeam ( source ) if plrTeam then local r, g, b = getTeamColor ( plrTeam ) outputChatBox ( getPlayerName ( source )..": #ffffff"..msg, root, r, g, b, true ) else local r, g, b = getPlayerNametagColor ( source ) outputChatBox ( getPlayerName ( source )..": #ffffff"..msg, root, r, g, b, true ) end end addEventHandler ( "onPlayerChat", root, chatL ) مو مرتاح لـ كود البحث عن الكلمات احس فيه غلط صغير .. نفس الشيء Link to comment
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