08.05.2006, 12:44
(
Последний раз редактировалось DracoBlue; 11.09.2012 в 12:18.
)
Lots of guys asked for it, here it is. A filebased, crash-secure, easy-to-expand Userdatabase for SA-MP.
DUDB:
o Download
o @requires DUtils 1.10
o @requires DINI 1.6
Features
o Filebased user database functions
o Crash security
o Encrypted Passwords & Logincheck.
o More things easy to add on the fly!
o Readable with PHP, use following functions to decode fileformat
How To's
o change users password
How should download and use this?
Everyone who is to lazy to write an own Userdatabase management and want to use a heavy tested user database management. You should have skills in coding pawn/c, since it only exports the functions - no command handling in - thats what you have to do!
Crash security : How does it work?
Its saved at a .part file before removing the old file, so if the sever crashs while saving - no data lost!
Tested? How!?
This file has been tested while using on my testservers and with DTest, a library for fast coding-snippets testing. All tests went well, so it should work as expected!
How to set up a easy account?
Use udb_Create("Nickname","mypassword") to create a user with password=mypassword.
If you want to check the logins for this player, use udb_CheckLogin("Nickname","mypassword") - it should work!
If you want to set the clantag, use the new dUserSet("Nickname").("clantag","NEW").
If you want to set ASJKDHKSJDH use dUserSet("Nickname").("ASJKDHKSJDH ","jkhj123")
To get the value of "sads", type dUser("Nickname").("sads")
To remove the account use udb_Remove("Nickname") - it will return true, if the acc existed.
To rename an account use udb_renameUser("Nickname","NewNickname") - it will return true, if the acc existed.
Thats just a small insight, hope it will be useful.
Regards,
Jan (DracoBlue)
DUDB:
o Download
o @requires DUtils 1.10
o @requires DINI 1.6
Features
o Filebased user database functions
o Crash security
o Encrypted Passwords & Logincheck.
o More things easy to add on the fly!
o Readable with PHP, use following functions to decode fileformat
How To's
o change users password
How should download and use this?
Everyone who is to lazy to write an own Userdatabase management and want to use a heavy tested user database management. You should have skills in coding pawn/c, since it only exports the functions - no command handling in - thats what you have to do!
Crash security : How does it work?
Its saved at a .part file before removing the old file, so if the sever crashs while saving - no data lost!
Tested? How!?
This file has been tested while using on my testservers and with DTest, a library for fast coding-snippets testing. All tests went well, so it should work as expected!
How to set up a easy account?
Use udb_Create("Nickname","mypassword") to create a user with password=mypassword.
If you want to check the logins for this player, use udb_CheckLogin("Nickname","mypassword") - it should work!
If you want to set the clantag, use the new dUserSet("Nickname").("clantag","NEW").
If you want to set ASJKDHKSJDH use dUserSet("Nickname").("ASJKDHKSJDH ","jkhj123")
To get the value of "sads", type dUser("Nickname").("sads")
To remove the account use udb_Remove("Nickname") - it will return true, if the acc existed.
To rename an account use udb_renameUser("Nickname","NewNickname") - it will return true, if the acc existed.
Thats just a small insight, hope it will be useful.
Regards,
Jan (DracoBlue)