Jump to content

Download Script


Smosh

Recommended Posts

Hello everyone, I want to talk directly about the topic, I want to create a special spawn for those who have not completed the download before the map starts, they will start from spawn again after the download is complete. I would be very happy if you could help.

By the way, if we give an example: [DM]SkraXx ft Bape - It G Ma

Edited by Smosh
Link to comment
-- in login panel resource

-- put in meta.xml
<download_priority_group>1</download_priority_group>
-- client 
function checkTransfer()
	if isTransferBoxActive() then
		setTimer(checkTransfer,2000,1)
	else 
        triggerServerEvent("spawnplayer", resourceRoot,localPlayer,0,0,0) 
  end
end
addEventHandler("onClientResourceStart",resourceRoot,checkTransfer)

--Server 
function spawnplayer(player,x,y,z) 
  spawnPlayer(player,x,y,z) 
end
addEvent( "spawnplayer", true )
addEventHandler( "spawnplayer", resourceRoot, spawnplayer )

i think this can help you. 

Link to comment

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