Quited Posted December 7, 2013 Share Posted December 7, 2013 اصلاح كود مضاد تغير النك -- 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
TAPL Posted December 7, 2013 Share Posted December 7, 2013 ابيه اذا غيرت نكي اكثر من 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
Quited Posted December 7, 2013 Author Share Posted December 7, 2013 From "debugscript3" : ERROR: AC/server.lua:226: attempt to compare number with nil. 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