Jump to content

Checking if a player joins first


Dzsozi (h03)

Recommended Posts

Hello community!

I was thinking about how could I check if a player joins first and registers a new account. Because I want to make a little movie for the new players, a little introduction thingy. So for example if you have already played on the server, have an account and saved data, then you just spawn if you logged in. But if you come up to the server, and if you haven't registered an account and played yet, then if you register a new account and log in a little movie will play. I hope you understand me! Thanks for the help in advance!

P.S.: Sorry for the bad English if there was something written wrong, I'm from Hungary!

Link to comment

Well, you could just add some data among account data that indicates whether the account has been logged into or not. When account is registered, it's set to "not played", and when the player logs in, it would check the data. If it's "played", the player just spawns, otherwise it shows the intro movie and sets the data to "played".

Link to comment

Oh, thanks, I forgot about this command. :lol:

But I can't understand the logic of this setting and getting account data's, I mean, if I make an intro, then it's gonna be client side. And on client side how do I set account data to played without bugs? Triggering is not working for me, I tried with this, but nothing happens and debugscript doesn't shows any error. I would appreciate it if someone could help me, write me an example or expalin it.

EDIT: I could trigger the intro to server side. I'm using this save resource: https://community.multitheftauto.com/index.php?p= ... ils&id=977 But it's "new-registered-player-detection" doesn't works very well. I made a test account and I got the data of my main account. So I had money, position, weapons and other things from my main account on a fully new registered account. When I made my "new-registered-player-detection" function everything got messed up.

Link to comment

If such actions like intro movie on login are initiated from client side, I don't think that's a sign of good design. How are login operations processed in the first place? Of course they're processed in the server, aren't they? So that's where the data should be checked and intro movie initiated.

Link to comment

I think we don't understand each other, I want to make the intro played to the player who registered on the server. So if you are a new player and have a new account, then the intro will be played. I don't want to make the intro being played to everybody who login's. Just the player who registered a new account. Or what do you mean by "logs in in the first place"? Sorry for being such a noob, but I'm new to account things, plus my main language is not English so it's possible that I will not understand that you wrote :( But I'm trying to be understandable.

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