Jump to content

بخصوص رسالة الادمن


Recommended Posts

انا معي مود رسالة الادمن تمام

بس عايز لما اكتب فيه يعمل صوت زي مكنت اكتب في شات ويطلع صوت ذا كود الصوت

-- # Server Side Only ! 
  
-- # Settings 
  
local Tables = {'Console'} -- هنإ القروبات الي تبيها يوم يكتب بالشات يطلع الصوت 
NumberSound = 33 
-- # Code By iMr_Om4r 
  
addEventHandler("onPlayerChat",root, function (msg) 
for i,v in ipairs ( Tables ) do 
if ( not isGuestAccount ( getPlayerAccount ( source ) ) ) then 
if ( isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(source)),aclGetGroup(v)) ) then 
playSoundFrontEnd ( root , 49 ) 
                                end 
                    end 
        end 
end 
) 

ودا كود رسالة الادمن

C.lua

local sX, sY = guiGetScreenSize () 
  
addEventHandler("onClientRender", root, function () 
    if ( getElementData ( resourceRoot, "Have_" ) == true ) then 
        local Lines = getChatboxLayout ()["chat_lines"] 
        if ( Lines <= 10 ) then 
            Lines = Lines + 1 
        elseif ( Lines >= 20 ) then 
            Lines = Lines - 1 
        else 
            Lines = Lines 
        end 
        if ( getElementData ( resourceRoot, "Msg_" ) == "delete" ) then 
            setElementData ( resourceRoot, "Have_", false ) 
        else 
            dxDrawText ( "A#ff0000dm#ffffffin [ ".. getElementData ( resourceRoot, "By_" ) .." #DD0000] #FFFFFF: " .. getElementData ( resourceRoot, "Msg_" ).. "", sX * 0.02, sY * 0.03 * Lines , sX, sY, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold", "left", "top", false, false, false, true, false ) 
        end 
    end 
end) 
bindKey("n", "down", "chatbox","AdminMsg") 

S.LUA

local Groups = { "Console", "Gta-Pro|4" } 
  
function isPlayerAdmin(player) 
    for k,v in ipairs ( Groups ) do 
        if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then 
            return true 
        end 
    end 
end 
  
addCommandHandler("AdminMsg", function ( player, cmd, ... ) 
    if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then 
        if ( isPlayerAdmin ( player ) ) then 
            local msg = {...} 
            local message = table.concat(msg, " ") 
            setElementData ( resourceRoot, "Have_", true ) 
            setElementData ( resourceRoot, "Msg_", message ) 
            if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then 
                setElementData ( resourceRoot, "By_", getElementData ( player, "Name" )) 
            else 
                setElementData ( resourceRoot, "By_", getPlayerName ( player )) 
            end 
        else 
            outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true) 
        end 
    else 
        outputChatBox("* Please Login !", player, 255, 0, 0, true) 
    end 
end) 
  
  

Link to comment

-- # Server Side Only ! 
  
-- # Settings 
  
local Tables = {'Console'} -- هنإ القروبات الي تبيها يوم يكتب بالشات يطلع الصوت 
NumberSound = 33 
-- # Code By iMr_Om4r 
  
addEventHandler("onPlayerChat",root, function (msg) 
for i,v in ipairs ( Tables ) do 
if ( not isGuestAccount ( getPlayerAccount ( source ) ) ) then 
if ( isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(source)),aclGetGroup(v)) ) then 
playSoundFrontEnd ( root , 49 ) 
                                end 
                    end 
        end 
end 
) 

دا كود لما اكتب في شات يطلع صوت عايز بدل ميكون بشات العام يكون في كود العاجل اللي فوق اعمل ايه براحة شوية عليا

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