Jump to content

onClientRender


Drakath

Recommended Posts

This event and onClientPreRender will trigger whatever function it is attached to with every frame. Depending on the server's maximum FPS and what your computer might handle - you might end up triggering the function 30-60 times per second.

As a result, this event may cause severe lag and/or even crashes if not used cautiously.

Link to post

If used to much , yes , it could cause lag to the client .

But there are alot of variables that play in wether it lags the client or not .

CPU and GPU play a big role here though . Depends from case to case.

Link to post

The main usage of that event is basically if you want to draw a text for instance with dxdrawtext, I'm using it in multiple resources and every frame it calls getElementData to verify if it should write anything, defines around 0-10 local variables (to calculate distance between some objects and output it), and some more. Let's not forget thought that this is a client sided function so the performance required to use it will be provided by the client computers and not the server. As long you doesn't add really heavy CPU wasting code in it there won't be any problem.

Link to post

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