Jump to content

How to set blackscreen in connect


Kors

Recommended Posts

Posted (edited)
addEventHandler("onClientPlayerJoin", root, function() 
    if isTransferBoxActive() ==true then
      fadeCamera(false) 
      end
    end) 

 

Edited by Dimos7
  • Moderators
Posted

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

  • Like 1
Posted
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?

Posted
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

8f7e1fb8fc8e.png i need this 

  • Moderators
Posted
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:

 

 

 

  • Like 1
Posted
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

Posted

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

Posted

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

 

Posted
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)
Posted

oh guys,  i stop gamemode play, and yes, i have blackscreen, how remove thet function in play? i must start play

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