Jump to content

تصحيح كود


Recommended Posts

Posted

السلام عليكم ورحمة الله وبركاته

انا عندي مود تاجات جاهزه لزائر لاكن يكرر بشات مو مضبوط مع التاج ألأصلي

سيرفر

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

الي ابيه

اقدر اروح اغيره من المود

دون مايكرر بشات

ومشكورين مقدما

Posted

انت مكرر الايفينت

اكيد راح يكرر

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

حتى لو فصلت التاج الجاهز عن التاج ألأصلي يكرر

يعني لو خليت التاج ألأصلي مود لحاله

والتاج الي حق الزائر لحاله يكرر ماتفرق

Posted (edited)

تكرار الايفينت بهذي الطريقة حتى لو في مود ثاني

يسبب تكرار الشات

Edited by Guest

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

يعني كذا

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)  

Posted

المشكله مو من الفري روم ياعاقل المشكله من المود نفسه الفري روم مايكرر حاذف الكود الي يخليه يكرر المود يكرر

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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