Jump to content

تصحيح كود


Recommended Posts

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

شباب سويت كود مشان اي ادمن يجي قبله شعار

كانه تاغ ، مثل حق حرب العصابات تجي [Gta-Ar]

قبل اسم الادمن

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

( تراني مقتبس شوي من التاغ العادي )

local root = getRootElement() 
  
function chatbox(text, msgtype) 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
 cancelEvent() 
    if hasObjectPermissionTo( player, "general.adminpanel", false ) then 
        outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
        end 
         
addEventHandler("onPlayerChat", root, chatbox)   

بلييز ممكن الحل

و شكرا ^^

Edited by Guest
Link to comment
    function chatbox(text, msgtype) 
        local name = getPlayerName(source) 
        if hasObjectPermissionTo( source, "general.adminpanel", false ) then 
            outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
            end 
    end 
            
    addEventHandler("onPlayerChat", root, chatbox)   

Link to comment

جرب ذا

addEventHandler("onPlayerChat",root, 
    function (msg,type) 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) and type == 0 then 
            local name = getPlayerName(source) 
            cancelEvent() 
            outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 ",root,255,0,0,true) 
        end 
    end 
) 
  

Link to comment

لا مو شغال ذا الثاني

سويته كذا صار ما يكرر

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

        function chatbox(text, msgtype) 
            local account = getAccountName(getPlayerAccount(source)) 
            local name = getPlayerName(source) 
        cancelEvent()  --- هنا الاضافة 
            if hasObjectPermissionTo( source, "general.adminpanel", false ) then 
                outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
                end 
        end 
                
        addEventHandler("onPlayerChat", root, chatbox)   

Link to comment
function chatbox(text, msgtype) 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
    cancelEvent()  --- هنا الاضافة 
    if hasObjectPermissionTo( source, "general.adminpanel", false ) then 
    outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
    else 
    outputChatBox("#FF0000#FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
    end 
end 
addEventHandler("onPlayerChat", root, chatbox) 

جرب

Link to comment

جرب ذا

function chatbox(text, msgtype) 
            local account = getAccountName(getPlayerAccount(source)) 
            local name = getPlayerName(source) 
        cancelEvent()  --- هنا الاضافة 
            if hasObjectPermissionTo( source, "general.adminpanel", false ) then 
                outputChatBox("#FF0000x[M.H] #FFFFFF#ffffff" .. name .. ":#919191 " .. text, root, 255, 255, 255, true) 
                else 
                    outputChatBox("" .. name .. ": " .. text,root,255,0,0,true) 
                end 
        end 
                
        addEventHandler("onPlayerChat", root, chatbox) 

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