Money Reset on login
#1

I am a problem on my server rpg.
When login in my server resets money..and have 00000000..
Why is problem?
Sorry my english
REP!! ++++
Reply
#2

Show OnPlayerconnect
Reply
#3

Are you using DINI or YINI for saving the players stats?
Reply
#4

Look !

http://pastebin.com/9ujyZpMR
Reply
#5

When you load the player (after he logged in) then you have to set the money.
If you don't know what I mean you can send us the code of the loading and we can show it you.
Reply
#6

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
When you load the player (after he logged in) then you have to set the money.
If you don't know what I mean you can send us the code of the loading and we can show it you.
Where can I find money that code for
Reply
#7

You have to save and to load the money of the players. Where you load the player you have to give the player his/her money.
Reply
#8

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
You have to save and to load the money of the players. Where you load the player you have to give the player his/her money.
These ?

Quote:

PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);

mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Money=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCash], pName);mysql_tquery( mysql_db, szQuery );

PlayerInfo[ playerid ][ pCash ] = cache_get_field_content_int( 0, "Money", mysql_db );

Reply
#9

Remove ResetPlayerCash(playerid); from OnPlayerLogin , it should work then.
Reply
#10

Quote:
Originally Posted by Vaishnav
Посмотреть сообщение
Remove ResetPlayerCash(playerid); from OnPlayerLogin , it should work then.
Not Work ..the Money doubles ...5k=10k .. on connect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)