Dzsozi (h03) Posted December 8, 2014 Share Posted December 8, 2014 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
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 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
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 Well, I try something, if it's not working I'll post my code that I've tried. Thanks! Link to comment
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 I have one more question. Now I'm making a lot of test accounts, to test the script so, how or where can I delete them? Link to comment
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 There's a function for that: removeAccount Also, as far as I know, MTA stores accounts into SQLite database or something like that, so you can probably remove them from file with some browser of such databases. Link to comment
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 Okay, thank you! Link to comment
John Smith Posted December 8, 2014 Share Posted December 8, 2014 How about /delaccount accountname Link to comment
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 Oops, didn't think about it Link to comment
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 Oh, thanks, I forgot about this command. 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
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 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
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 So you mean that I should trigger the intro to server side, and set the other datas there? Just trigger the intro from client side? Link to comment
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 No, seriously, how are you playing the intro movie on login if client doesn't detect when the player logs in in the first place? Link to comment
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 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
DiSaMe Posted December 8, 2014 Share Posted December 8, 2014 So, detect when the player logs in using "onPlayerLogin", check the data and depending on what is set, either play the intro movie or don't. What's so hard to understand? Link to comment
Dzsozi (h03) Posted December 8, 2014 Author Share Posted December 8, 2014 That's what I've tried before, but I've got an idea, tomorrow I'll try out something again. Thank you! 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