SA-MP Forums Archive
[Include] [INC]KID UserDataBase '''UPDATED''' - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC]KID UserDataBase '''UPDATED''' (/showthread.php?tid=55951)



[INC]KID UserDataBase '''UPDATED''' - tHe_kiD - 22.11.2008

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
Download link: http://pastebin.com/f6324b980

Lennon tHe_kiD


Re: [INC]KID UserDataBase - hooooi - 22.11.2008

no bad
i like it


Re: [INC]KID UserDataBase - Kowalski - 22.11.2008

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

Ковалски


Re: [INC]KID UserDataBase - tHe_kiD - 22.11.2008

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


Re: [INC]KID UserDataBase - hooooi - 22.11.2008

i say i like it
i don't say i have download it


Re: [INC]KID UserDataBase - Kowalski - 22.11.2008

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).

Ковалски


Re: [INC]KID UserDataBase - matt2127 - 22.11.2008

How do you write strings?


Re: [INC]KID UserDataBase - Kowalski - 22.11.2008

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


Ковалски


Re: [INC]KID UserDataBase - matt2127 - 22.11.2008

Oh, I failed to see that.


Re: [INC]KID UserDataBase - [THC]Rei_Mafioso - 23.11.2008

Nice
I will use it.