][Black-Heart][ Posted March 12, 2013 Share Posted March 12, 2013 ممكن سؤآل ؟ # فين الخطأ ! g_Root = getRootElement() local chatTime = {} local lastChatMessage = {} klamSB = {"ابوك", "اختك"} klamNSHR = {"سيرفر", "البحث", "توزيع", "مشرف", "بسيرفر", "اكتب", "آكتب", "حياكم", "حيااكم", "حيآكم", "لايفوتكم", "حصريات", "أكتب"} addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("*[server]:#00cc00 لا تكرر كلام بالشات الله لا يهينك ..", source, 255, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("#ff0000[server]: #00ff00 لا تكرر نفس السطر مرتين ما عليك نعرف نقرأ ..", source, 255, 255, 0 ) return else lastChatMessage[source] = msg end for k,v in ipairs (klamSB) do if string.find(msg,v) then cancelEvent() return outputChatBox("*#00bbcc[server] : #0000ffمَا يَلْفِظُ مِن قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ } سورة ق الآية 18 } ..", source, 255, 255, 0 ) end end for k,v in ipairs (klamNSHR) do if string.find(msg,v) then cancelEvent() return outputChatBox("*#ff00ff[server] : #a000ff لآتحآول النشر لو سمحت ..", source, 255, 255, 0 ) end end end end end ) lولكم جزيل الشكر Link to comment
][Black-Heart][ Posted March 12, 2013 Author Share Posted March 12, 2013 من وين ناقل هالكود؟ ليه !؟ Link to comment
Tete omar Posted March 12, 2013 Share Posted March 12, 2013 لأننا ما نساعد الا اذا كان الكود من صنعك انت Link to comment
][Black-Heart][ Posted March 12, 2013 Author Share Posted March 12, 2013 لاننا ما نساعد الا اذا كان الكود من صنعك انت ><" مع التاج g_Root = getRootElement() local chatTime = {} local lastChatMessage = {} klamSB = {"كس", "خنيث", "قحبة", "جرار", "قواد", "منيوك", "زب", "طيز", "وصخ", "جدتك", "جدك", "حمار", "تبن", "يلعنك", "خرا", "زق", "كلب", "نقلع", "شرموط", "امك", "زبي", "انيك", "ابوك", "اختك"} klamNSHR = {"سيرفر", "البحث", "توزيع", "مشرف", "بسيرفر", "اكتب", "آكتب", "حياكم", "حيااكم", "حيآكم", "لايفوتكم", "حصريات", "أكتب"} addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("[server]: لا تكرر كلام بالشات الله لا يهينك ..", source, 255, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("[server]: لا تكرر نفس السطر مرتين ما عليك نعرف نقرأ ..", source, 255, 255, 0 ) return else lastChatMessage[source] = msg end for k,v in ipairs (klamSB) do if string.find(msg,v) then cancelEvent() return outputChatBox("*[server] : مَا يَلْفِظُ مِن قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ } سورة ق الآية 18 } ..", source, 255, 255, 0 ) end end for k,v in ipairs (klamNSHR) do if string.find(msg,v) then cancelEvent() return outputChatBox("*[server] : لآتحآول النشر لو سمحت ..", source, 255, 255, 0 ) end end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#C11B17-[ Administrator ]- " .. getPlayerName ( source ) .."#FFFFFF : "..msg , g_Root, r, g, b, true ) outputServerLog("CHAT: -[Administrator]- " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin2")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#dd0000-[ Super Admin ]- " .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [super Admin] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("msol")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#00FF00-[ Supervisor ]- " .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [supervisor] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#777777-[ Admin Plus ]- " .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [Admin plus] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin1")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#ff0000-[ Admin ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [Admin] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#00cc11-[ SuperMod ]- " .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [sM] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099DC-[ Mod ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [M] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#999999-[ V I .P ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [VIP] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Vote")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#7F5A58-[ Befor Mod ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [VOTE] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("KingDrift")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFF00-[ رئيس الشرطه ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [KING] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator2")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#2554C7-[ Mod Plus ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [Admins] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator2")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#259117-[ SuperMod Plus ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [Admins] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("time")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFA500-[ Best Player ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [No] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099cc-[ Cop ]- " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [police] " .. getPlayerName ( source ) .. ": " .. msg) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("454545")) then local r, g, b = getPlayerNametagColor(source) outputChatBox("#ffff00* [ " .. Player .. " ] #FF0000( #FFFFFF" .. getPlayerName ( source ) .. " #FF0000) #FFFFFF: " .. msg, g_Root, r, g, b, true ) outputServerLog("CHAT: [Player] " .. getPlayerName ( source ) .. ": " .. msg) elseif type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( " " .. getPlayerName ( source ) .. ":#ffFFff " .. msg, g_Root, r, g, b, true ) outputServerLog( "CHAT: " .. getPlayerName ( source ) .. ": " .. msg ) end end end ) حذفت التاج م اشتغل ><" g_Root = getRootElement() local chatTime = {} local lastChatMessage = {} klamSB = {"كس", "خنيث", "قحبة", "جرار", "قواد", "منيوك", "زب", "طيز", "وصخ", "جدتك", "جدك", "حمار", "تبن", "يلعنك", "خرا", "زق", "كلب", "نقلع", "شرموط", "امك", "زبي", "انيك", "ابوك", "اختك"} klamNSHR = {"سيرفر", "البحث", "توزيع", "مشرف", "بسيرفر", "اكتب", "آكتب", "حياكم", "حيااكم", "حيآكم", "لايفوتكم", "حصريات", "أكتب"} addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("[server]: لا تكرر كلام بالشات الله لا يهينك ..", source, 255, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("[server]: لا تكرر نفس السطر مرتين ما عليك نعرف نقرأ ..", source, 255, 255, 0 ) return else lastChatMessage[source] = msg end for k,v in ipairs (klamSB) do if string.find(msg,v) then cancelEvent() return outputChatBox("*[server] : مَا يَلْفِظُ مِن قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ } سورة ق الآية 18 } ..", source, 255, 255, 0 ) end end for k,v in ipairs (klamNSHR) do if string.find(msg,v) then cancelEvent() return outputChatBox("*[server] : لآتحآول النشر لو سمحت ..", source, 255, 255, 0 ) end end end end end ) آسف ع الإزعآج أتمنى حذف الموضوع Link to comment
Tete omar Posted March 12, 2013 Share Posted March 12, 2013 انا ما قلت ابي الكود كامل, انا يمديني اعطيك مثال بسيط لاكن ما اساعد الا اذا تأكدت ان هذا كودك انت, اذا تبي مثال, انا ما خرجت ... Link to comment
][Black-Heart][ Posted March 12, 2013 Author Share Posted March 12, 2013 انا ما قلت ابي الكود كامل, انا يمديني اعطيك مثال بسيط لاكن ما اساعد الا اذا تأكدت ان هذا كودك انت, اذا تبي مثال, انا ما خرجت ... الكود مو من صنعي بس انا حبيت اخليه بدون تاج لان التاج كله اخطاء ووووبس واسفين ع الإزعآج Link to comment
Recommended Posts