karimsqualli96 Posted September 1, 2014 Share Posted September 1, 2014 hi, i want to know if when a player try to connect to the server, and a resource is already started in server side, he must load the resource before to join, so the event onClientResourceStart on client side is called before onPlayerJoin on server side?? Link to comment
[UCG]Mike Posted September 1, 2014 Share Posted September 1, 2014 idk but can see it https://wiki.multitheftauto.com/wiki/Useful_Functions Link to comment
Anubhav Posted September 1, 2014 Share Posted September 1, 2014 hi, i want to know if when a player try to connect to the server, and a resource is already started in server side, he must load the resource before to join, so the event onClientResourceStart on client side is called before onPlayerJoin on server side?? Remember dude, client-side only execute when player downloads resource. So you can't use onClientResourceStart before onPlayerJoin. onClientResourceStart is triggered when a resource starts not when players resource get started. Link to comment
Moderators IIYAMA Posted September 1, 2014 Moderators Share Posted September 1, 2014 Afaik: onPlayerJoin < event serverside download the script(if he doesn't have it) load the script and as last start the script> onClientResourceStart < event clientside Link to comment
karimsqualli96 Posted September 1, 2014 Author Share Posted September 1, 2014 Afaik: onPlayerJoin < event serverside download the script(if he doesn't have it) load the script and as last start the script> onClientResourceStart < event clientside ok thanks, and when for exemple a type in console : start the event onResourceStart always is triggered before the client side event onClientResourceStart?? Link to comment
novo Posted September 1, 2014 Share Posted September 1, 2014 Since onResourceStart is a server-side event, it will be triggered once the resource's server-sided code is fully loaded. Same happens with client-side. Link to comment
Moderators IIYAMA Posted September 1, 2014 Moderators Share Posted September 1, 2014 Afaik: onPlayerJoin < event serverside download the script(if he doesn't have it) load the script and as last start the script> onClientResourceStart < event clientside ok thanks, and when for exemple a type in console : start the event onResourceStart always is triggered before the client side event onClientResourceStart?? Good question. To be honest, I do not know if the server is starting sending files before the serverside scripts has been loaded.(but I think it will start sending after.) But one thing you should know is that there is always the slow internet + the client script load time. Which is always slower. 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