MySQL r40 help (money) ?
#1

Hello there, i have a little problem with "Money" when a player is logging in.
So the player money saves but, when he/she logging in and type his/her password correctly the
dates from the database loads just the colum with his/her "Money" not. Literally it loads the money but
after 3 seconds the money resets to 0.

I updated MySQL plugin/include (r40).

Here is the part where the "Money" loads from database on "LoginAccount" function:
PHP код:
cache_get_value_int0"Money"Accountplayerid ][ pMoney ] );
GivePlayerMoneyplayeridAccountplayerid ][ pMoney ] ); 
It's not correctly ?
Anyway before i tried like this:
PHP код:
GivePlayerMoneyplayeridcache_get_value_int0"Money"Accountplayerid ][ pMoney ] ) ); 
And it still did not work.
Please give me a tip or something..
Reply
#2

Is the whole script made by you? You probably have serversided money and you use giveplayermoney to set his money...
Reply
#3

Yes it is made by me. I don't understand what you mean "serversided money" what ? ). To be more clear. I use variabile "pMoney" to get the money from the database. Of course i will use "GivePlayerMoney" because it is the function to set player money. I really think that you understand what i mean, but you did not help me so much ).
Reply
#4

ServerSide money are the money made scriptwise to avoid money hacking and usually are using something different than GivePlayerMoney, and as you described that the money are gone after 3 seconds appeard to me to be server side money because there is no other way to get the money but take them after 3 seconds.

Also you may have ResetPlayerMoney somewhere else, probably not but you never know.

Also check to not have a duplication of GivePlayerMoney with wrong values.
Reply
#5

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
ServerSide money are the money made scriptwise to avoid money hacking and usually are using something different than GivePlayerMoney, and as you described that the money are gone after 3 seconds appeard to me to be server side money because there is no other way to get the money but take them after 3 seconds.

Also you may have ResetPlayerMoney somewhere else, probably not but you never know.

Also check to not have a duplication of GivePlayerMoney with wrong values.
Fixed, also i have this error:
PHP код:
[debugRun time error 20"Invalid index parameter (bad entry point)" 
I know this appear when there doesn't exist "main(){}" but in my gamemode exist and i updated all plugins and includes, do you have other solution to fix that ? I saw that is crashing my server after 20, 30 seconds because in console appears a spam of this messages.
Reply
#6

Bump
Reply
#7

Do you have #IF FILTERSCRIPT DEFINED or something like that?

or

#endif / #else?
Reply
#8

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Do you have #IF FILTERSCRIPT DEFINED or something like that?

or

#endif / #else?
Nope.
Reply
#9

GivePlayerMoney(playerid,cache_get_row_int(0,67)); change 67 to id of row. if "Money" in pinfo is third then id means to be 3.
Reply
#10

Quote:
Originally Posted by Astralis
Посмотреть сообщение
GivePlayerMoney(playerid,cache_get_row_int(0,67)); change 67 to id of row. if "Money" in pinfo is third then id means to be 3.
I fixed that, but i said that i have an error there after this problem.
PHP код:
[debugRun time error 20"Invalid index parameter (bad entry point)" 
I know this appear when there doesn't exist "main(){}" but in my gamemode exist and i updated all plugins and includes, do you have other solution to fix that ? I saw that is crashing my server after 20, 30 seconds because in console appears a spam of this messages.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)