z24d Posted August 9, 2015 Posted August 9, 2015 السلام عليكم بغيت اعدل علا مود العقرب حق الي يطفي الشات لكن ماعرفت من وين ابدأ ومن وين انتهي ابغاكم تقولولي وش اسوي عشان اخليه اذا مثلا سوا ديسابل للشات بس الكونسل يتكلم الكود -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(command) cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) if hasObjectPermissionTo ( command, "function.banPlayer" ) then addEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(command) if hasObjectPermissionTo ( command, "function.banPlayer" ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End *** -- ---------------------------- -- -- *** Script Code | THE - END -- -- ---------------------------- -- -- Love : Al3grab ;p
z24d Posted August 9, 2015 Author Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(command) cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) if hasObjectPermissionTo ( command, "function.banPlayer" ) then addEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(command,thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then return end if hasObjectPermissionTo ( command, "function.banPlayer" ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End *** مازبط
iMr.SFA7 Posted August 9, 2015 Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(mrsfa7,command) local accName = getAccountName ( getPlayerAccount ( mrsfa7 ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0 addEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(thePlayer,command) if hasObjectPermissionTo ( command, "function.banPlayer" ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End ***
z24d Posted August 9, 2015 Author Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(mrsfa7,command) local accName = getAccountName ( getPlayerAccount ( mrsfa7 ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0 addEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(thePlayer,command) if hasObjectPermissionTo ( command, "function.banPlayer" ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End *** مااشتغل
z24d Posted August 9, 2015 Author Posted August 9, 2015 WARNING: chat-disable/chatdisable.lua:21 Bad usage @'addEventHandler'['onPlayerChat' with this function is already handlel
iMr.SFA7 Posted August 9, 2015 Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(thePlayer,command) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",getRootElement(),chatDis) -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(thePlayer,command) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End ***
z24d Posted August 9, 2015 Author Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(thePlayer,command) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",getRootElement(),chatDis) -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(thePlayer,command) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End *** مره ثانية WARNING: chat-disable/chat-disable:21: Bad usage @ 'addEventHandler' ['onPlayerChat' with this function is already handled
iMr.SFA7 Posted August 9, 2015 Posted August 9, 2015 آمم جرب ذا الكود شغل السكربت وتكلم بالشات وانت موب كونسل شف تقدر ولا لا -- Server side function chatDis(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",root,chatDis)
z24d Posted August 9, 2015 Author Posted August 9, 2015 آمم جرب ذا الكود شغل السكربت وتكلم بالشات وانت موب كونسل شف تقدر ولا لا -- Server side function chatDis(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",root,chatDis) لا function chatDis(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",root,chatDis) -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(thePlayer,command) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End ***
iMr.SFA7 Posted August 9, 2015 Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(player,command) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console')) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",getRootElement(),chatDis) -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(player,command) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console')) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",root,255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End ***
z24d Posted August 9, 2015 Author Posted August 9, 2015 -- *** This Script By Al3grab 2011 *** -- *** IF You Are Editing The Script or installing it Dont Remove This Lines *** -- *** Al3grab 2011 - Chat Disable Script *** -- *** To Disable Chat Use Command : /cd *** -- *** To Enable Chat Use Command : /ce *** -- *** تم صنع المود بواسطة Al3grab 2011 *** -- *** عند تركيب المود أو تعديله الرجاء عدم إزالة هذه النصوص *** -- *** Al3grab 2011 - مود تعطيل الشات | منع اللاعبين من الكتابة في الشات *** -- *** لتعطيل الشات إكتب الأمر التالي : /cd *** -- *** لتشغيل الشات إكتب الأمر التالي : /ce *** -- --------------------------------- -- -- *** Script Code | Server-Side *** -- -- --------------------------------- -- -- *** Disabling Code | Start *** function chatDis(player,command) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console')) then cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) end end addEventHandler("onPlayerChat",getRootElement(),chatDis) -- *** Disabling Code | End *** -- *** Enabling Code | Start *** function chatEN(player,command) if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Console')) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",root,255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end -- *** Enabling Code | End *** -- *** Adding Commands | Start *** addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) -- *** Adding Commands | End *** ماضبط + الديبوق مايطلع شيء
terreus Posted August 9, 2015 Posted August 9, 2015 local Groups = { "Console", "Admin" } --قروبات مسموح تعطيل وفتح شات local GroupsSpek = { "Console", "Admin" } --قروبات التي تستطيع كتابة في شات بعد تعطيل شات function chatDis(command) cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) for k,p in ipairs ( GroupsSpek ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(p)) ) then addEventHandler("onPlayerChat",getRootElement(),chatDis) end end addCommandHandler("cd",chatDis) -- تعطيل شات function chatEN(command,thePlayer) for k,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end addCommandHandler("ce",chatEN) -- تفعيل شات
iMr.SFA7 Posted August 9, 2015 Posted August 9, 2015 صمت local Groups = { "Console", "Admin" } --قروبات مسموح تعطيل وفتح شات local GroupsSpek = { "Console", "Admin" } --قروبات التي تستطيع كتابة في شات بعد تعطيل شات function chatDis(player,command) cancelEvent() outputChatBox("*** THE CHAT IS DISABLED ***",source,255,0,0) for k,p in ipairs ( GroupsSpek ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(p)) ) then addEventHandler("onPlayerChat",getRootElement(),chatDis) end end addCommandHandler("cd",chatDis) -- تعطيل شات function chatEN(player,command) for k,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then outputChatBox("*** THE CHAT IS NOW ENABLED ***",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end addCommandHandler("ce",chatEN) -- تفعيل شات
z24d Posted August 9, 2015 Author Posted August 9, 2015 [17:53:25] SCRIPT ERROR: chat-disable\chat-disable.lua:23: 'end' expected (to close 'function' at line 15) near '' [17:53:25] ERROR: Loading script failed: chat-disable\chat-disable.lua:23: 'end' expected (to close 'function' at line 15) near ''
z24d Posted August 9, 2015 Author Posted August 9, 2015 ERROR: chat-disable\chat-disable.lua:9: attempt to concatenate a boolean value
The Killer Posted August 9, 2015 Posted August 9, 2015 local ChatStatus = false addCommandHandler ("chat", function (plr) if not isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (plr)), aclGetGroup ("Console")) then return outputChatBox ("You are not allowed to do this.", plr, 255, 0, 0) end if (ChatStatus == false) then ChatStatus = true outputChatBox ("Chat has been disabled.", plr, 255, 0, 0) else ChatStatus = false outputChatBox ("Chat has been enabled.", 0, 255, 0) end end ) addEventHandler ("onPlayerChat", root, function (text) if (ChatStatus == false) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) return end if (ChatStatus == true) then if isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (source)), aclGetGroup ("Console")) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) else outputChatBox ("Chat has been disabled.", source, 255, 0, 0) end end end )
z24d Posted August 9, 2015 Author Posted August 9, 2015 طفي مود التاج او ضيف الكود لموود التاج ماركبت مود تاج انا
The Killer Posted August 9, 2015 Posted August 9, 2015 local ChatStatus = false addCommandHandler ("chat", function (plr) if not isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (plr)), aclGetGroup ("Console")) then return outputChatBox ("You are not allowed to do this.", plr, 255, 0, 0) end if (ChatStatus == false) then ChatStatus = true outputChatBox ("Chat has been disabled.", plr, 255, 0, 0) else ChatStatus = false outputChatBox ("Chat has been enabled.", plr, 0, 255, 0) end end ) addEventHandler ("onPlayerChat", root, function (text) cancelEvent () if (ChatStatus == false) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) return end if (ChatStatus == true) then if isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (source)), aclGetGroup ("Console")) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) else outputChatBox ("Chat has been disabled.", source, 255, 0, 0) end end end )
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