Jump to content

تعديل كود


Dr.Xen

Recommended Posts

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

اخواني ممكن تعدلوو الكود ..

الكود ذي لمن اكتب يجي في نص الشاشة ابي يكون تحت

function shout(player, cmd, ...) 
local accountname = getAccountName(getPlayerAccount(player)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ))  then 
for id, players in ipairs(getElementsByType("player")) do 
local message = table.concat({...}," ") 
local textDisplay = textCreateDisplay () 
local nombre = getPlayerName(player) 
local textItem = textCreateTextItem( ""..message, 0.5, 0.5, 2, 205, 0, 0, 255, 3, "center", "center" ) 
textDisplayAddText ( textDisplay, textItem ) 
textDisplayAddObserver ( textDisplay, players ) 
setTimer ( textDestroyTextItem, 5000, 1, textItem ) 
setTimer ( textDestroyDisplay, 5000, 1, textDisplay ) 
end 
else 
outputChatBox("You cannot use this command!",player,255,12,15) 
    end 
end 
  
addCommandHandler("shout", shout) 
--Credits to SolidSnake14 for help. 

ابيهم جاهزهه لأهنتووا

Link to comment
function shout( player, cmd, ... ) 
    local accountname = getAccountName( getPlayerAccount( player ) ) 
    if isObjectInACLGroup( "user." .. accountname, aclGetGroup( "Admin" ) )  then 
        for id, players in ipairs( getElementsByType( "player" ) ) do 
            local message = table.concat( { ... }, " " ) 
            local textDisplay = textCreateDisplay( ) 
            local nombre = getPlayerName( player ) 
            local textItem = textCreateTextItem( message, 0.5, 0.9, 2, 205, 0, 0, 255, 3, "center", "center" ) 
            textDisplayAddText( textDisplay, textItem ) 
            textDisplayAddObserver( textDisplay, players ) 
            setTimer( textDestroyTextItem, 5000, 1, textItem ) 
            setTimer( textDestroyDisplay, 5000, 1, textDisplay ) 
        end 
    else 
        outputChatBox( "You cannot use this command!", player, 255, 12, 15 ) 
    end 
end 
  
addCommandHandler( "shout", shout ) 
--Credits to SolidSnake14 for help. 

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