Jump to content

getPlayerCount in dxDrawing


papam77

Recommended Posts

dxDrawText( "No. of players online: " .. tostring( #getElementsByType( "player" ), 10, 300 ); 

Error:

')' expected near ';'

------------------------------------------------- 
-- Texts 
------------------------------------------------- 
addEventHandler("onClientResourceStart", resourceRoot, 
    function()     
    end 
) 
  
function RelativeToAbsolute( X, Y ) 
         rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 
  
addEventHandler("onClientRender",getRootElement(), 
function( ) 
    local x,y = RelativeToAbsolute(0.00, -0.90) 
    dxDrawText("Choose an arena",x,y,rX, rY, tocolor(255, 255, 255, 255), 2.50, "bankgothic", "center", "center", false, false, true, false, false) 
    dxDrawText( "No. of players online: " .. tostring( #getElementsByType( "player" ) , 10, 300 ); 
end 
) 

I wanna add this text to Choose an arena but on down monitor side

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