[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


Messages In This Thread
[INC]KID UserDataBase '''UPDATED''' - by tHe_kiD - 22.11.2008, 18:20
Re: [INC]KID UserDataBase - by hooooi - 22.11.2008, 18:24
Re: [INC]KID UserDataBase - by Kowalski - 22.11.2008, 18:27
Re: [INC]KID UserDataBase - by tHe_kiD - 22.11.2008, 18:34
Re: [INC]KID UserDataBase - by hooooi - 22.11.2008, 18:34
Re: [INC]KID UserDataBase - by Kowalski - 22.11.2008, 18:41
Re: [INC]KID UserDataBase - by matt2127 - 22.11.2008, 18:50
Re: [INC]KID UserDataBase - by Kowalski - 22.11.2008, 19:00
Re: [INC]KID UserDataBase - by matt2127 - 22.11.2008, 19:01
Re: [INC]KID UserDataBase - by [THC]Rei_Mafioso - 23.11.2008, 14:29

Forum Jump:


Users browsing this thread: 1 Guest(s)