mouamle Posted June 2, 2015 Share Posted June 2, 2015 السلام عليكم سويت ذا الكود البسيط لما اللاعب يكتب شي يجيب اسمة ويحط قبلة كلمة Server ويسوي الكتابة حمرة addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'***') then kickPlayer ( source, "كلام ممنوع" ) else outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 231, 255, 10, true) end end ) بس الحين ابي اشيل الشات الرئيسي لأن اذا ما شلتة راح يطلع الكلام الي اللاعب كتبة مرتين كيف اشيلة ؟ Link to comment
TreKa Posted June 2, 2015 Share Posted June 2, 2015 وقف مود freeroam أو playercolors وجرب الكود هذه addEventHandler('onPlayerChat',root, function(msg) outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 255, 0, 0, true) end ) ليش كنت حاطط kickplayer وخارابيط؟ Link to comment
mouamle Posted June 2, 2015 Author Share Posted June 2, 2015 وقف مود freeroamأو playercolors وجرب الكود هذه addEventHandler('onPlayerChat',root, function(msg) outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 255, 0, 0, true) end ) ليش كنت حاطط kickplayer وخارابيط؟ لأن بدل ال *** كنت كاتب كلمات سب حتى لما اللاعب يسب ينطرد + طفيت ال Freeroam وبعدة يطلع الجات وكذلك playercolors وما صار شي Link to comment
The Don Posted June 2, 2015 Share Posted June 2, 2015 اعتقد قصدك زي كذا addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'***') then kickPlayer ( source, "كلام ممنوع" ) cancelEvent() else outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 231, 255, 10, true) end end ) Link to comment
TreKa Posted June 2, 2015 Share Posted June 2, 2015 وقف مود freeroamأو playercolors وجرب الكود هذه addEventHandler('onPlayerChat',root, function(msg) outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 255, 0, 0, true) end ) ليش كنت حاطط kickplayer وخارابيط؟ لأن بدل ال *** كنت كاتب كلمات سب حتى لما اللاعب يسب ينطرد + طفيت ال Freeroam وبعدة يطلع الجات وكذلك playercolors وما صار شي -- Server Side ! addEventHandler('onPlayerChat',root, function(msg) outputChatBox("Server: " .. getPlayerName( source ) .. "#ff0000 " .. msg, root, 255, 0, 0, true) cancelEvent() end ) Link to comment
Mr.R Posted June 2, 2015 Share Posted June 2, 2015 ^مشكورين طيب فيه طريقه احسن اذا بتحط اكثر من كلمه تسوي جدول وتحط فيه الكلمات وتسوي لوب Link to comment
mouamle Posted June 2, 2015 Author Share Posted June 2, 2015 ^مشكورين طيب فيه طريقه احسن اذا بتحط اكثر من كلمه تسوي جدول وتحط فيه الكلمات وتسوي لوب مشكلتي الوحيدة للحين ما اعرف استخدم الجدول مع اللوب بس أعرف اساسيات الجدول واعرف اساسيات اللوب Link to comment
Mr.R Posted June 2, 2015 Share Posted June 2, 2015 (edited) خل اللوب يولي مادري شدخله شطحت خذ الكود من جانب سيرفر Words = { ["حيوان"] = true, -- << تقدر تضيف كلام زياده تسوي نفس الشيء } addEventHandler ( "onPlayerChat", root, function ( msg ) local word = msg if ( Words[word] ) then cancelEvent ( ) outputChatBox ( "* تم صكك ميوت لكلامكـ السيء", source, 255, 0, 0, true ) setPlayerMuted ( source, true ) setTimer ( function ( ) setPlayerMuted ( source, false ) outputChatBox ( "#00FF00* تم فك الميوت والرجاء عدم تكرار الكلام السيء", source , 255, 255, 255, true ) end, 30000, 10, true ) -- هنا حط وقت الميوت الي تبيه end end ) Edited June 2, 2015 by Guest Link to comment
mouamle Posted June 2, 2015 Author Share Posted June 2, 2015 خل اللوب يولي مادري شدخله شطحتخذ الكود من جانب سيرفر Words = { ["حيوان"] = true, -- << تقدر تضيف كلام زياده تسوي نفس الشيء } addEventHandler ( "onPlayerChat", root, function ( msg ) local word = msg if ( Words[word] ) then cancelEvent ( ) outputChatBox ( "* تم صكك ميوت لكلامكـ السيء", source , 255, 0, 0, true ) setPlayerMuted ( source, true ) setTimer ( function ( ) setPlayerMuted ( source, false ) outputChatBox ( "#00FF00* تم فك الميوت والرجاء عدم تكرار الكلام السيء", source , 255, 255, 255, true ) end, 30000, 10, true ) -- هنا حط وقت الميوت الي تبيه end end ) وشكرا بس وش ذي ال true جنب الكلمة وش شغلها ؟ Link to comment
TreKa Posted June 2, 2015 Share Posted June 2, 2015 خل اللوب يولي مادري شدخله شطحتخذ الكود من جانب سيرفر Words = { ["حيوان"] = true, -- << تقدر تضيف كلام زياده تسوي نفس الشيء } addEventHandler ( "onPlayerChat", root, function ( msg ) local word = msg if ( Words[word] ) then cancelEvent ( ) outputChatBox ( "* تم صكك ميوت لكلامكـ السيء", source , 255, 0, 0, true ) setPlayerMuted ( source, true ) setTimer ( function ( ) setPlayerMuted ( source, false ) outputChatBox ( "#00FF00* تم فك الميوت والرجاء عدم تكرار الكلام السيء", source , 255, 255, 255, true ) end, 30000, 10, true ) -- هنا حط وقت الميوت الي تبيه end end ) وشكرا بس وش ذي ال true جنب الكلمة وش شغلها ؟ معنها ان الكلمة شغاله لو كانت False راح تكون عدمها مثل وجودها 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