^_^ LOL ^_^ Posted February 8, 2014 Share Posted February 8, 2014 So im newbie in lua And i try find scripts/functions to save all player information to ip, but i didnt find, because i am here. If anyone can explain me how i can make when you press Play button its login with your ip and saves your information to your ip? Thanks =). Link to comment
Alazam Posted February 8, 2014 Share Posted February 8, 2014 i think you can but so lot of inconvenient the best way is to use mysql Link to comment
^_^ LOL ^_^ Posted February 8, 2014 Author Share Posted February 8, 2014 Yes, but how i can it do? Because i am not using mysql and i dont know how to run it Link to comment
Alazam Posted February 8, 2014 Share Posted February 8, 2014 i dont know but mysql is very simple to learn for basic thing like you want if you make a ip based system player cant use vpn/proxy player cant play on the same connection/modem if player have not permanent ip (90% of fai havent it) when their modem reboot they lose all of their stats because their ip change you can search tutoriel for simple mysql login system their are probably a lot Link to comment
^_^ LOL ^_^ Posted February 8, 2014 Author Share Posted February 8, 2014 ok thanks for information, i will try. Link to comment
Anubhav Posted February 8, 2014 Share Posted February 8, 2014 when a player login you can set his data setAccountData and use getAccountData for getting the data of it. Link to comment
tosfera Posted February 8, 2014 Share Posted February 8, 2014 when a player login you can set his data setAccountData and use getAccountData for getting the data of it. That's account bounded, he wants to do it to the IP of the player. which is... kinda stupid, if you ask me. Link to comment
Anubhav Posted February 8, 2014 Share Posted February 8, 2014 getPlayerSerial --https://wiki.multitheftauto.com/wiki/getPlayerSerial Link to comment
^_^ LOL ^_^ Posted February 8, 2014 Author Share Posted February 8, 2014 getPlayerSerial --https://wiki.multitheftauto.com/wiki/getPlayerSerial I dont get it, can you give example? By when you click "Play" it make serial and account on it, then spawn the player? Link to comment
Anubhav Posted February 8, 2014 Share Posted February 8, 2014 (edited) It is client sided. play = guiCreateButton (arguments of it) function playClick() getPlayerSerial() spawnPlayer(arguments) end addEventHandler ( "onClientGUIClick", play, false, false ) EDIT: Note: Arguments of it must be there or it won't work/. Edited February 8, 2014 by Guest Link to comment
tosfera Posted February 8, 2014 Share Posted February 8, 2014 getPlayerSerial --https://wiki.multitheftauto.com/wiki/getPlayerSerial I dont get it, can you give example? By when you click "Play" it make serial and account on it, then spawn the player? Whenever a player installs MTA, a serial will be created for him. This serial is bound to the installation of MTA, whenever a player is going to press 'play' on your server, see if there is an account that's using that serial. If so, log him in and spawn him. If there isn't an account, create a new account for the player and log him in after that. Link to comment
myonlake Posted February 8, 2014 Share Posted February 8, 2014 Whenever a player installs MTA, a serial will be created for him. This serial is bound to the installation of MTA, whenever a player is going to press 'play' on your server, see if there is an account that's using that serial. If so, log him in and spawn him. If there isn't an account, create a new account for the player and log him in after that. Correction to your serial comment; serials are bound to the hardware, not the software. Link to comment
^_^ LOL ^_^ Posted February 8, 2014 Author Share Posted February 8, 2014 Yes i know, but can you make example? Im a beginner to lua and dont know so much Link to comment
myonlake Posted February 8, 2014 Share Posted February 8, 2014 I suggest you use the logIn functionality that comes internally with MTA. People can have dynamic IP addresses, which will be difficult if you have a different IP one time, and another next time, then you can't log in because you have the wrong IP address. Link to comment
^_^ LOL ^_^ Posted February 8, 2014 Author Share Posted February 8, 2014 But its posible to make account with 1 click? If account doesnt exists then hes make account by name what are you join to server, and password is serial or ip, then if account exists or create it then hes get all accounts information from internal.db and spawn player? Link to comment
myonlake Posted February 8, 2014 Share Posted February 8, 2014 You can use the following functions to do this. getAccounts getAccountName getPlayerName getPlayerSerial addAccount setAccountData getAccountData logIn And then use the onPlayerJoin event to trigger the function of yours. 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