Jump to content

[SOLVED]logIn


Chronic

Recommended Posts

Is there any way to log me in when I join the server? I tried this:

Server Side:

function yo ( ) 
if getPlayerName ( source ) == "Chronic" then 
     logIn ( source, Chronic, "lolthisismypassword" ) 
end 
end 
addEventHandler ( "onPlayerJoin", root, yo ) 

Line 3: Expected account at argument 2, got nil

Also, I realize that I could easily get hacked this way. It's a local server though so it's all good :lol:

Edited by Guest
Link to comment
function yo ( ) 
if getPlayerName ( source ) == "Chronic" then 
     local account = getAccount ( "Chronic", "lolthisismypassword") 
     if ( account ~= false ) then 
          logIn ( source, account , "lolthisismypassword" ) 
     end 
end 
end 
addEventHandler ( "onPlayerJoin", root, yo ) 

Link to comment

I thnik what he meant was "It makes the server vulnerable to hackers who would use the same nick". The point is, Chronic uses it only on his local server so he doesn't have to type in his credentials every time he joins. As far as he doesn't use it on a public server, it's fine.

  • Like 1
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...