S4MuEL Posted May 21, 2013 Share Posted May 21, 2013 آلسلآمم عليكمم آبي تصحيح لـ end هنآ .. لو يجي بآلتآيمر آند آصير متلخبط !! .. addEventHandler ( "onPlayerChat", root, function ( msg, msgType ) if ( msg == "" ) and ( msgType == 2 ) or ( msgType == 1 ) then setPlayerMuted(source,true) setTimer ( function() setPlayerMuted(source,false) end,15000,0) end end ) Link to comment
iMr.Dawix~# Posted May 21, 2013 Share Posted May 21, 2013 جرب addEventHandler ( "onPlayerChat", root, function ( msg, msgType ) if ( msg == "" ) and ( msgType == 2 ) or ( msgType == 1 ) then setPlayerMuted(source,true) setTimer (setPlayerMuted,15000,1,source,false) end end) Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 ناقصك بس تعرف الـ سورس بـ التايمر و التايمر لية متكرر؟ Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 (edited) يققلي لآزمم تغلقق آلـ if سطر 6 ! near setTimer Edited May 21, 2013 by Guest Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 -- # Server Side : addEventHandler ( "onPlayerChat", root, function ( msg, msgType ) if ( msg == "" and msgType == 1 or msgType == 2 ) then setPlayerMuted( source,true ) setTimer ( function ( source ) setPlayerMuted ( source,false ) end,15000,1,source ) end end ) Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 مآ آشتغل وضضففتهة للأدممينةة .. آبغآهه يعطي ميوت ل لآعب لمآ يكتب آي كلمةة , 15 ثآنيةة .. Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 -- # Server Side : addEventHandler ( "onPlayerChat", root, function ( _, msgType ) if ( msgType == 1 or msgType == 2 ) then setPlayerMuted( source,true ) setTimer ( function ( source ) setPlayerMuted ( source,false ) end,15000,1,source ) end end ) تأكد من نوع الشات msgType .. Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 آبيهة ع آلـ Say + Team ولآههنت ليش مآ آشتغل ذآ ؟ addEventHandler ( "onPlayerChat", root, function ( _, msgType ) if ( msgType == 1 or msgType == 2 ) then setPlayerMuted( source,true ) outputChatBox ( "#FF0000Wait 15 Seconds !", source, 255, 255, 255, true ) setTimer ( function ( source ) setPlayerMuted ( source,false ) end,5000,1,source ) end end ) Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 -- # Server Side : addEventHandler ( "onPlayerChat", root, function ( _, msgType ) if ( msgType == 0 or msgType == 2 ) then outputChatBox ( "#FF0000Wait 15 Seconds !", source, 255, 255, 255, true ) setPlayerMuted( source,true ) setTimer ( function ( source ) setPlayerMuted ( source,false ) end,15000,1,source ) end end ) Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 غيرت آلميوت .. وبغيتهة .. كآنسل آفنت .. يعني مثلآ لو كتبت بآلشآت آي شي .. يجي بآلشآت بس لو آكتب مرةة ثآنيةة بآلشآت يققلي وآيت .. وهكذآ , كل مآ آحآول آتكلم بآلشآت يققلي وآيت ! addEventHandler ( "onPlayerChat", root, function ( _, msgType ) if ( msgType == 0 or msgType == 2 ) then outputChatBox ( "#FFFF00Wait 15 Seconds !", source, 255, 255, 255, true ) cancelEvent() setTimer ( function ( ) cancelEvent() end,15000,1,source ) end end ) Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 كودكـ احس انة ماله معنى ودكـ تقولنا وش تحاول تسوي انتي فلود ؟ Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 زي سيرففر حرب آلعصآبآت .. لمآ تتكلمم بآلشآت !! Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 يوب , بس يظظل 15 ثآنيةة .. Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 getTickCount table "onPlayerChat" Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 تققريبآ آلكود حقق آلميوت كويسس .. بس آبيهة مآ يطلع you are muted بآلشآت .. بدآل ذي Wait ... Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 -- # Server Side : local TimeChecker = { } local TheLastMessage = { } addEventHandler("onPlayerChat",getRootElement(), function ( msg,type ) if ( type == 0 or type == 2 ) then if TimeChecker[source] and TimeChecker[source] + 15000 > getTickCount() then cancelEvent ( ) outputChatBox("Wait 15 Second !!",source,255,0,0) return else TimeChecker[source] = getTickCount() end if TheLastMessage[source] and TheLastMessage[source] == msg then cancelEvent ( ) outputChatBox("Stop Send The Same Message !?",source, 255, 0, 0) return else TheLastMessage[source] = msg end end end ) لم يتم التجربة .. Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 يققلي وآيت .. بس آلرسآلةة تططلع ! Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 تأكد انك مطفي الفري روم او التاج او اي شيء فية حدث الشات !؟ Link to comment
S4MuEL Posted May 21, 2013 Author Share Posted May 21, 2013 كويسس , ثآنكس , تممت آلإفآدةة ! 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