Jump to content

Some way more efficient than this?


12p

Recommended Posts

Posted

Is there some way to make this use less CPU?

addEventHandler ("onClientRender",getRootElement(), 
   function ()  
    local x,y,z = getElementPosition(getLocalPlayer()) 
    setElementPosition (getLocalPlayer(), x, -2393.986328125, z, false) 
   end) 

Posted

checked, now i understand. its better to limit the Y to some values (like 1 unit total) i think.

idk how to achieve this anyway, something wrong with this code? if it's fine - leave it.

i'm creating a gamemode that is using 4 onClientRender at the same time, doich much things. and my weak cpu is still working as always.

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