Jump to content

IP Login


^_^ LOL ^_^

Recommended Posts

Posted

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

Posted

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

Posted
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. :shock:

Posted
  
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?

Posted (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 by Guest
Posted
  
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.

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

Posted

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.

Posted

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?

Posted

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.

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