[Include] [INC]KID UserDataBase '''UPDATED'''
#1

Introduction

It's a little user database that you can control your account, like any other database

It's my first release here, and sorry for my bad english, i'm brazillian

Functions

KID_CreateAcc(playerid, password[]); - Creates an account.

KID_RemoveAcc(playerid); - Removes an account.

KID_CheckAccPassword(playerid, password[]); - Return "true" if the account password is correctly, and "false" if isn't correctly.

KID_AccExists(playerid); - Return true if the account exists, and false if the account doesn't exists.

KID_ChangeAccPassword(playerid, oldpassword[], newpassword[]); - Change the account password (under construction).

KID_SetAccValue(playerid, key[], value[]); - Sets a "key" with a text value.

KID_GetAccValue(playerid, key[]); - Gets a text value from a "key".

KID_SetAccInt(playerid, key[], value); - Sets a "key" with a numeric value.

KID_GetAccInt(playerid, key[]); - Gets a numeric value from a "key".

KID_SetAccFloat(playerid, key[], Float:value); - Sets a "key" with a float value.

Float:KID_GetAccFloat(playerid, key[]); - Gets a float value from a key.

Download: http://www.pastehere.com/?trunql

Other notes: This include don't use much space on your script, because it's was made by include "file".

Please post what u think about this script here, i'm not a super pawn scripter, but i'll do scripts better

Thanks to read.

Lennon tHe_kiD
Update 28/november/2008

All functions that return values (like KID_GetAccInt) now got the parвmeter "&value" (the parвmeter that is the variable to hold the value)

Example:

Code:
new PlayerMoney[MAX_PLAYERS]

public OnPlayerConnect(playerid)
{
   KID_GetAccInt(playerid, "money", PlayerMoney[playerid]);
}
New functions added
  • KID_SetAccSaveFolder(folderpatch[]) - Sets the folder in scriptfiles to save the accounts (the folder must exists, otherwise, a crash will occur)
  • KID_SetAccExtensions(extension[]) - Sets the extension of the acounts ( Dont needs the "." (point) in the beginning of the extension)

Download link: http://pastebin.com/f6324b980

Lennon tHe_kiD
Reply
#2

no bad
i like it
Reply
#3

Quote:
Originally Posted by hooooi
no bad
i like it
nice spam... there's no download link...

Ковалски
Reply
#4

yes, i was forgot that now it haves, look the first post
Reply
#5

i say i like it
i don't say i have download it
Reply
#6

Quote:
Originally Posted by hooooi
i say i like it
i don't say i have download it
strange, but okay


The script looks good.
Really easy to manage accounts.

But instead of creating "Account - XYZ.sav" files, I think "XYZ.account" is easier(or .acc).

Ковалски
Reply
#7

How do you write strings?
Reply
#8

Quote:
Originally Posted by iMatt™
How do you write strings?
With KID_SetAccValue() function.


Ковалски
Reply
#9

Oh, I failed to see that.
Reply
#10

Nice
I will use it.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)