Jump to content

اصلاح كود مضاد تغير النك


Quited

Recommended Posts

اصلاح كود مضاد تغير النك

    -- By [H.d]~|=Hassan.K.s.a~# 
-- Email : [email protected] 
  
outputChatBox("Anti Change Nick",getRootElement(),0,255,255,true) 
  
addEventHandler("onPlayerChangeNick",getRootElement(),function() 
    local dataChange = getElementData(source,"AntiNick") 
    if ( dataChange == 8 ) then 
    banPlayer(source, false, false, true, root, "Don't spam nick = ban 10 minutes", 600) 
else 
        setElementData(source,"AntiNick",10) 
        setTimer(setElementData,60000,1,source,"AntiNick",1) 
    end 
end) 
  
addEventHandler("onPlayerJoin",getRootElement(),function () 
    setElementData 

ابيه اذا غيرت نكي اكثر من 8 مرات بالسيرفر يصكني باند 10 دقايق

Link to comment

ابيه اذا غيرت نكي اكثر من 8 مرات بالسيرفر يصكني باند 10 دقايق

outputChatBox("Anti Change Nick", root,0,255,255,true) 
  
nTable = {} 
  
addEventHandler("onPlayerChangeNick", root, 
function() 
    if (nTable[source] or 0) >= 8 then 
        banPlayer(source, false, false, true, root, "Don't spam nick = ban 10 minutes", 600) 
    else 
        nTable[source] = (nTable[source] or 0) + 1 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, 
function() 
    nTable[source] = nil 
end) 

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...