Author Topic: Simple Account System [using MSSQL]  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Simple Account System [using MSSQL]
« on: May 25, 2009, 11:53:31 am »
Script Name: Simple Account System (using MSSQL functions by CurryWurst)
Script Description: This script is useful for scripters if they wish to create simple account system for the server. All data stored in database.txt file.
Original Author(s): CurryWurst (MSSQL and account functions, helping in testing , error fixing), Irlandec(command&other coding)
Core Version: 2.6.5
Compile Test: Passed
Code: [Select]
//AccExists function presentation
                           function AccExists(Name: string): integer;
  i: integer;
  result:= -1;
  for i:= 0 to GetArrayLength(database) - 1 do
    if (GetPiece(database[i], #9, 0) = Name) then
      result:= i;
//End of presentation

Short HOWTO:
 - Usage of MSSQL functions(how to make some magics with data) explained here
 - Basic commands are:
     /create [passhere] - creates an account (Account name is player's nickname) with a password(current password limit is 4-12 chars, changable)
    /login [passhere] - logins to an existing account
    /logout - logically
    /changepass [passhere] - when logged in, you can change your existing password(limitations are same , but if you want to modify it, you have to modify 2 lines(in /create command and in /login command))
    /delete - deletes your account data from database
If you have some questions or need explanation , feel free to post here ;)

Instalation notes: Open archive and extract all files and folders in your soldatserver root directory.

IMPORTANT NOTE: This script is for scripter-use , not for server owners(at least if they can code)

Feel free to edit or use it, but be so kind and mention the names of creators ;) Cheers  :D

« Last Edit: June 14, 2009, 08:48:05 am by Irlandec »

Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Re: Simple Account System [using MSSQL]
« Reply #1 on: June 13, 2009, 04:19:42 pm »
UPDATE: - Updated MySSQL functions
             - Added /delete command (deletes your account data from database)]
             - Testing stuff i forgot to delete is banished now

Note: My yesterday's update contained an ugly bug , so re-download the script please.

« Last Edit: June 14, 2009, 08:47:03 am by Irlandec »

Offline Cehennem Kamyonu

  • Major(1)
  • Posts: 2
Re: Simple Account System [using MSSQL]
« Reply #2 on: July 01, 2012, 11:17:23 am »
How do we add this? --> if player account don't login in 30 seconds server will kick?