AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] Bank (https://forums.alliedmods.net/showthread.php?t=294511)

eyal282 04-08-2018 16:04

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2586769)
I added something, now when the database is ready, this code will fire :
PHP Code:

public void Bank_DatabaseReady()
{
    
//Database connected and ready
        //Do your stuff that require bank after this has been fired.



I will use Bank_Create in Bank_DatabaseReady, not OnPluginStart like your test file.

eyal282 04-09-2018 06:02

Re: [INC] Bank
 
I think the bank fails to both create a user and change his balance at once, either one gets done and the first change of balance fails.

Arkarr 04-09-2018 07:26

Re: [INC] Bank
 
Quote:

Originally Posted by eyal282 (Post 2586837)
I think the bank fails to both create a user and change his balance at once, either one gets done and the first change of balance fails.

I'll do a few test tonight.

Arkarr 04-09-2018 14:50

Re: [INC] Bank
 
Yeah, no. It's working fine. See the exemple plugin and "test crash" command.

eyal282 04-09-2018 15:30

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2586932)
Yeah, no. It's working fine. See the exemple plugin and "test crash" command.

Perhaps the database has the issues?

Arkarr 04-09-2018 15:36

Re: [INC] Bank
 
Quote:

Originally Posted by eyal282 (Post 2586936)
Perhaps the database has the issues?

I don't know what's your database setup.

eyal282 04-10-2018 08:08

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2586938)
I don't know what's your database setup.

Alright, thanks for the snippet :D

Arkarr 04-10-2018 11:01

Re: [INC] Bank
 
Quote:

Originally Posted by eyal282 (Post 2587031)
Alright, thanks for the snippet :D

I hope I helped you.

eyal282 04-18-2018 06:09

Re: [INC] Bank
 
You should make it possible to push all clients online and offline into a dynamic array.

iGANGNAM 05-08-2020 12:09

Re: [INC] Bank
 
It's bad for production. It doesn't cache any data, mysql queries blocks whole server thread (var increase)
I had this plugin for few currency platform, but turn out after 50k db entries I have to rewrite whole thing....

Arkarr 05-09-2020 13:15

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2698896)
It's bad for production. It doesn't cache any data, mysql queries blocks whole server thread (var increase)
I had this plugin for few currency platform, but turn out after 50k db entries I have to rewrite whole thing....

Yep.. this is bad. I could rewrite it tho.

iGANGNAM 05-10-2020 05:45

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2699073)
Yep.. this is bad. I could rewrite it tho.

That would be lovely

Arkarr 05-15-2020 10:08

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2699206)
That would be lovely

Okay, it's done. If you could be kind enough to give me a feedback, that be great :) !

iGANGNAM 05-20-2020 06:25

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2700304)
Okay, it's done. If you could be kind enough to give me a feedback, that be great :) !

Did I miss the update? It still with Fast Query but I'll try it.
Edit: It's 10 times better now, just var still can go up to 1.0+ if u check few banks a lot times :)
Found issue. When you set value from the exterior way (not in-game), it won't get updated on the game
So if you update value in-game it will also be going to update with in-game value not current value in the database.
That's kind of the downside of the plugin now. It breaks the most important feature for me...
Sometimes players say they have 0 currency even DB value is there.
Complete mess with bank list after update
https://i.imgur.com/4bg3Itu.png

Arkarr 05-20-2020 12:01

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2701193)
Did I miss the update? It still with Fast Query but I'll try it.
Edit: It's 10 times better now, just var still can go up to 1.0+ if u check few banks a lot times :)
Found issue. When you set value from the exterior way (not in-game), it won't get updated on the game
So if you update value in-game it will also be going to update with in-game value not current value in the database.
That's kind of the downside of the plugin now. It breaks the most important feature for me...
Sometimes players say they have 0 currency even DB value is there.
Complete mess with bank list after update
https://i.imgur.com/4bg3Itu.png

Oh.. Oh wow. Sorry. Have you made a backup ? Snap. I am sorry. I actually tested only with 1 bank. Damn it. Stupid me.

I'll fix it up.

iGANGNAM 05-22-2020 06:01

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2701241)
Oh.. Oh wow. Sorry. Have you made a backup ? Snap. I am sorry. I actually tested only with 1 bank. Damn it. Stupid me.

I'll fix it up.

Maybe it would be possible to make some native who returns all bank currencies? So fewer SQL queries? Or it's going to be fully cached?

Arkarr 05-22-2020 12:57

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2701564)
Maybe it would be possible to make some native who returns all bank currencies? So fewer SQL queries? Or it's going to be fully cached?

I don't get what you mean but right now, there isn't a lot of queries at all.

iGANGNAM 07-18-2020 06:23

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2701241)
Oh.. Oh wow. Sorry. Have you made a backup ? Snap. I am sorry. I actually tested only with 1 bank. Damn it. Stupid me.

I'll fix it up.

Did u made that fix up?

Arkarr 07-19-2020 10:43

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2710574)
Did u made that fix up?

Oups sorry no. I forgot. I'll do it tonight / tomorrow.

iGANGNAM 07-25-2020 05:21

Re: [INC] Bank
 
Quote:

Originally Posted by Arkarr (Post 2710776)
Oups sorry no. I forgot. I'll do it tonight / tomorrow.

Maybe you want to upload code to github? So people could make Pull Requests

Arkarr 11-16-2020 07:57

Re: [INC] Bank
 
Should be fixed, all the issues and caching problems too.
https://github.com/Arkarr/SM-Bank/

iGANGNAM 11-25-2020 11:37

Re: [INC] Bank
 
What exactly changed from 3.0 to 4.0?
https://i.imgur.com/4FnVH1e.png

Arkarr 11-25-2020 14:17

Re: [INC] Bank
 
Quote:

Originally Posted by iGANGNAM (Post 2726203)
What exactly changed from 3.0 to 4.0?
https://i.imgur.com/4FnVH1e.png

I might have forgot to change version number between X.Y and 3.0. Then did this small modification on 4.0.


All times are GMT -4. The time now is 17:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.