Jump to content

Shoutall problem


Guest

Recommended Posts

Damn i tried that but nothing happened, maybe i wroted it with wrong

brother please

i wan't to change this code

        textItem = textCreateTextItem ( message, 0.5, 0.5, 2, 205, 0, 0, 255, 3, "center", "center" )

To this one

        dxDrawText(getPlayerName(player)..", message", 204, 36, 816, 557, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false)

But not working :/

Here is the full code 

function shout ( player, cmd, ... )
    local accountname = getAccountName ( getPlayerAccount ( player ) )
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then
        local message = table.concat ( { ... }," " )
		local name = getPlayerName(thePlayer)

        textDisplay = textCreateDisplay ( )
        dxDrawText(getPlayerName(player)..", message", 204, 36, 816, 557, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false)
        textDisplayAddText ( textDisplay, textItem )
        for _, thePlayer in ipairs ( getElementsByType ( "player" ) ) do
            textDisplayAddObserver ( textDisplay, thePlayer )
        end
        setTimer (
            function ( )
                textDestroyTextItem ( textItem )
                textDestroyDisplay ( textDisplay )
            end
            ,10000, 1
        )
        outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player)..": #ffffff"..message.."", root, 255, 255, 255, true)
    else
        outputChatBox ( "You cannot use this command!", player, 255, 12, 15 )
    end
end
addCommandHandler ( "shoutall", shout )

 

Link to comment
  • Moderators
1 minute ago, Hyper2 said:

Yeah, and my name appears on the screen

Font: bankgothic

Like 

Hyper2: Welcome everyone

I gonna make it, and send it to you.

(Max 30 mins, I have a little business to do, before it.)

Link to comment

Dude how to add wordwrap??

i changed this

        dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", ) 

To this

        dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", false, true, false, false, false) 

But nothing happened :o

Link to comment
  • Moderators
7 minutes ago, Hyper2 said:

Dude how to add wordwrap??

i changed this


        dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", ) 

To this


        dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", false, true, false, false, false) 

But nothing happened :o

dxDrawText(shoutText, screenX/4, screenY/4, screenX/4*3, screenY/4*3, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "top", false, true)

 

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