[Include] [DUDB] Userdatabase Management (Version 2.4, 4th July) // 0.2#Ready
#1

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)
Reply
#2

Very nice.
Reply
#3

OMG Draco, You are the king of kings m8! thankyou!! I was working on my own save game system but it was taking ages! cheaz!
Reply
#4

Has been updated!

Please use latest DUtils 1.3 to get it working!

Regards,
Jan (DracoBlue)
Reply
#5

well ive done what it says in the the Notepad files and i get this
http://www.filelodge.com/files/room21/551578/HMTH.bmp


Dont advertise, don't hotlink such stupidly huge images, especially BMPs, and don't double post (as you had before I removed it).

- ******


SORRY ABOUT IT BEING BIG please help me
Reply
#6

you created a folder called scriptfiles?
Reply
#7

yea
Reply
#8


Please use latest DUtils 1.3 to get it working!

Do you use latest DUtils?
Reply
#9

yes
Reply
#10

will have a look at this tomorrow, its really late here .

Please doublecheck if you have all files and stuff, and REMEMBER; the dtest, is just a TEST not whole working loginsystem
Reply
#11

oh damn i want the whole logging system
Reply
#12

I need a permission: I modified this for use for own gamemode, am I allowed?
Reply
#13

i tried to do that but when i start server there reads that unable to load dudb.amx file
Reply
#14

Quote:
Originally Posted by Baliame
I need a permission: I modified this for use for own gamemode, am I allowed?
Of course, therefor I released it!
Anyways a Credits message would be great!

Quote:
Originally Posted by RamboPappa
i tried to do that but when i start server there reads that unable to load dudb.amx file
You can't use it as filterscript, you have to implement it somewhere.
Reply
#15

where
Reply
#16

Quote:
Originally Posted by grimreaper423
where
In your gamemode.
Reply
#17

can you explane what implement means?
sry i'm n00b
Reply
#18

I did write a small line "User database based off Dracoblue's DUDB".
Reply
#19

Quote:
Originally Posted by Baliame
I did write a small line "User database based off Dracoblue's DUDB".
Thanks! Cool if it is useful for you!

Regards,
Jan (DracoBlue)
Reply
#20

I got a problem when I tried to add a few more lines to save and read spawn coords. I changed the code in the Load script to

Код:
 new Float:pos[512];
 pos = strtok(tmpres,i,';');

 pwd_hash=strval(pos[0]);
 acc_state=strval(pos[1]);
 set(clantag,pos[2]);

 set(spawnCoords[PlayerId(nickname)][0],pos[3]);
 set(spawnCoords[PlayerId(nickname)][1],pos[4]);
 set(spawnCoords[PlayerId(nickname)][2],pos[5]);
However, no matter what I tried with the last 3 lines, they don't give the correct result. Writing spawnCoords into the file works fine, but it's always shown like this:

SpawnX: 1113.791094
SpawnY: 113.791094
SpawnZ: 13.791094 (The only one correct)

Because most of the things I tried results in the same output, it looks too me like there's a limit of max 3 settings or something?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)