Sande Posted July 10, 2014 Share Posted July 10, 2014 Hello, i would like to know how to make a text "Resources Loading, Please wait.". I have been trying to do it with onClientPreRender & dxDraw but some reason it didn´t work. So the idea is when you join to server there are coming text "Resources Loading, Please wait" and when these is loaded the text comes off. Link to comment
MTA Team botder Posted July 10, 2014 MTA Team Share Posted July 10, 2014 You have to create a textitem serverside and show it to the fresh connected player: https://wiki.multitheftauto.com/wiki/Se ... _functions Link to comment
Max+ Posted July 10, 2014 Share Posted July 10, 2014 addEvent( "onClientSend",true ) local serverDisplay,serverText addEventHandler( "onClientSend",root, function( ) textDisplayRemoveObserver( serverDisplay, source ) end ) addEventHandler( "onPlayerJoin",root, function( ) serverDisplay = textCreateDisplay( ) textDisplayAddObserver ( serverDisplay, source ) serverText = textCreateTextItem ( "Downloading.Please wait!", 0.5, 0.5,1,255,0,0,255,2,"center","center",200 ) textDisplayAddText ( serverDisplay, serverText ) end ) local timer = setTimer( function( ) if not isTransferBoxActive( ) then triggerServerEvent( "onClientSend",localPlayer ) killTimer( timer ) end end, 1000, 2 ) 1 Link to comment
Sande Posted July 10, 2014 Author Share Posted July 10, 2014 @Max+ Ohh thank you very much! Link to comment
Max+ Posted July 10, 2014 Share Posted July 10, 2014 @Max+ Ohh thank you very much! your , welcome Link to comment
Sande Posted July 10, 2014 Author Share Posted July 10, 2014 Does this show immediately if i change "onPlayerJoin" event to "onPlayerConnect", like other servers have it immeaditely when you join to the server. Link to comment
Max+ Posted July 10, 2014 Share Posted July 10, 2014 Does this show immediately if i change "onPlayerJoin" event to "onPlayerConnect", like other servers have it immeaditely when you join to the server. Just Keep it, onPlayerJoin it will work when player enter immeditely . Link to comment
Sande Posted July 10, 2014 Author Share Posted July 10, 2014 Ok, but i just was thinking because in some servers it goes immeadiately when you connect. 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