Kors Posted April 17, 2018 Share Posted April 17, 2018 How to set blackscreen in connect , when player connect and download files Link to comment
Dimos7 Posted April 17, 2018 Share Posted April 17, 2018 (edited) addEventHandler("onClientPlayerJoin", root, function() if isTransferBoxActive() ==true then fadeCamera(false) end end) Edited April 17, 2018 by Dimos7 Link to comment
Kors Posted April 17, 2018 Author Share Posted April 17, 2018 dont work, i need blackscreen when downloading files, when all is downloaded , then start login panel Link to comment
Moderators IIYAMA Posted April 17, 2018 Moderators Share Posted April 17, 2018 https://wiki.multitheftauto.com/wiki/Meta.xml <download_priority_group /> If not set, the download priority group for a resource defaults to 0. If this is set higher than 0, then the resource will be downloaded and started on the client earlier than other resources. If set to less than 0, the resource will be downloaded and started on the client later than other resources. + See example of isTransferBoxActive. \/ https://wiki.multitheftauto.com/wiki/IsTransferBoxActive 1 Link to comment
Kors Posted April 17, 2018 Author Share Posted April 17, 2018 21 minutes ago, IIYAMA said: https://wiki.multitheftauto.com/wiki/Meta.xml <download_priority_group /> If not set, the download priority group for a resource defaults to 0. If this is set higher than 0, then the resource will be downloaded and started on the client earlier than other resources. If set to less than 0, the resource will be downloaded and started on the client later than other resources. + See example of isTransferBoxActive. \/ https://wiki.multitheftauto.com/wiki/IsTransferBoxActive i must add all resource meta.xml this? <download_priority_group>1</download_priority_group> ,<download_priority_group>2</download_priority_group>, <download_priority_group>3</download_priority_group> yes? Link to comment
LilDawage Posted April 17, 2018 Share Posted April 17, 2018 Black screeen ? but players can move and aim and many actions so you need a fully resource about that or Edit your Login panel by using > addEventHandler("onPlayerLogin", root, Link to comment
Kors Posted April 17, 2018 Author Share Posted April 17, 2018 36 minutes ago, LilDawage said: Black screeen ? but players can move and aim and many actions so you need a fully resource about that or Edit your Login panel by using > addEventHandler("onPlayerLogin", root, I need, Players can not do anything.not move, aim, can only when downloaded all resource i need this Link to comment
Moderators IIYAMA Posted April 17, 2018 Moderators Share Posted April 17, 2018 2 hours ago, Kors said: i must add all resource meta.xml this? <download_priority_group>1</download_priority_group> ,<download_priority_group>2</download_priority_group>, <download_priority_group>3</download_priority_group> yes? No, add it ONLY to the resource which is going to hide the bar. This makes sure that the script is downloaded before others and starts early on.If you do not do this, this script will be started after the download bar is finished. Check isTransferBoxActive, because it half of your work: https://wiki.multitheftauto.com/wiki/IsTransferBoxActive Use https://wiki.multitheftauto.com/wiki/DxDrawRectangle To cover up the download bar. (enable postGUI) Syntax bool dxDrawRectangle ( float startX, float startY, float width, float height [, int color = white, bool postGUI = false, bool subPixelPositioning = false ] ) Do not cover the whole screen. Keep the user in control. http://bokardo.com/principles-of-user-interface-design/#keep-users-in-control Trouble with using this with onClientRender? This might be handy: 1 Link to comment
Kors Posted April 18, 2018 Author Share Posted April 18, 2018 20 hours ago, IIYAMA said: No, add it ONLY to the resource which is going to hide the bar. This makes sure that the script is downloaded before others and starts early on.If you do not do this, this script will be started after the download bar is finished. Check isTransferBoxActive, because it half of your work: https://wiki.multitheftauto.com/wiki/IsTransferBoxActive Use https://wiki.multitheftauto.com/wiki/DxDrawRectangle To cover up the download bar. (enable postGUI) Syntax bool dxDrawRectangle ( float startX, float startY, float width, float height [, int color = white, bool postGUI = false, bool subPixelPositioning = false ] ) Do not cover the whole screen. Keep the user in control. http://bokardo.com/principles-of-user-interface-design/#keep-users-in-control Trouble with using this with onClientRender? This might be handy: I create, .lua and add this code , client side resourceRoot = getResourceRootElement(getThisResource()) function checkTransfer() if isTransferBoxActive() == true then setTimer(checkTransfer,2000,1) -- Check again after 2 seconds else fadeCamera(true) -- TransferBox isnt active, fade in camera end end addEventHandler("onClientResourceStart",resourceRoot,checkTransfer) and i add <download_priority_group /> in resource meta, what wrong? dont work Link to comment
xFFrozen Posted April 18, 2018 Share Posted April 18, 2018 which resources ar started when you join your server? Normaly a user has a blackscreen AND ar not enable to walk or anything so just edit your script and trigger the spawn after login Link to comment
Kors Posted April 18, 2018 Author Share Posted April 18, 2018 Map cache is download in blackscreen, all other resource i can walk 16 minutes ago, xFFrozen said: which resources ar started when you join your server? Normaly a user has a blackscreen AND ar not enable to walk or anything so just edit your script and trigger the spawn after login Link to comment
LilDawage Posted April 18, 2018 Share Posted April 18, 2018 function joint ( ) player = getLocalPlayer ( ) setElementFrozen ( player) toggleControl (, "fire",true ) toggleControl (player, "aim", true )----------------check wiki for more Controls end addEventHandler ( "onPlayerJoin", getRootElement(), joint ) function Login ( ) player = getLocalPlayer ( ) setElementFrozen ( player) toggleControl (, "fire",false ) toggleControl (player, "aim", false ) end addEventHandler("onPlayerLogin", root,Login) Link to comment
Kors Posted April 18, 2018 Author Share Posted April 18, 2018 oh guys, i stop gamemode play, and yes, i have blackscreen, how remove thet function in play? i must start play 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