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

why -2393.etc instead of X?

you can do setElementPosition then setPedFrozen

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

horizontal? with this you are allowing player to move north-south (if its actually working) and jump.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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