Jump to content

Y Assix


#Paper

Recommended Posts

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) 

Link to comment
  • Moderators

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) 

Link to comment

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

Link to comment
  • Moderators
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) 

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