Raised This Month: $248 Target: $400
 62% 

Money System [Bank | Donate | Give | Take | Time presents]


Post New Thread Reply   
 
Thread Tools Display Modes
Supremache
Veteran Member
Join Date: Sep 2019
Old 09-14-2020 , 20:51   Re: Money System [Bank | Donate | Give | Take | Time presents]
Reply With Quote #21

Quote:
Originally Posted by Bugsy View Post
Right now the plugin is pretty much useless since only one player can use it at a time due to your steam ID logic. At your skill level you need to thoroughly test a plugin and be confident it works before posting it for others to use.

Just use #define MAX_PLAYERS 32 , there is no need to first check if its defined doing it this way.
Code:
#if !defined MAX_PLAYERS     const MAX_PLAYERS = 32; #endif
Global variables meant for each player to have a slot in the array should be sized using MAX_PLAYERS + 1. Currently, each time a player connects, his steam id overwrites the last player that connected.
Code:
new szPlayerAuthid[32], szPlayerName[32], //This should be defined as : new szPlayerAuthid[ MAX_PLAYERS + 1 ][32] //Then get_user_authid( id, szPlayerAuthid[ id ] , charsmax(szPlayerAuthid[]))
Why are you getting the same players auth id twice?
Code:
public client_authorized(id) {     get_user_name( id, szPlayerName, charsmax(szPlayerName))
    get_user_authid( id, szPlayerAuthid, charsmax(szPlayerAuthid))
    get_user_authid(id, szAuthID, charsmax(szAuthID));
A disconnected player cannot execute a menu, no need to check if connected
Code:
public BankHandler(id, iBankMenu, iItem) {     if(is_user_connected(id) && iItem != MENU_EXIT)     {
You caring about the less details, and i will do all you said but please can you check it again if there's another thing need to get changes because i will go to my university and i cant do anything.
Supremache is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-14-2020 , 21:22   Re: Money System [Bank | Donate | Give | Take | Time presents]
Reply With Quote #22

I'm not caring about small details. At least make it use each players steam ID instead of only the latest connected players steam ID. The functionality is totally broken until you fix this.

Think about it like this:

Player 1 connects, his steam ID is saved to var1
I do transactions and it saves to my steam ID
Player 2 connects, his steam ID is saved to var1 (over-writing Player 1's steam ID)
When I do transactions, it is saved to Player 2's steam ID
When player 2 does transactions, it is saved to Player 2's steam ID

You need each players money to be saved under their own steam ID. This is huge.

Get it?
__________________

Last edited by Bugsy; 09-14-2020 at 21:23.
Bugsy is offline
Supremache
Veteran Member
Join Date: Sep 2019
Old 09-14-2020 , 21:31   Re: Money System [Bank | Donate | Give | Take | Time presents]
Reply With Quote #23

Quote:
Originally Posted by Bugsy View Post
I'm not caring about small details. At least make it use each players steam ID instead of only the latest connected players steam ID. The functionality is totally broken until you fix this.

Think about it like this:

Player 1 connects, his steam ID is saved to var1
I do transactions and it saves to my steam ID
Player 2 connects, his steam ID is saved to var1 (over-writing Player 1's steam ID)
When I do transactions, it is saved to Player 2's steam ID
When player 2 does transactions, it is saved to Player 2's steam ID

You need each players money to be saved under their own steam ID. This is huge.

Get it?
Ya, I think i get it
Thanks.
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Old 09-16-2020 , 15:32   Re: Money System [Bank | Donate | Give | Take | Time presents]
Reply With Quote #24

New Updates: v1.5, Edited Some codes.
Supremache is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:23.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode