Jump to content

Little Question.


WolfPire

Recommended Posts

Posted

Can someone show me how to start a resource before any other starts?

Example... if i want to spawn the player while it waits the download. How do i do that?

Thanks in advance,

- WolfPire

Posted
You mean when you spawn and then download the files?

I mean...

Imagine that you enter a server, and instead of seeing a black screen. You get directly spawned while the download goes on.

That's what i want to do.

Thanks for the post, appreciate it.

Posted

I dont know if its possible but maybe you can make a script that will hold the download till the spawn and then start the downloads because when you spawned and new script added then you will download it when you spawned

Posted
Can someone show me how to start a resource before any other starts?

Example... if i want to spawn the player while it waits the download. How do i do that?

Thanks in advance,

- WolfPire

https://wiki.multitheftauto.com/wiki/DownloadFile

https://wiki.multitheftauto.com/wiki/IsTransferBoxActive

https://wiki.multitheftauto.com/wiki/OnPlayerJoin

https://wiki.multitheftauto.com/wiki/SetTimer

DownloadFile is only avaiable for MTA 1.3.1

IsTransferBoxActive is in my script

onPlayerJoin triggers after every download is done

setTimer could be.

Thanks for your response.

I'm really interested on how the "play" game mode spawns the player even before the download.

Posted
Can someone show me how to start a resource before any other starts?

Example... if i want to spawn the player while it waits the download. How do i do that?

Thanks in advance,

- WolfPire

https://wiki.multitheftauto.com/wiki/DownloadFile

https://wiki.multitheftauto.com/wiki/IsTransferBoxActive

https://wiki.multitheftauto.com/wiki/OnPlayerJoin

https://wiki.multitheftauto.com/wiki/SetTimer

DownloadFile is only avaiable for MTA 1.3.1

IsTransferBoxActive is in my script

onPlayerJoin triggers after every download is done

setTimer could be.

Thanks for your response.

I'm really interested on how the "play" game mode spawns the player even before the download.

There is a way that enables you to play before loading

But you need a lot of work

Posted
Can someone show me how to start a resource before any other starts?

Example... if i want to spawn the player while it waits the download. How do i do that?

Thanks in advance,

- WolfPire

https://wiki.multitheftauto.com/wiki/DownloadFile

https://wiki.multitheftauto.com/wiki/IsTransferBoxActive

https://wiki.multitheftauto.com/wiki/OnPlayerJoin

https://wiki.multitheftauto.com/wiki/SetTimer

DownloadFile is only avaiable for MTA 1.3.1

IsTransferBoxActive is in my script

onPlayerJoin triggers after every download is done

setTimer could be.

Thanks for your response.

I'm really interested on how the "play" game mode spawns the player even before the download.

onPlayerJoin triggers when player joins the game, not after download finishes.

  • MTA Team
Posted

omg everyone who tried to help here are freaking idiots, except capy. i cant insult that guy, he'll kill me :P

Firstly, events aren't highlighted in [lua ] [/ lua], only functions are.

Secondly, onPlayerJoin is only triggered when the person joins and sees the black screen (the download things ISNT RELATED TO THIS)

Thirdly, onPlayerConnect is triggered when someone tries to connect, that is when they double click your server in the browser or join by IP link or whatever.

Finally, this is what you want:

  
addEventHandler ( "onPlayerJoin", root, function() 
        spawnPlayer ( source, 0, 0, 30 ) 
        setCameraTarget ( source, source ) 
        fadeCamera ( source, true ) 
    end 
) 
  

The original poster asked a simple question.

The above code SHOULD fade the camera, spawn and set target.

Thank me later.

*pstt* pro tip: dont take advice from jeremaniak or al3grab.

Posted
omg everyone who tried to help here are freaking idiots, except capy. i cant insult that guy, he'll kill me :P

Firstly, events aren't highlighted in [lua ] [/ lua], only functions are.

Secondly, onPlayerJoin is only triggered when the person joins and sees the black screen (the download things ISNT RELATED TO THIS)

Thirdly, onPlayerConnect is triggered when someone tries to connect, that is when they double click your server in the browser or join by IP link or whatever.

Finally, this is what you want:

  
addEventHandler ( "onPlayerJoin", root, function() 
        spawnPlayer ( source, 0, 0, 30 ) 
        setCameraTarget ( source, source ) 
        fadeCamera ( source, true ) 
    end 
) 
  

The original poster asked a simple question.

The above code SHOULD fade the camera, spawn and set target.

Thank me later.

*pstt* pro tip: dont take advice from jeremaniak or al3grab.

Yeah... onPlayerConnect won't do the magic. I'll just stick to the "onPlayerJoin". This seem'd to work. But since im the host... I can't 100% Guarrantee that this will work on loading.

Posted

not works.,...

onPlayerJoin triggers when player joins the game, not after download finishes.

no man , onPlayerJoin works when player login to server account . onplayerconnect works when player joins

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