Vice Underdogs
Scripting => Script Showroom => Topic started by: MaDKilleR on March 20, 2012, 09:43:43 am
-
Account System
An Account System Script written by me. Data is stored in a SQL DataBase. Passwords are encrypted ( STORM256 Encryption (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=472.0) Credits to [VU]Stormeus )
Commands Included:
/c register, /c login.
Download: Clicky! (http://www.mediafire.com/?654cdr5yn4pczb3)
-
Very nice, but I think ur missing a GetBankCash function :P :D
PS: The download button is just EPIC!
-
Very nice, but I think ur missing a GetBankCash function :P :D
PS: The download button is just EPIC!
Updated :D
-
Oh god. I suggest everyone not use this script..
This is just the worst a sqlite script can get.
With bad I mean this bad:
function SetLogged( player, status )
{
QuerySQL( db, format( "UPDATE Accounts SET Logged='%s' WHERE Name='" + player.Name + "'", status ) );
}
function SetIPLogged( player, sameip )
{
QuerySQL( db, format( "UPDATE Accounts SET IP='%s' WHERE Name='" + player.Name + "'", sameip ) );
}
function GetPlayerIP( player )
{
local IP = GetSQLColumnData( QuerySQL( db, "SELECT IP FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( IP ) return IP;
else return 0;
}
function GetLevel( player )
{
local lvl = GetSQLColumnData( QuerySQL( db, "SELECT Level FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( lvl ) return lvl;
else return 0;
}
function GetCash( player )
{
local cash = GetSQLColumnData( QuerySQL( db, "SELECT Cash FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( cash ) return cash;
else return 0;
}
function GetBankCash( player )
{
local cash = GetSQLColumnData( QuerySQL( db, "SELECT BankCash FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( cash ) return cash;
else return 0;
}
function GetPass( player )
{
local pass = GetSQLColumnData( QuerySQL( db, "SELECT Pass FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( pass ) return pass;
else return 0;
}
function GetLogged( player )
{
local log = GetSQLColumnData( QuerySQL( db, "SELECT Logged FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( log ) return log;
else return 0;
}
Never, NEVER, use sqlite to store sessions or stuff like that. That's where squirrel and his Classes/tables/arrays kicks in.
-
Oh god. I suggest everyone not use this script..
This is just the worst a sqlite script can get.
With bad I mean this bad:
function SetLogged( player, status )
{
QuerySQL( db, format( "UPDATE Accounts SET Logged='%s' WHERE Name='" + player.Name + "'", status ) );
}
function SetIPLogged( player, sameip )
{
QuerySQL( db, format( "UPDATE Accounts SET IP='%s' WHERE Name='" + player.Name + "'", sameip ) );
}
function GetPlayerIP( player )
{
local IP = GetSQLColumnData( QuerySQL( db, "SELECT IP FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( IP ) return IP;
else return 0;
}
function GetLevel( player )
{
local lvl = GetSQLColumnData( QuerySQL( db, "SELECT Level FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( lvl ) return lvl;
else return 0;
}
function GetCash( player )
{
local cash = GetSQLColumnData( QuerySQL( db, "SELECT Cash FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( cash ) return cash;
else return 0;
}
function GetBankCash( player )
{
local cash = GetSQLColumnData( QuerySQL( db, "SELECT BankCash FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( cash ) return cash;
else return 0;
}
function GetPass( player )
{
local pass = GetSQLColumnData( QuerySQL( db, "SELECT Pass FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( pass ) return pass;
else return 0;
}
function GetLogged( player )
{
local log = GetSQLColumnData( QuerySQL( db, "SELECT Logged FROM Accounts WHERE Name='" + player.Name + "'" ), 0 );
if ( log ) return log;
else return 0;
}
Never, NEVER, use sqlite to store sessions or stuff like that. That's where squirrel and his Classes/tables/arrays kicks in.
Thankx for your Tip. :D