Jump to content

resource start client side


karimsqualli96

Recommended Posts

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
Afaik:

  1. onPlayerJoin < event serverside
  2. download the script(if he doesn't have it)
  3. load the script
  4. 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
  • Moderators
Afaik:

  1. onPlayerJoin < event serverside
  2. download the script(if he doesn't have it)
  3. load the script
  4. 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

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