Sign in to follow this  
Moonshine

[?] Where does MTA store player info?

Recommended Posts

For our server, we need to script in a filter that will be kicking people unless they are on our 'allowed' list. For this, however, our scripter needs to know where does MTA store the player info so he can reach and code in the needed filter.

Help, anyone?

Where does MTA store user information? I can edit the signup script for vBulletin to post their username to the user database for MTA, therefor if they're registered on the forum.. they're registered on the server.

I dunno if its possible as I don't know where the user information is stored and what format, ect.

Share this post


Link to post

Not sure what you mean by where MTA stores the player info. You can use getElementsByType to retrieve a table over all the players in the server. The onPlayerJoin events when he joins.

Share this post


Link to post

Well, that didn't tell me anything at all (mainly 'cause I have zero experience with Lua), but hopefully the scripter will understand something. Thanks. . . Erm, but more about what I meant...

For example, we want to create a list of players so only their nicks are allowed to join the server. Obviously, in order to filter and kick the others, this list will needs to be stored somewhere.

I think this 'somewhere' is what we're looking for in this case. Any ideas?

Share this post


Link to post

Make accounts so they need to login in order to spawn. Kick everyone who spawns without logging in.

Share this post


Link to post

Or fetch their serial on each join, and make a list of allowed serials

Share this post


Link to post

They're stored in accounts.xml. You probably need to add the user to a group in acl.xml too that allows them to join. You may need to create a script that gives them X seconds to login before kicking them.

Alternatively, you can rely on serials and keep a list of serials for your users.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.