Uid autologin

Started by Cool, Aug 04, 2016, 02:15 PM

Previous topic - Next topic

Cool

how to make a autologin system by uid how i can do that i have already uidalias sytem available but how to make autologin

Kewun

#1
wait some secs, ill release a script with uid autologin, but you will have to edit it.

Kewun

function onPlayerCommand(player,cmd,text)
{
if (cmd=="autologin")
{
if(!text) {
MessagePlayer("you must write /autologin on/off",player)
return false;
}
if (text=="on")
{
WriteIniBool("Stats.ini","Autologin",player.UID2,true)
MessagePlayer("Autologin has been enabled",player)
return true;
}
else if(text=="off")
{
WriteIniBool("Stats.ini","Autologin",player.UID2,false)
MessagePlayer("Autologin has been disabled",player)
return true;
}
}
}
function onPlayerSpawn(player)
{
if (ReadIniBool("Stats.ini", "Autologin",player.UID2))
{
MessagePlayer("You have been automatically logged in",player)
//LoadAccount(player)  YOUR LOADING ACCOUNT FUNCTION!
}
else {
MessagePlayer("Login to your account using /login",player)
}
}

not tested, but you need add your functions yourself. idk wut u use, my acc system or what.
idk if works, cant test, my vcmp doesnt work

Cool

i am not using ini or i will never use it but thanks its gives me idea how to do it i will try to make it

EK.IceFlake

Whoa this is very dangerous... someone who enabled autologin can now autologin in ANY account!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Kewun

i said, i havent tested it because my vc doesnt work correctly, i only putted a example how it would look like, i didnt have time 2 test

and i dont think if this is dangerous, if you login on some admins nick, you wont get admin, reads your admin from uid, ( in my acc system, yep, the protection exists)

Cool

@EK.CrystalBlue can you give me example i am using db

vito

uid+uid2+subnet is safe I think.

Thijn

Or do what any other sane person would do. Use passwords.

vito

Quote from: Thijn on Aug 04, 2016, 04:47 PMOr do what any other sane person would do. Use passwords.
sadly no cookies in vcmp...

EK.IceFlake

Quote from: Hercules on Aug 04, 2016, 04:08 PM@EK.CrystalBlue can you give me example i am using db
register as Hax0r and enable autologin
then join as Hercules
it will autolog you in; instant admin

Mötley

If i were to use an autologin system I would save the players last uid and ip. Also store autologin in the players data from the command. Then store the players ip uid in a array. If the uid and ip = the players ip and or uid then log them in.

Make sure to store the players password in an array so you can do something on the login function login(player, thatarraypassword, statDB);something like that.

Sorry I'm at work.

Cool

Quote from: Mötley on Aug 04, 2016, 07:47 PMIf i were to use an autologin system I would save the players last uid and ip. Also store autologin in the players data from the command. Then store the players ip uid in a array. If the uid and ip = the players ip and or uid then log them in.

Make sure to store the players password in an array so you can do something on the login function login(player, thatarraypassword, statDB);something like that.

Sorry I'm at work.
Motely i am also thinking like that how you explain in fuzzie account system ip available but not uid

Luis_Labarca

Hello Friend I had done an automatic registration system and connect to the account automatically hope and serve as the example

//---------------------------------------------------
//---------------------------------------------------
function onScriptLoad()
{
Registers <- ConnectSQL( "RegistersPlayerUnique.db" );
QuerySQL(Registers,"CREATE TABLE IF NOT EXISTS Account(PlayerName TEXT, PlayerUnique TEXT )" );
}
//---------------------------------------------------
function LoadAccount( p )
{
local q = QuerySQL( Registers, "SELECT * FROM Account WHERE PlayerUnique='" + p.UniqueID + "'" ),UniqueID;
UniqueID = GetSQLColumnData( q, 1 );
if ( UniqueID ) return true;
else return false;
}
//---------------------------------------------------
function onPlayerJoin( player )
{
if ( LoadAccount( player ) == true )
{
MessagePlayer(""+player.Name+": your data is loaded automatically...",player);
local Account= QuerySQL(Registers, "SELECT * FROM Account WHERE PlayerUnique= '" + player.UniqueID + "'" );
if(Account)
{
//Add here what load player
}
}
if ( LoadAccount( player ) == false )
{
MessagePlayer(""+player.Name+" : Your data is saved automatically...",player);
QuerySQL( Registers, "INSERT INTO Account (PlayerName,PlayerUnique) VALUES ( '"+player.Name+"', '"+player.UniqueID+"' )" );
//Adds here what you give to the play to the register is automatically
}
}
//---------------------------------------------------
//---------------------------------------------------
My server RP
IP: 51.222.28.159:8194

KAKAN

@Hercules, download FAS account system. Remove the player.IP and put player.UID.
Repeat it in all the places. Don't do anything else, you're done :)
oh no