Jump to content

Y Assix


#Paper

Recommended Posts

Posted

So, i've a problem whit the Y Assix:

asdasdva.jpg

See 1° part: When i dead the script writes the line under the chat

See 2° part: When someone deads after me my dead line goes under and the new line writes in mine dead line 1° position...

But this doesn't appens xD

The 2° text goes under the chat and my dead line don't goes down:

function onRender() 
local text = 1 
local y = 200 
for _,item in ipairs(players) do 
dxDrawColorText(item, 15, y - 16 * text, 15, y - 16 * text,tocolor(255,255,255), 0.35, "bankgothic", "left", "center",false, false, false) 
 text = text + 1 
y = y + 8 
end 
end 
addEventHandler("onClientRender", getRootElement(), onRender) 

  • Moderators
Posted

humm maybe this ?:

function onRender() 
    -- local text = 1 
    local y = 200 
    for _,item in ipairs(players) do 
        dxDrawColorText(item, 15, 16-y, 15, 16-8,tocolor(255,255,255), 0.35, "bankgothic", "left", "center",false, false, false) 
        -- text = text + 1 
        y = y + 8 
    end 
end 
addEventHandler("onClientRender", getRootElement(), onRender) 

Posted

City, ur code doesn't fix mine problem, but i made another code:

local y = 200 
  
function onTriggerAdd(pos, toIns) 
table.insert(players, toIns) 
y = y + 8 
end 
addEvent("onAddRequest", true) 
addEventHandler("onAddRequest", getRootElement(), onTriggerAdd) 
  
local text = 1 
  
function onRender() 
for _,item in ipairs(players) do 
        dxDrawColorText(item, 15, y - 8 , 15, y - 8 ,tocolor(255,255,255), 0.35, "bankgothic", "left", "center", false, false, false) 
        text = text + 1 
end 
end 
addEventHandler("onClientRender", getRootElement(), onRender) 

Now the text goes down but all lines are in the same position...

  • Moderators
Posted
local y = 200 
      
function onTriggerAdd(pos, toIns) 
    table.insert(players, toIns) 
    y = y + 8 
end 
addEvent("onAddRequest", true) 
addEventHandler("onAddRequest", getRootElement(), onTriggerAdd) 
      
function onRender() 
    local text = 0 
    for _,item in ipairs(players) do 
        dxDrawColorText(item, 15, y-text , 15, y-text ,tocolor(255,255,255), 0.35, "bankgothic", "left", "center", false, false, false) 
        text = text+8 
    end 
end 
addEventHandler("onClientRender", getRootElement(), onRender) 

  • Moderators
Posted

No problem but some players change de size of their chatbox so maybe you can use getChatboxLayout to get the size of the chatbox's player and set it to y

It just a suggestion :D

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