Joker_Mta Posted October 2, 2012 Share Posted October 2, 2012 السلام عليكم ورحمة الله وبركاته انا عندي مود تاجات جاهزه لزائر لاكن يكرر بشات مو مضبوط مع التاج ألأصلي سيرفر addEventHandler("onResourceStart", resourceRoot, function() for index, player in ipairs(getElementsByType("player")) do setElementData( player, "n.tag", "••♥زائر♥••" ) end end ) addEventHandler( "onPlayerJoin",root, function( ) setElementData( source, "n.tag", "••♥زائر♥••" ) end ) addEvent("change1", true) function changename( thePlayer, tag) if ( not tag ) then return end local newtag = tag setElementData ( thePlayer, "n.tag", newtag ) outputChatBox ("التاج الجديد: ".. newtag, thePlayer,0,255,0,true ) end addEventHandler("change1", root, changename) function chat( msg, type ) if (type == 0 and getElementData( source, "n.tag" ) ~= false) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox ("#0000FF" .. tostring(getElementData( source, "n.tag" )) .. " ".. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end end addEventHandler("onPlayerChat", root, chat ) local root = getRootElement() function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000[Admin]#ff0000#ff0000" .. name .. ":#bbbbbb " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("HeadAdmin")) then outputChatBox("#FF0000[HeadAdmin]#FFFFFF#ff0000" .. name .. ":#bbbbbb " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then outputChatBox("#0000cd[HeadModerator]#0000cd#ff0000" .. name .. ":#ff0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#ff7400[superModerator]#00FFFF#ff0000" .. name ..":#CC0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#00FF00[Moderator]#FF00FF#ff0000" .. name .. ":#CC0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#00FFFF" .. name .. ":" .. text, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chatbox) اريده يكون للكل لاكن مايكرر بشات يعني مثل انا تاجي ألأصلي Admin الي ابيه اقدر اروح اغيره من المود دون مايكرر بشات ومشكورين مقدما Link to comment
abu5lf Posted October 2, 2012 Share Posted October 2, 2012 انت مكرر الايفينت اكيد راح يكرر Link to comment
Joker_Mta Posted October 2, 2012 Author Share Posted October 2, 2012 حتى لو فصلت التاج الجاهز عن التاج ألأصلي يكرر يعني لو خليت التاج ألأصلي مود لحاله والتاج الي حق الزائر لحاله يكرر ماتفرق Link to comment
Mr.T9 Posted October 2, 2012 Share Posted October 2, 2012 وش نوع القيم مود اللي انت حاطه ؟ Link to comment
3NAD Posted October 2, 2012 Share Posted October 2, 2012 هو السبب freeroam ممكن يكون الـ Link to comment
abu5lf Posted October 2, 2012 Share Posted October 2, 2012 (edited) تكرار الايفينت بهذي الطريقة حتى لو في مود ثاني يسبب تكرار الشات Edited October 2, 2012 by Guest Link to comment
Joker_Mta Posted October 2, 2012 Author Share Posted October 2, 2012 يعني كذا addEventHandler("onResourceStart", resourceRoot, function() for index, player in ipairs(getElementsByType("player")) do setElementData( player, "n.tag", "••♥زائر♥••" ) end end ) addEventHandler( "onPlayerJoin",root, function( ) setElementData( source, "n.tag", "••♥زائر♥••" ) end ) addEvent("change1", true) function changename( thePlayer, tag) if ( not tag ) then return end local newtag = tag setElementData ( thePlayer, "n.tag", newtag ) outputChatBox ("التاج الجديد: ".. newtag, thePlayer,0,255,0,true ) end addEventHandler("change1", root, changename) local root = getRootElement() function chatbox(text, msgtype) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) cancelEvent() if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000[Admin]#ff0000#ff0000" .. name .. ":#bbbbbb " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("HeadAdmin")) then outputChatBox("#FF0000[HeadAdmin]#FFFFFF#ff0000" .. name .. ":#bbbbbb " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then outputChatBox("#0000cd[HeadModerator]#0000cd#ff0000" .. name .. ":#ff0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#ff7400[superModerator]#00FFFF#ff0000" .. name ..":#CC0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#00FF00[Moderator]#FF00FF#ff0000" .. name .. ":#CC0000 " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#00FFFF" .. name .. ":" .. text, root, 255, 255, 255, true) end end function chat( msg, type ) if (type == 0 and getElementData( source, "n.tag" ) ~= false) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox ("#0000FF" .. tostring(getElementData( source, "n.tag" )) .. " ".. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end end addEventHandler("onPlayerChat", root, chatbox, chat) .؟ Link to comment
Mr.T9 Posted October 2, 2012 Share Posted October 2, 2012 ماتوقع من نفس التاج ا هو السبب freeroam ممكن يكون الـ Link to comment
Joker_Mta Posted October 2, 2012 Author Share Posted October 2, 2012 المشكله مو من الفري روم ياعاقل المشكله من المود نفسه الفري روم مايكرر حاذف الكود الي يخليه يكرر المود يكرر Link to comment
MR.S3D Posted October 2, 2012 Share Posted October 2, 2012 المود لي وياليت انك ماتسوي فاهم وتنزل الكودات يغلق!!!!! Link to comment
Joker_Mta Posted October 2, 2012 Author Share Posted October 2, 2012 المود لك ماقلت انه لي لاكن بغيته مايكرر Link to comment
Recommended Posts