Jump to content

Fps drops !


Oussema

Recommended Posts

When i use xmlNodeGetValue then draw it with dxdrawtext fps will be droped to <10

function dxDrawTest ()
  local node = xmlLoadFile("Lang/english.xml")
local optionsNode = xmlFindChild ( node, "category", Count )
local instructionsNode = xmlFindChild ( optionsNode, "subcategory", tableSetText )
local instructionsNodes = xmlFindChild ( instructionsNode, "content", 0 )

local instructions = xmlNodeGetValue ( instructionsNodes )
  dxDrawText(instructions, 0,5, 375, 518, tocolor(255, 255, 255, 255))
end
addEventHandler("onClientRender",root,dxDrawTest)

 

Edited by Oussema
  • Like 1
Link to comment

You could just do

local node = xmlLoadFile("Lang/english.xml")
local optionsNode = xmlFindChild ( node, "category", Count )
local instructionsNode = xmlFindChild ( optionsNode, "subcategory", tableSetText )
local instructionsNodes = xmlFindChild ( instructionsNode, "content", 0 )
local instructions = xmlNodeGetValue ( instructionsNodes )
xmlUnloadFile(node)

function dxDrawTest ()
	dxDrawText(instructions, 0,5, 375, 518, tocolor(255, 255, 255, 255))
end
addEventHandler("onClientRender",root,dxDrawTest)

 

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