Mahmood Top Posted December 8, 2012 Posted December 8, 2012 local MutedSerial = {} addEventHandler("onPlayerChat", root, function(msg) if msg == "ممكن ادمنية" then local serial = getPlayerSerial(source) if MutedSerial[serial] then killTimer(MutedSerial[serial]) MutedSerial[serial] = nil end setPlayerMuted(source, true) outputChatBox(getPlayerName(source).." لقد حصل على ميوت 3دقايق", root, 255,0,0) MutedSerial[serial] = setTimer(function(serial) MutedSerial[serial] = nil for _,player in ipairs(getElementsByType('player')) do if getPlayerSerial(player) == serial and isPlayerMuted(player) then setPlayerMuted(player, false) outputChatBox(getPlayerName(player).." لقد تم فك الميوت عنك لا تعيدها", root, 255,0,0) end end end,160000,1,serial) end end) هذا كود اعطاء ميوت اذا احد طلب ادمنية او حتى اذا قال كلام مو زين بس الي ابغيه اذا احد قال هالكلام يحصل ميوت وتنحذف الكلمة من الشات
Tete omar Posted December 8, 2012 Posted December 8, 2012 مثال local type_ = {1, 2, 3} -- انواع الشات local badwords = {"test"} -- الكلمات السيئة addEventHandler("onPlayerChat",root, function( msg, Messagetype ) if ( Messagetype == type_[Messagetype] ) then -- اذا كان الشات أياً من انواع شات الام تي اي , مثال , /me for i, v in ipairs ( badwords ) do -- نجيب جميع الكلمات اللي بالجدول الي فوق if ( msg == v )then -- اذا كان الكلمة الي قالها من الكلممات في الجدول الي فوق cancelEvent() -- نغلق الحدث end end end end ) انا مو متآكد من المثال لاكن جربه , واكتب بالشات test
3NAD Posted December 8, 2012 Posted December 8, 2012 ^ مثآلكـ صعب على واحد مبتدئ -- مثال function Chatting ( theMessage, theType ) -- وظيفة جديدة if theMessage == "Mahmood Top" then -- إضافة شرط cancelEvent ( ) -- إلغاء الوظيفة / الحدث end -- إنهاء الشرط end -- إنهاء الوظيفة addEventHandler ( "onPlayerChat", root, Chatting ) -- ربط الوظيفة بـ الحدث
Tete omar Posted December 8, 2012 Posted December 8, 2012 ^ مثآلكـ صعب على واحد مبتدئ -- مثال function Chatting ( theMessage, theType ) -- وظيفة جديدة if theMessage == "Mahmood Top" then -- إضافة شرط cancelEvent ( ) -- إلغاء الوظيفة / الحدث end -- إنهاء الشرط end -- إنهاء الوظيفة addEventHandler ( "onPlayerChat", root, Chatting ) -- ربط الوظيفة بـ الحدث كلامك سليم , بعضهم ما يعرف للجداول انا ان شاء الله قريباً بسوي موضوع عن تعلم الجداول
==>ҭᾄlᾄl Posted December 8, 2012 Posted December 8, 2012 --By |Mr|TalaL|07| function mu(msg,type) local server = string.find(msg,"سيرفر") if ( type == 0 ) then if ( server ) then cancelEvent () setPlayerMuted(source,true) outputChatBox("تم صكك ميوت لمخالفتك القوانين",source,255,0,0) setTimer( function () setPlayerMuted(source,false) outputChatBox("تم فك الميوت الرجاء عدم مخالفة القوانين",source,255,0,0) end ,60000,1) end end end addEventHandler("onPlayerChat",getRootElement(),mu)
hassan.k.s.a Posted December 8, 2012 Posted December 8, 2012 --By |Mr|TalaL|07| function mu(msg,type) local server = string.find(msg,"سيرفر") if ( type == 0 ) then if ( server ) then cancelEvent () setPlayerMuted(source,true) outputChatBox("تم صكك ميوت لمخالفتك القوانين",source,255,0,0) setTimer( function () setPlayerMuted(source,false) outputChatBox("تم فك الميوت الرجاء عدم مخالفة القوانين",source,255,0,0) end ,60000,1) end end end addEventHandler("onPlayerChat",getRootElement(),mu) توه بسول فاتح موضوع . . ماخذ نص ساعه
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