Moderators IIYAMA Posted February 17, 2012 Moderators Share Posted February 17, 2012 (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. Edited February 17, 2012 by Guest Link to comment
Kenix Posted February 17, 2012 Share Posted February 17, 2012 I not understand you. You need draw hud? Link to comment
Agon Posted February 17, 2012 Share Posted February 17, 2012 He draws hud but when you die, 2 hud appears (one of them is gta's original hud and the other is his hud i think.) Link to comment
Moderators IIYAMA Posted February 17, 2012 Author Moderators Share Posted February 17, 2012 I am using a script that dissable the normal gta hud... but when you get killed, the normal gta san hud come back somehow.. Link to comment
drk Posted February 17, 2012 Share Posted February 17, 2012 Use onPlayerWasted or create a timer to disable hud. Link to comment
Moderators IIYAMA Posted February 17, 2012 Author Moderators Share Posted February 17, 2012 Use onPlayerWasted or create a timer to disable hud. Maybe onPlayerSpawn and timer.. because there is the problem. Link to comment
drk Posted February 17, 2012 Share Posted February 17, 2012 Why use the two options? Only use a timer... setTimer( function() showPlayerHudComponent('all',false) end end,500,0) Link to comment
Moderators IIYAMA Posted February 17, 2012 Author Moderators Share Posted February 17, 2012 that makes lagg.. Link to comment
drk Posted February 17, 2012 Share Posted February 17, 2012 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. Link to comment
Castillo Posted February 17, 2012 Share Posted February 17, 2012 You forgot about 'source'. addEventHandler('onPlayerWasted',root, function() showPlayerHudComponent(source,'all',false) end) Link to comment
Moderators IIYAMA Posted February 17, 2012 Author Moderators Share Posted February 17, 2012 but what is: onClientRender ?? Link to comment
Castillo Posted February 17, 2012 Share Posted February 17, 2012 onClientRender is a event handler. https://wiki.multitheftauto.com/wiki/OnClientRender Link to comment
Moderators IIYAMA Posted February 17, 2012 Author Moderators Share Posted February 17, 2012 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... Link to comment
drk Posted February 17, 2012 Share Posted February 17, 2012 It not lags the game.. Not for me. Link to comment
karlis Posted February 18, 2012 Share Posted February 18, 2012 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. Link to comment
Moderators IIYAMA Posted February 19, 2012 Author Moderators Share Posted February 19, 2012 yes I saw the resource.. But I want the lagg so low as possible. So my choose is: OnClientPlayerSpawn, "gamemode" and "map" Link to comment
karlis Posted February 19, 2012 Share Posted February 19, 2012 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. Link to comment
Moderators IIYAMA Posted February 19, 2012 Author Moderators Share Posted February 19, 2012 yes that is right, but this is about deactivate the gta san hud. It is not about showing up the GCC hud GCC = clan Link to comment
karlis Posted February 19, 2012 Share Posted February 19, 2012 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. Link to comment
Moderators IIYAMA Posted February 19, 2012 Author Moderators Share Posted February 19, 2012 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 I love the game but I hate the out of sync Link to comment
karlis Posted February 19, 2012 Share Posted February 19, 2012 well just hide it on timer after resource start cant get any more optimized atm. Link to comment
Moderators IIYAMA Posted March 3, 2012 Author Moderators Share Posted March 3, 2012 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 -_-' Link to comment
Evil-Cod3r Posted March 3, 2012 Share Posted March 3, 2012 why dont you use this https://wiki.multitheftauto.com/wiki/OnClientPreRender Link to comment
Moderators IIYAMA Posted March 3, 2012 Author Moderators Share Posted March 3, 2012 or maybe I can try this... https://wiki.multitheftauto.com/wiki/OnClientHUDRender Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now