w7sH Posted April 11, 2017 Share Posted April 11, 2017 (edited) السلام عليكم ورحمة الله وبركاتة كيف حالكم اليوم أبي منكم طلب ومساعدة في كود التاقات حقي لاهنتم عندي مود التاقات اذا كان واحد يحمل أو ماسجل مايظهر له تاق ما أدري وش المشكله + أبي اذا كان واحد يحمل يظهر له تاق خاص به واذا كان محمل ومخلص يظهر له تاق حق رتبت Everyone والمشكله الثانية ابي أضيف له منع التكرار يعني يكون فيه سبام اذا احد رسل يقول له أنتظر 5 ثواني عشان يرسل رسالة ثانيه بس رتبت الكونسل ما أبي عليها أنتظار وباقي الرتب يكون فيها أنتظار أبي مساعدكم لاهنتم هذا كود كلنكت. function chatbox( text, type) if type == 2 then return end local acc = getPlayerAccount(source) if ChatDisabled then if not isGuestAccount ( acc ) then if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then outputChatBox ( "No.", source, 255, 150, 0, true ) cancelEvent ( ) return end else outputChatBox ( "No.", source, 255, 150, 0, true ) cancelEvent() return end end if isGuestAccount ( acc ) then return end local customTag = getAccountData ( acc, "customTag" ) if customTag then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(customTag.." " .. getPlayerName ( source ) .. ":#ffFFff " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: "..customTag.." " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox((getElementData(source,"teamColor") or "#ff0000").."* #FF0000[ Console#FF0000 ] " .. getPlayerName ( source ) .. ":#cccccc " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [ Console ] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Big.Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox((getElementData(source,"teamColor") or "#CC0000").."*#CC0000 [ Big.Admin ] " .. getPlayerName ( source ) .. ":#FFCC00 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [ Big.Admin ] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox((getElementData(source,"teamColor") or "#cccccc").."*#cccccc [ #ffffff" .. getPlayerName ( source ) .. " #cccccc]:#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [ Everyone ] " .. getPlayerName ( source ) .. ": " .. text) end end ) Edited April 11, 2017 by w7sH Link to comment
#BrosS Posted April 11, 2017 Share Posted April 11, 2017 محلاولتك اين هي لأني شايف نسخ لصق من مود ثاني تحقق اذا اللاعب مو مسجل يسوي له تاق Downloading Link to comment
w7sH Posted April 11, 2017 Author Share Posted April 11, 2017 جربت كذا كود ماضبط معي اذا معك شي عطني وانا احاول ولا تنسى السبام والإنتظار بالش Link to comment
Adham Posted April 11, 2017 Share Posted April 11, 2017 عندي , فكره لك هذا الكود انا مسويه : سرفر: function Download ( msg,color) local Data = getElementData ( source, "Download" ) if Data then outputChatBox('#666666(Downloading..) '.. getPlayerName(source) .. '#ffffff : '.. msg,root, r, g, b, true) return cancelEvent() end end addEventHandler ( "onPlayerChat",root, Download ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "Download", true ) end ) addEventHandler ( "onPlayerLogin", root, function ( ) setElementData ( source, "Download", false ) end ) اذا الاعب دخل السرفر تعطيه تاق داونلود ولما يسجل الدخول يشيل منه التاق بالتوفيق . 2 Link to comment
w7sH Posted April 11, 2017 Author Share Posted April 11, 2017 بيض الله وجهك .. بس تقدر تحطي لي فيه أنتظار فالشات عشان مايقدر يكرر أنتظار 6 ثواني Link to comment
N3xT Posted April 12, 2017 Share Posted April 12, 2017 جرب هالكود حصلته عندي local antiSpam = {} function Download ( msg,color) local Data = getElementData ( source, "Download" ) if ( Data ) then if isElement(antiSpam[source]) then outputChatBox("Stop spamming.",source, 255, 0, 0, true) return cancelEvent() end createAntiSpam(source, 10000) outputChatBox('#666666(Downloading..) '.. getPlayerName(source) .. '#ffffff : '.. msg,root, r, g, b, true) return cancelEvent() end end addEventHandler ( "onPlayerChat",root, Download ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "Download", true ) end ) addEventHandler ( "onPlayerLogin", root, function ( ) setElementData ( source, "Download", false ) end ) function createAntiSpam ( element, antiTime ) if ( element ) and ( getElementType(element) == "player" ) then if isElement(antiSpam[element]) then return end antiSpam[element] = true setTimer ( function() if isElement(antiSpam[element]) then antiSpam[element] = false destroyElement(antiSpam[element]) end end, tonumber(antiTime), 1 ) end end Link to comment
w7sH Posted April 12, 2017 Author Share Posted April 12, 2017 جزاك الله خير بس أنا ابي الطريقة على مود التاقات لان الاغلبية يكررون 1 Link to comment
w7sH Posted April 13, 2017 Author Share Posted April 13, 2017 اللي عطيتني ماهو شغال حق السبام نفس الاول .. وتقدر تجربه بنفسك Link to comment
Abdul KariM Posted April 13, 2017 Share Posted April 13, 2017 local aTimer = { } function onPlayerChat_ ( aMsg , aType ) local isPlayerLogin = isGuestAccount ( getPlayerAccount ( source ) ) if ( isPlayerLogin ) then if ( isTimerPlayer ( source ) ) then outputChatBox("Stop spamming.",source, 255, 0, 0, true) return cancelEvent ( ) end setTimerPlayer ( source , 10000 ) outputChatBox('#666666(Downloading..) '.. getPlayerName(source) .. '#ffffff : '.. aMsg,root, r, g, b, true) return cancelEvent ( ) end end addEventHandler ( "onPlayerChat",root, onPlayerChat_ ) function isTimerPlayer ( player ) return isTimer ( aTimer [ player ] ) end function setTimerPlayer ( element , aTimer_ ) if ( getElementType( element ) ~= "player" ) then return end if ( isTimerPlayer ( element ) ) then return end aTimer [ element ] = setTimer( function ( ) end , aTimer_ , 1 ) end addEventHandler ( "onPlayerQuit" , root , function ( ) if ( aTimer [ source ] ) then aTimer [ source ] = nil end end ) 2 Link to comment
w7sH Posted April 15, 2017 Author Share Posted April 15, 2017 تُشكرون تم إضافة كود قديم من عندي وضبط مشكورين لجهودكم. 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