WolfPire Posted April 24, 2012 Share Posted April 24, 2012 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 Link to comment
jeremaniak Posted April 24, 2012 Share Posted April 24, 2012 You mean when you spawn and then download the files? Link to comment
WolfPire Posted April 24, 2012 Author Share Posted April 24, 2012 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. Link to comment
WolfPire Posted April 24, 2012 Author Share Posted April 24, 2012 Make server sided scripts. What do you mean exactly by that? Link to comment
DNL291 Posted April 24, 2012 Share Posted April 24, 2012 Make server sided scripts. What do you mean exactly by that? server-side scripts no are downloaded Link to comment
jeremaniak Posted April 25, 2012 Share Posted April 25, 2012 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 Link to comment
Absence2 Posted April 25, 2012 Share Posted April 25, 2012 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 no not possible https://wiki.multitheftauto.com/wiki/SpawnPlayer Link to comment
WolfPire Posted April 25, 2012 Author Share Posted April 25, 2012 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 no not possible https://wiki.multitheftauto.com/wiki/SpawnPlayer True, nothing can stop the download at this rate. The "Play" game-mode did it, so why not us? Link to comment
CapY Posted April 25, 2012 Share Posted April 25, 2012 onPlayerJoin https://wiki.multitheftauto.com/wiki/OnPlayerJoin spawnPlayer ??? Edit: Why "onPlayerJoin" is not highlighted? Link to comment
WolfPire Posted April 25, 2012 Author Share Posted April 25, 2012 onPlayerJoin https://wiki.multitheftauto.com/wiki/OnPlayerJoin spawnPlayer ??? Edit: Why "onPlayerJoin" is not highlighted? onPlayerJoin only triggers after all downloads are done sadly sorry. Link to comment
Booo Posted April 25, 2012 Share Posted April 25, 2012 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 Link to comment
WolfPire Posted April 25, 2012 Author Share Posted April 25, 2012 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. Link to comment
Booo Posted April 25, 2012 Share Posted April 25, 2012 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 Link to comment
CapY Posted April 25, 2012 Share Posted April 25, 2012 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. Link to comment
WolfPire Posted April 26, 2012 Author Share Posted April 26, 2012 @CapY: But i mean... it triggers after it's loaded, and that's after every single one of them are done. Link to comment
qaisjp Posted April 26, 2012 Share Posted April 26, 2012 omg everyone who tried to help here are freaking idiots, except capy. i cant insult that guy, he'll kill me 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. Link to comment
WolfPire Posted April 26, 2012 Author Share Posted April 26, 2012 omg everyone who tried to help here are freaking idiots, except capy. i cant insult that guy, he'll kill me 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. Link to comment
qaisjp Posted April 26, 2012 Share Posted April 26, 2012 I 100% guarantee it works 100% of the time. Link to comment
WolfPire Posted April 26, 2012 Author Share Posted April 26, 2012 I 100% guarantee it works 100% of the time. Works... Thank you =) =3 Link to comment
rolling11 Posted April 26, 2012 Share Posted April 26, 2012 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 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