Jump to content

طلب كود رسالة الأدمن


Recommended Posts

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

دامكم بخير,,

طلبي بسيط مثل عنوانه

بس أنا سويت العاجل ما زبط

أبي بعد كلمة أدمن يجي أسم الأدمن اللي كتب العاجل

-- Server side

function check(thePlayer, commandName,...) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
    if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Console" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "abodi-only" ) ) then 
        local veve = {...} 
        local message = table.concat(veve, " ") 
        local getAdmin = getPlayerName(source) 
        triggerClientEvent("sora", getRootElement(),message) 
    end 
end 
addCommandHandler("Admin", check) 
  

-- Client side

function rdx(message) 
    removeEventHandler ( "onClientRender", getRootElement(), dx ) 
    function dx(source) 
  
        dxDrawText("Admin" .. getAdmin(source) .. ":",13.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(message,58.0,168.0,799.0,224.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
  
    end 
    addEventHandler("onClientRender", getRootElement(), dx) 
end 
addEvent("3azef", true ) 
addEventHandler("3azef", getRootElement(), rdx) 
bindKey("u", "down", "chatbox","Admin") 

أنا أدري أنه من حقوق سورا

بس حاب أعدل عليه تعديل بسيييط جداً

Admin تجيب أسم اللاعب بعد كلمة

Link to comment
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

--server side 
  
function check(thePlayer, commandName,...) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
    if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Console" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "abodi-only" ) ) then 
        local veve = {...} 
        local message = table.concat(veve, " ") 
        triggerClientEvent("3azef", getRootElement(),message) 
    end 
end 
addCommandHandler("Admin", check) 

--client side 
  
function rdx(message) 
    removeEventHandler ( "onClientRender", getRootElement(), dx ) 
    function dx(source) 
  
        dxDrawText("Admin" .. getPlayerName(source) .. ":",13.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(message,58.0,168.0,799.0,224.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
  
    end 
    addEventHandler("onClientRender", getRootElement(), dx) 
end 
addEvent("3azef", true ) 
addEventHandler("3azef", getRootElement(), rdx) 
bindKey("u", "down", "chatbox","Admin") 

Link to comment

local render = nil 
function rdx( message,getAdmin ) 
    if render == true then 
        removeEventHandler("onClientRender", getRootElement(), dx) 
    end 
    function dx(  ) 
        dxDrawText("Admin : " .. getAdmin .. ":",13.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(message,58.0,168.0,799.0,224.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
        render = true 
    end 
    addEventHandler("onClientRender", getRootElement(), dx) 
end 
addEvent("3azef", true ) 
addEventHandler("3azef", getRootElement(), rdx) 
bindKey("u", "down", "chatbox","Admin") 

function check(thePlayer, commandName,...) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
       if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Console" ) ) and isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "abodi-only" ) ) then 
        local veve = {...} 
        local message = table.concat(veve, " ") 
        local getAdmin = getPlayerName(thePlayer) 
        triggerClientEvent("3azef", getRootElement(),message,getAdmin) 
    end 
end 
addCommandHandler("Admin", check) 
  
  
Link to comment

المشكلة أنه ما يظهر العاجل

ذذذ

+

ممكن كود الكولور كوديد؟

colorCoded

يعني يقدر يكتب كذا

admin#ff00003azef: #F00443 مرحبا بكم في السيرفر ذذذ

ويكون ملون من المربعات

Link to comment

ما اظن تقدر تحط اكواد...,

بس جرب سويه كذآ,

function check(thePlayer, commandName,...) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
       if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Console" ) ) or isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "abodi-only" ) ) then 
        local veve = {...} 
        local message = table.concat(veve, " ") 
        local getAdmin = getPlayerName(thePlayer):gsub('#%x%x%x%x%x%x', '#070707') 
        triggerClientEvent("3azef", getRootElement(),message,getAdmin) 
    end 
end 
addCommandHandler("Admin", check) 

95 % ما راح يضبط...

Link to comment

الا أقدر

حطيت زي كذا زبط

dxDrawText("Admin  " .. getAdmin .. ":  #FFFFFF" .. message .. "",11.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,myFont,"left","top", false, false, true, true, false) 

بس مشكلتي واحدة ثانية

ليه بعد دقيقة كاملة يروح الدي أكس, وما عاد اقدر أكتب ثانياً الين ما أسوي ريستارت

Link to comment

يعني أخليه كذا؟

function rdx( message,getAdmin ) 
    function dx(  ) 
        myFont = dxCreateFont( "3NAD.ttf", 20 ) 
        dxDrawText("Admin  " .. getAdmin .. ":  #FFFFFF" .. message .. "",11.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,myFont,"left","top", false, false, true, true, false) 
        render = true 
    end 
    addEventHandler("onClientRender", getRootElement(), dx) 
end 
addEvent("3azef", true ) 
addEventHandler("3azef", getRootElement(), rdx) 
bindKey("u", "down", "chatbox","Admin") 

Link to comment
local render = nil 
function rdx( message,getAdmin ) 
    if render == true then 
        removeEventHandler("onClientRender", getRootElement(), dx) 
    render = nil     
    end 
    function dx(  ) 
        dxDrawText("Admin : " .. getAdmin .. ":",13.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) 
        dxDrawText(message,58.0,168.0,799.0,224.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) 
        render = true 
    end 
    addEventHandler("onClientRender", getRootElement(), dx) 
end 
addEvent("3azef", true ) 
addEventHandler("3azef", getRootElement(), rdx) 
bindKey("u", "down", "chatbox","Admin") 

نسيت اردهـ نيل

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