Jump to content

[Help] Chatbox Script, index


opnaiC

Recommended Posts

Hi guys,

I made a chatbox script myself and all is working perfectly with no errors or warnings in /debugscript 3. I am using a table to save the messages that will be displayed in the chatbox. This is how a part of it looks like:

local chatBox = {}

function drawChat()
    for i,v in ipairs (chatBox) do
	    if i < 15 then
	        dxDrawBorderedText(v, 27, 229 - 15*i, 582, 230, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, false, false, false)
		end
	end
end
addEventHandler("onClientRender", root, drawChat)

I have no problems to display the first 14 messages, but now I want the last ( first message) to disappear when there comes a new 15th message. But I have no idea how to script it. So it could be nice if someone could help me.

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