Jump to content

مشكلة بمود سبام


Recommended Posts

سلام عليكم

معي مود سبام

لما يكرر يطلع رسالة والمفروض يمنع الرسالة انها تطلع

لكن الرسالة تطلع عادي وش المشكلة

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
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
4 hours ago, +Source|> said:

وش المشكله ؟

أولا return ماتفيد لحالها لانها بتوقف الاكواد وماتكمل تحت

يعني لو مو مسوي cancelEvent قبلها مالها فايده .

يعني مافرق شي بكودك بتبقى المشكله حتى لو دمجها مع التاجات . 

Link to comment
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
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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...