Jump to content

طلب فنكات بسيطة اذا ممكن


EH10

Recommended Posts

ممكن فنكشنات بسيطة اذا ممكن

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

Link to comment
ذا الكود كنت مسويه على ايام سيرفري البيس مود

عدل فيه نفس ماتبي

addEventHandler("onPlayerLogin", root, 
function () 
    if hasObjectPermissionTo(source,"function.kickPlayer",false) then 
        bindKey(source,"u","down","chatbox","AdminChat") 
    end 
end) 
  
addEventHandler("onResourceStart", resourceRoot, 
function () 
    for index, player in pairs(getElementsByType("player")) do 
        if hasObjectPermissionTo(player,"function.kickPlayer",false) then 
            bindKey(player,"u","down","chatbox","AdminChat") 
        end 
    end 
end) 
  
function onChat(player,_,...) 
    if hasObjectPermissionTo(player,"function.kickPlayer",false) then 
        local msg = table.concat({...}, " ") 
        local nick = getPlayerName(player) 
        for _, v in ipairs(getElementsByType("player")) do 
            if hasObjectPermissionTo(v,"function.kickPlayer",false) then 
                outputChatBox("(AdminChat) "..nick..": #ffffff"..msg,v,255,100,0,true) 
            end 
        end 
    end 
end 
addCommandHandler("AdminChat",onChat) 

Link to comment
ذا الكود كنت مسويه على ايام سيرفري البيس مود

عدل فيه نفس ماتبي

addEventHandler("onPlayerLogin", root, 
function () 
    if hasObjectPermissionTo(source,"function.kickPlayer",false) then 
        bindKey(source,"u","down","chatbox","AdminChat") 
    end 
end) 
  
addEventHandler("onResourceStart", resourceRoot, 
function () 
    for index, player in pairs(getElementsByType("player")) do 
        if hasObjectPermissionTo(player,"function.kickPlayer",false) then 
            bindKey(player,"u","down","chatbox","AdminChat") 
        end 
    end 
end) 
  
function onChat(player,_,...) 
    if hasObjectPermissionTo(player,"function.kickPlayer",false) then 
        local msg = table.concat({...}, " ") 
        local nick = getPlayerName(player) 
        for _, v in ipairs(getElementsByType("player")) do 
            if hasObjectPermissionTo(v,"function.kickPlayer",false) then 
                outputChatBox("(AdminChat) "..nick..": #ffffff"..msg,v,255,100,0,true) 
            end 
        end 
    end 
end 
addCommandHandler("AdminChat",onChat) 

حبيبي انا مابي جاهز ابي فنكشنات

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