[FilterScript] LorencBank (SQLite Bank system)
#1


(Banking system for servers)
What is this?
Well of course, it's a banking script that allows you to store money inside your bank, it saves as well as loading.
Pretty basic thing, I saw someone release a bank script that had an invalid link, so to those users, you may use this...
It's not an edit, it had been fully scripted from scratch.

You can have either a DIALOG based bank or a command based type.

That can be toggled with a define.
pawn Код:
//#define DIALOG_VERSION
#define COMMAND_VERSION
(Currently using the Command version once uncommented)

Logs/Updates
Код:
 
** Just released
Screen Shots (Preview)
Click Here Since the image is fairly large.

Credits
ZCMD creator - ZeeX
Lorenc - Bank script
SAMP - Implementing SQLite

Bugs/Suggestions
This filterscript has Not been fully tested, bugs will be fixed in future versions if reported, simply report them on the thread, ill check.

Download


I rushed this, going somewhere, ill edit and post more stuff after im back =D
Reply
#2

Woow Looks Nice
Can i Have The sampgui Call Of Duty XD
Reply
#3

nice man

but i get this error on complie

Код:
C:\Users\Family\Desktop\underwork\filterscripts\bank.pwn(102) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Quote:
Originally Posted by Loading...
Посмотреть сообщение
nice man

but i get this error on complie

Код:
C:\Users\Family\Desktop\underwork\filterscripts\bank.pwn(102) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
#include <a_samp>
#include <zcmd>

OR Maybe You Delete 1 Text On Script
pawn Код:
CMD:bank(playerid, params[])
{
    #if defined DIALOG_VERSION
        ShowPlayerDialog(playerid, DIALOG_BANK_MENU, DIALOG_STYLE_LIST,""#DIALOG_TITLE" - Bank","Withdraw\nDeposit\nAccount Information","Select", "Cancel");
    #endif
    #if defined COMMAND_VERSION
    new string[128];
    if(isnull(params)) SendLBankMessage(playerid, "/bank [WITHDRAW/DEPOSIT/ACCOUNT]");
    else if(!strcmp(params, "withdraw", true, 8))
    {
        new amount[24];
        strcpy2(amount, params, 0, 9);

        if(!IsNumeric(amount)) return SendLBankMessage(playerid, "Numeric Digits allowed only.");
        else if(strval(amount) > gPlayerData[playerid][P_BANK_MONEY]) return SendLBankMessage(playerid, "You cannot withdraw this much.");
        else if(strval(amount) < 0) return SendLBankMessage(playerid, "You cannot withdraw this much.");
        else
        {
            GivePlayerMoney(playerid, strval(amount));
            gPlayerData[playerid][P_BANK_MONEY] = gPlayerData[playerid][P_BANK_MONEY] - strval(amount);
            format(string, sizeof(string), "You have withdrawed $%d dollars.", strval(amount));
            SendLBankMessage(playerid, string);
        }
    }
    else if(!strcmp(params, "deposit", true, 7))
    {
        new amount[24];
        strcpy2(amount, params, 0, 8);

        if(!IsNumeric(amount)) return SendLBankMessage(playerid, "Numeric Digits allowed only.");
        else if(strval(amount) > GetPlayerMoney(playerid)) return SendLBankMessage(playerid, "You cannot withdraw this much.");
        else if(strval(amount) < 0) return SendLBankMessage(playerid, "You cannot withdraw this much.");
        else
        {
            GivePlayerMoney(playerid, -strval(amount));
            gPlayerData[playerid][P_BANK_MONEY] = gPlayerData[playerid][P_BANK_MONEY] + strval(amount);
            format(string, sizeof(string), "You have deposited $%d dollars.", strval(amount));
            SendLBankMessage(playerid, string);
        }
    }
    else if(!strcmp(params, "account", true, 7))
    {
        format(string, sizeof(string), "{FFFFFF}Your current bank account:\n\nBank Money: $%d\nCurrent Money: $%d", gPlayerData[playerid][P_BANK_MONEY], GetPlayerMoney(playerid));
        ShowPlayerDialog(playerid, 69+1000, DIALOG_STYLE_MSGBOX,""#DIALOG_TITLE" - Bank", string, "Ok", "");
    }
    else return SendLBankMessage(playerid, "/bank [WITHDRAW/DEPOSIT/ACCOUNT]");
    #endif
    return 1;
}
Reply
#5

Quote:
Originally Posted by Loading...
Посмотреть сообщение
nice man

but i get this error on complie

Код:
C:\Users\Family\Desktop\underwork\filterscripts\bank.pwn(102) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
You might need to search around for the isnull define... I think its by ****** but yeah...


Thanks for the comments, lol the GUI for my server isn't complete yet, still fixing some positions ETC.

Reply
#6

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение

Monopoly!

Quote:
Originally Posted by Loading...
Посмотреть сообщение
nice man

but i get this error on complie

Код:
C:\Users\Family\Desktop\underwork\filterscripts\bank.pwn(102) : error 017: undefined symbol "isnull"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Like already said, include ZCMD. I'm surprised that's the only error you got.
Reply
#7



*Bing, Bing*
Its cow compatible!
*Bing, Bing*

Lol thanks for the comment hiddos
Reply
#8

Looks pritty good nice done.
Reply
#9

Nice, i need something like this, test later..
Reply
#10

Nice to see that you're using SQLite, but you should probably rectify your credits, SA-MP only use a plugin for SQLite implementation, they didn't make SQLite.
Reply
#11

How did you put picture in Dialog?
Reply
#12

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Nice to see that you're using SQLite, but you should probably rectify your credits, SA-MP only use a plugin for SQLite implementation, they didn't make SQLite.
Changed the credits, "SAMP - Implementing SQLite"

Darn me for saying that lol :P

Thanks for the positive comments


Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
How did you put picture in Dialog?
SA-MP Blackops GUI
Reply
#13

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Changed the credits, "SAMP - Implementing SQLite"

Darn me for saying that lol :P

Thanks for the positive comments





SA-MP Blackops GUI
Samp black ops gui?But i am asking how you add to be that picture in it?
Reply
#14

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
Samp black ops gui?But i am asking how you add to be that picture in it?
Non of this stuff is related to the topic, well might be to the images, find out yourself. I never had been taught by anyone how to script
Reply
#15

i have this problem:

C:\Users\****\Desktop\new server drift\filterscripts\bank.pwn(29) : fatal error 111: user error: You cannot have both versions defined!!


Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


I want to make and other places at sf and lv ,how i can do this??
Reply
#16

One of this must be quted..

pawn Код:
//#define DIALOG_VERSION
#define COMMAND_VERSION
or

pawn Код:
#define DIALOG_VERSION
//#define COMMAND_VERSION
Reply
#17

Great release...
Reply
#18

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
Samp black ops gui?But i am asking how you add to be that picture in it?
Go to your San Andreas directory and open sampgui.png and edit it..

Sorry for off topic.
Reply
#19

really nice.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)