Jump to content

What do I need for hud.


IIYAMA

Recommended Posts

  • Moderators
Posted (edited)

Hey, I got a question:

What is onClientRender ?

= when you spawn you load objects?

or

= on join server and downloading scripts?

I am using a script that dissable the normal gta hud...

but when you get killed, the normal gta san hud come back somehow..

Because I have a hud and it have sometimes a bug. You see two hud's when you die.

I use onGameModeStart, ongameModeMapStart and onPlayerJoin to dissable the gta san hud.

Do I need on ClientRender to??

Gamemode: Stealth.

pls tell me what I need. :D

Edited by Guest
  • Moderators
Posted

I am using a script that dissable the normal gta hud...

but when you get killed, the normal gta san hud come back somehow..

  • Moderators
Posted
Use onPlayerWasted or create a timer to disable hud.

Maybe onPlayerSpawn and timer.. because there is the problem.

Posted

Why use the two options? Only use a timer...

setTimer( 
  function() 
       showPlayerHudComponent('all',false) 
  end 
end,500,0) 

Posted

Not for me. And my computer is a shit..

But you can use onPlayerWasted or onPlayerSpawn.

onPlayerWasted

addEventHandler('onPlayerWasted',root, 
 function() 
       showPlayerHudComponent('all',false) 
end) 

For onPlayerSpawn, the same, only change event name.

  • Moderators
Posted

yes I know... But I don't understand the meaning of this:

This event is triggered every time GTA renders a new frame. It is required for the DirectX drawing functions, and also useful for other clientside operations that have to be applied repeatedly with very short time differences between them.

So If I play my mta at 70 frames, will this script activated every 70 times in a frame? :? It sounds terible laggy...

Posted

well, it is kind of resource intensive, but not very laggy.

after all there's thousands calculations to be done for each frame.

you can take look at my ivhud how things are done, its kind of hard to read though.

  • Moderators
Posted

yes I saw the resource..

But I want the lagg so low as possible. So my choose is:

OnClientPlayerSpawn, "gamemode" and "map"

Posted

its impossible that way, everything has to be drawn onClientRender.That is, unless you use GUI, but they still are drawn same way, just you don't see that.

  • Moderators
Posted

yes that is right, but this is about deactivate the gta san hud.

It is not about showing up the GCC hud xD

GCC = clan

Posted

ah

then just set a timer on a resource start to remove the hud again, AND TIMERS ARE NOT LAGGING, 1 timer wont change anything performance wise.

alternatively in next mta versions you will be able to just set event priority to low without timer.

  • Moderators
Posted

timer don't lagg, but I think what I did is also good.

But maybe you know the game age of empire 3?

Well I made a map with arround 1200 scripts and it is crashing in mutiplayer :lol:

I love the game but I hate the out of sync xD

  • 2 weeks later...
  • Moderators
Posted

Well onclient render does lagg a little. I can feel it, when my hud is running.

I have still the max frames, but the smooth movements are gone -_-'

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