Money Reset on login - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Money Reset on login (
/showthread.php?tid=584608)
Money Reset on login -
bimax999 - 06.08.2015
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!! ++++
Re: Money Reset on login - TheLegend1 - 06.08.2015
Show OnPlayerconnect
Re: Money Reset on login -
1nspire - 06.08.2015
Are you using DINI or YINI for saving the players stats?
Re: Money Reset on login -
bimax999 - 06.08.2015
Look !
http://pastebin.com/9ujyZpMR
Re: Money Reset on login -
MarvinPWN - 06.08.2015
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.
Re: Money Reset on login -
bimax999 - 06.08.2015
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
Re: Money Reset on login -
MarvinPWN - 06.08.2015
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.
Re: Money Reset on login -
bimax999 - 06.08.2015
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 );
|
Re: Money Reset on login -
Vaishnav - 06.08.2015
Remove ResetPlayerCash(playerid); from OnPlayerLogin , it should work then.
Re: Money Reset on login -
bimax999 - 06.08.2015
Quote:
Originally Posted by Vaishnav
Remove ResetPlayerCash(playerid); from OnPlayerLogin , it should work then.
|
Not Work ..the Money doubles ...5k=10k .. on connect