Mr.Mostafa Posted June 21, 2018 Share Posted June 21, 2018 سلام عليكم معي مود سبام لما يكرر يطلع رسالة والمفروض يمنع الرسالة انها تطلع لكن الرسالة تطلع عادي وش المشكلة 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("لا تحاول تكرر الكلام في الشات", source, 166, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("لا تكرر نفس السطر مرتين", source, 166, 255, 0 ) return else lastChatMessage[source] = msg end end end ) Link to comment
Mr.Mostafa Posted June 21, 2018 Author Share Posted June 21, 2018 4 minutes ago, N3xT said: ضيف بعد الريتورن cancelEvent() نفس المشكلة لازم دمج مع مود التاجات ؟ Link to comment
MR_Mahmoud Posted June 22, 2018 Share Posted June 22, 2018 6 hours ago, Mr.Mostafa said: سلام عليكم معي مود سبام لما يكرر يطلع رسالة والمفروض يمنع الرسالة انها تطلع لكن الرسالة تطلع عادي وش المشكلة 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("لا تحاول تكرر الكلام في الشات", source, 166, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("لا تكرر نفس السطر مرتين", source, 166, 255, 0 ) return else lastChatMessage[source] = msg end end end ) !كودك شغال + اذا كنت تقصد انها تطلع فوق الاعب اعتقد مايصيرتمنع انها تطلع بس في الشات لما يكرر مايظهر Link to comment
^iiEcoo'x_) Posted June 22, 2018 Share Posted June 22, 2018 ما ينفع الريتورن بالإيفنت ! 1 Link to comment
Rakan# Posted June 22, 2018 Share Posted June 22, 2018 لازم تضيفها بمود التاجات مع cancelEvent() Link to comment
Mr.Mostafa Posted June 22, 2018 Author Share Posted June 22, 2018 5 hours ago, Rakan# said: لازم تضيفها بمود التاجات مع cancelEvent() بداتا طيب ولا كيف Link to comment
+Source|> Posted June 22, 2018 Share Posted June 22, 2018 8 hours ago, Mr.Mostafa said: بداتا طيب ولا كيف حطه بنفس المود حق تاجات وسوي if -- then return end Link to comment
^iiEcoo'x_) Posted June 22, 2018 Share Posted June 22, 2018 2 hours ago, +Source|> said: حطه بنفس المود حق تاجات وسوي if -- then return end إقرا فوق .. Link to comment
+Source|> Posted June 22, 2018 Share Posted June 22, 2018 56 minutes ago, #_iMr,[E]coo said: إقرا فوق .. وش المشكله ؟ Link to comment
Rakan# Posted June 23, 2018 Share Posted June 23, 2018 4 hours ago, +Source|> said: وش المشكله ؟ أولا return ماتفيد لحالها لانها بتوقف الاكواد وماتكمل تحت يعني لو مو مسوي cancelEvent قبلها مالها فايده . يعني مافرق شي بكودك بتبقى المشكله حتى لو دمجها مع التاجات . Link to comment
+Source|> Posted June 23, 2018 Share Posted June 23, 2018 15 minutes ago, Mr.Mostafa said: وش الحل طيب جيب مود تاجاتك في الخاص واعدله لك Link to comment
Mr.Mostafa Posted June 23, 2018 Author Share Posted June 23, 2018 2 minutes ago, +Source|> said: جيب مود تاجاتك في الخاص واعدله لك if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox) Link to comment
+Source|> Posted June 23, 2018 Share Posted June 23, 2018 4 minutes ago, Mr.Mostafa said: if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox) chatSpaming = {} if get("*chat/blockRepeatMessages") == "true" and chatSpaming[source] and chatSpaming[source] == text then outputChatBox( " [ Spam ]#ff0000 لا تكرر " , source,225,170,90, true) playSoundFrontEnd( source, 45 ) return else chatSpaming[source] = text end if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox) addEventHandler("onPlayerQuit",root, function() if chatSpaming[source] then chatSpaming[source] = nil end end ) META <setting name="*chat/blockRepeatMessages"value="true"/> Link to comment
Mr.Mostafa Posted June 23, 2018 Author Share Posted June 23, 2018 10 minutes ago, +Source|> said: chatSpaming = {} if get("*chat/blockRepeatMessages") == "true" and chatSpaming[source] and chatSpaming[source] == text then outputChatBox( " [ Spam ]#ff0000 لا تكرر " , source,225,170,90, true) playSoundFrontEnd( source, 45 ) return else chatSpaming[source] = text end if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox) addEventHandler("onPlayerQuit",root, function() if chatSpaming[source] then chatSpaming[source] = nil end end ) META <setting name="*chat/blockRepeatMessages"value="true"/> ما اشتغل Link to comment
Rakan# Posted June 23, 2018 Share Posted June 23, 2018 36 minutes ago, Mr.Mostafa said: ما اشتغل اطرح الاكواد الخاصه بالتاجات كامله !!!! Link to comment
Mr.Mostafa Posted June 23, 2018 Author Share Posted June 23, 2018 4 minutes ago, Rakan# said: اطرح الاكواد الخاصه بالتاجات كامله !!!! هي دي Link to comment
Rakan# Posted June 23, 2018 Share Posted June 23, 2018 لا مو ذي مكتوب بالايفنت فاكشن chatbox وين ذا الفاكشن ؟ 1 minute ago, Mr.Mostafa said: هي دي Link to comment
Mr.Mostafa Posted June 23, 2018 Author Share Posted June 23, 2018 function chatbox(text, msgtype) chatSpaming = {} if get("*chat/blockRepeatMessages2") == "true" and chatSpaming[source] and chatSpaming[source] == text then outputChatBox( " [ Spam ]#ff0000 لا تكرر " , source,225,170,90, true) playSoundFrontEnd( source, 45 ) return else chatSpaming[source] = text end if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox) 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