Jump to content

Jail until downloaded all resources?


Jeespwnd

Recommended Posts

I'm not 100% sure here, but I think no client-side scripts will start until they're all downloaded. In other words, you can rely on onClientResourceStart to trigger a server event that spawns the player.

If this is not the case, then you can at least still check whether or not the download box is still present, with the client-only isTransferBoxActive function.

Putting them in jail seems pointless to me, though - kind of sends the wrong message, doesn't it? "Welcome to the serv- BUHAHAHAHAHA NOW YOU'RE IN JAIL!!!! :twisted: "

Edited by Guest
Link to comment

"I think no client-side scripts will start until they're all downloaded. In other words, you can rely on onClientResourceStart to trigger a server event that spawns the player."

This is correct.

In fact, in my WIP gamemodes, I don't initialize a joining player with "onPlayerJoin", I use a system with a clientside file that triggers a serverside "onClientIsReady" custom event, and initialize the player then. Keeps things cleaner.

For your situation, it's as simple as putting the player in jail with "onPlayerJoin", then with a clientside file, trigger an event that removes them from jail/spawns them properly.

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