SA-MP Forums Archive
[Include] YBANK - Easy & Very simple to use! V1 - 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] YBANK - Easy & Very simple to use! V1 (/showthread.php?tid=274682)

Pages: 1 2


YBANK - Easy & Very simple to use! V1.6 - ylleron - 06.08.2011

YBANK
YLLERON'S BANK SYSTEM v1.7a

Hi, everyone. I start to work on a new, simple include called YBANK. It is a banking system. I try to create somethin' else than GM, more simple and easy to use. Maybe there is a better system, i don't know, but this is a good chance to make somethin', that can be better and better (UPDATES). In case you find a mistake or bug, don't hesitate to contact me via PM or send feedback below.

Ok, now i present you this (my) little script called YBANK.

Create a bank is very easy just find place where do you want to make pickup into bank.
pawn Код:
public OnGameModeInit()
{
    CreateYBank(1958.3783, 1343.1572, 15.3746, "State bank");
    return 1;
}
This make bank in location 1958.3783, 1343.1572, 15.3746 with name State bank.
If you would make more banks, just write another line with new float positions and name. Important settings in version 1.4a are set of dini. You have to create new folder in scriptfiles - "/scriptfiles/ybank/users/"

UPDATE: 1.4a
Код:
- This version contain new system - save to file
- Can delete account
- Account protected by password
UPDATE: 1.6
Код:
- Can change bank pass
- Added simple password hash
Another important settings is call function in gamemode. To call YBANK functions you could do this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    yOnDialogResponse(playerid, dialogid, response, listitem, inputtext);
    return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
        yOnPlayerPickUpPickup(playerid, pickupid);
    return 1;
}
simple example how to use this script:
pawn Код:
public OnPlayerSpawn(playerid)
{
        // this give cash to player's bank
        ybank_SetMoney ( playerid, 5000 );
}
Dialogs and pickups need call to main public of GM. At this time is all very simple and we continue.
To check, set, get, give, take someones money you will need this YBANK stocks:

Set bank cash:
Код:
ybank_SetMoney( playerid, cash )
Delete amout cash in bank:
Код:
ybank_Delete( playerid, cash )
Get cash in bank:
Код:
ybank_Money( playerid )
Add cash to bank
Код:
ybank_Add( playerid, cash )
Dialog has contain basic function for bank system
Код:
1. Account status
2. Draw amout
3. Deposit to bank
4. Transact cash
5. Change Pass
6. Delete account
Anyway i try to make it better and better, maybe that will be another good script, which help to everyone.


Download:
Mediafire v1: DOWNLOAD
MediaFire v1.4a: DOWNLOAD
Pastebin v1.6: VIEW

Newest:
Pastebin v1.7a:VIEW // Fixed - thanks to Bartando


Re: YBANK - Easy & Very simple to use! V1 - Rock_Ro - 06.08.2011

Nice and simple to use


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 06.08.2011

Quote:
Originally Posted by Rock_Ro
Посмотреть сообщение
Nice and simple to use
Thank you


Re: YBANK - Easy & Very simple to use! V1 - Kaperstone - 07.08.2011

nice
thanks


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 07.08.2011

YBANK UPDATED! V1.2
- Added new function as transaction to other player's account
- Fixed string in dialog by IsNumeric


Re: YBANK - Easy & Very simple to use! V1 - dud - 07.08.2011

nice


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 07.08.2011

Quote:
Originally Posted by dud
Посмотреть сообщение
nice
Thank you, i'll try to make diferent version


Re: YBANK - Easy & Very simple to use! V1 - Feras - 10.08.2011

this looks cool:

Код:
#define c_YBANK::   c_YBANK_
#define YBANK::     YBANK_
#define PDATA::     PDATA_
but what the hell for?


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 15.08.2011

UPDATE: 1.4a
- This version contain new system - save to file
- Can delete account
- Account protected by password


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 22.08.2011

UPDATE: 1.6
Код:
- Can change bank pass
- Added simple password hash
Recommended version. This release contain all important bank features.


Re: YBANK - Easy & Very simple to use! V1 - Bartando - 03.09.2011

Doesnt function for my i Create Bank (pickup) and i PickUp it and pickup hide and nothing
Do you know what is bad?


In czech:
Skusil jsem si vytvort banku no a kdyz jsem vzal pickup vytvoreny CreateYBank tak akorad pickup zmizel :/
Nevite co je spatne?


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 04.09.2011

Try this fixed version:

UPDATED to 1.7a
PASTEBIN


Re: YBANK - Easy & Very simple to use! V1 - Bartando - 07.09.2011

hello
I think you do not have this ---> } or this {


Re: YBANK - Easy & Very simple to use! V1 - Kaperstone - 07.09.2011

very nice include
GJ ylleron


Re: YBANK - Easy & Very simple to use! V1 - Bartando - 07.09.2011

Do you have any errors? With 1,7 Version? I have


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 07.09.2011

which ? Please report i will be glad


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 07.09.2011

Oh really . So sorry. I am gonna to fix it

Version fixed. Thanks to bartando !


Re: YBANK - Easy & Very simple to use! V1 - letters - 08.09.2011

I thought it's y_bank
Gonna try this.


Re: YBANK - Easy & Very simple to use! V1 - ylleron - 08.09.2011

Quote:
Originally Posted by letters
Посмотреть сообщение
I thought it's y_bank
Gonna try this.
What? what is y_bank ?


Re: YBANK - Easy & Very simple to use! V1 - Bartando - 08.09.2011

I don know how :/ What i must PRESS? :/ becose i stay at Arrow pickup and nothing do :/