[Tutorial] Saving weapon data (MySQL)
#17

Sorry for bumping this, but I'm really interested in this. Anyway, I have a question:

Quote:

Purging obsolete data
Whenever a weapon is taken away, do not forget to delete it from the database otherwise it will be returned to the player when they next join. You could write a hook for ResetPlayerWeapons. It may also be possible that weapons that have no ammo are left behind in the table. This doesn't affect anything in-game and can be cleaned up with a query (delete where ammo = 0) when the server starts, or on a cron job.

Couldn't this be solved easily by deleting certain player's weapons info in the table before saving it again? This won't use much memory, as you obviously would save the player's weapons once per possesion (when the player disconnects).
Reply


Messages In This Thread
Saving weapon data (MySQL) - by Vince - 06.04.2014, 20:23
Re: Saving weapon data (MySQL) - by vassilis - 06.04.2014, 20:27
Re: Saving weapon data (MySQL) - by Luis- - 06.04.2014, 21:31
Re: Saving weapon data (MySQL) - by Binx - 06.04.2014, 23:38
Re: Saving weapon data (MySQL) - by iZN - 06.04.2014, 23:40
Re: Saving weapon data (MySQL) - by Luis- - 07.04.2014, 18:03
Re: Saving weapon data (MySQL) - by Vince - 07.04.2014, 18:15
Re: Saving weapon data (MySQL) - by Luis- - 07.04.2014, 20:26
Re: Saving weapon data (MySQL) - by Niko_boy - 08.04.2014, 04:14
Re: Saving weapon data (MySQL) - by dusk - 08.04.2014, 07:05
Re: Saving weapon data (MySQL) - by iRaiDeN - 08.04.2014, 12:25
Re: Saving weapon data (MySQL) - by Type-R - 08.08.2014, 17:20
Re: Saving weapon data (MySQL) - by iFarbod - 14.08.2014, 12:17
Re: Saving weapon data (MySQL) - by Type-R - 15.08.2014, 01:03
Re: Saving weapon data (MySQL) - by Sime30 - 08.02.2015, 21:34
Re: Saving weapon data (MySQL) - by AndySedeyn - 18.06.2015, 18:03
Re: Saving weapon data (MySQL) - by b3nz - 07.07.2015, 20:41
Re: Saving weapon data (MySQL) - by TenTen - 10.07.2015, 01:42
Re: Saving weapon data (MySQL) - by 2KY - 18.07.2015, 00:29
Re: Saving weapon data (MySQL) - by TenTen - 23.07.2015, 01:37
Re: Saving weapon data (MySQL) - by vassilis - 25.11.2015, 15:21
Re: Saving weapon data (MySQL) - by Vince - 25.11.2015, 19:38
Re: Saving weapon data (MySQL) - by vassilis - 26.11.2015, 12:23
Re: Saving weapon data (MySQL) - by vassilis - 05.03.2016, 13:47
Re: Saving weapon data (MySQL) - by SyS - 05.03.2016, 13:53
Re: Saving weapon data (MySQL) - by vassilis - 05.03.2016, 14:11
Re: Saving weapon data (MySQL) - by SyS - 05.03.2016, 14:12
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 02:22
Re: Saving weapon data (MySQL) - by PrO.GameR - 08.05.2016, 10:11
Re: Saving weapon data (MySQL) - by Konstantinos - 08.05.2016, 11:19
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 16:40
Re: Saving weapon data (MySQL) - by Konstantinos - 08.05.2016, 16:52
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 17:50
Re: Saving weapon data (MySQL) - by Konstantinos - 08.05.2016, 18:23
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 18:54
Re: Saving weapon data (MySQL) - by Vince - 08.05.2016, 19:41
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 20:34
Re: Saving weapon data (MySQL) - by vernz - 08.05.2016, 21:37
Re: Saving weapon data (MySQL) - by Richie© - 08.05.2016, 21:54
Re: Saving weapon data (MySQL) - by vernz - 09.05.2016, 18:14
Re: Saving weapon data (MySQL) - by oMa37 - 02.07.2016, 16:27
Re: Saving weapon data (MySQL) - by Konstantinos - 02.07.2016, 16:45
Re: Saving weapon data (MySQL) - by dragondex - 11.08.2016, 12:29
Re: Saving weapon data (MySQL) - by knuckleduster5 - 10.12.2016, 09:50
Re: Saving weapon data (MySQL) - by X337 - 10.12.2016, 09:52
Re: Saving weapon data (MySQL) - by knuckleduster5 - 10.12.2016, 10:10
Re: Saving weapon data (MySQL) - by X337 - 10.12.2016, 12:26
Re: Saving weapon data (MySQL) - by nikotragedy - 04.03.2017, 07:18
Re: Saving weapon data (MySQL) - by JustNothing - 04.04.2017, 14:12
Re: Saving weapon data (MySQL) - by Kane - 15.04.2017, 00:50
Re: Saving weapon data (MySQL) - by OuDayas - 29.01.2019, 12:41
Re: Saving weapon data (MySQL) - by Nawickaz - 12.01.2020, 17:16
Re: Saving weapon data (MySQL) - by Arramis - 29.04.2020, 13:58
Re: Saving weapon data (MySQL) - by Art - 29.04.2020, 14:01
Re: Saving weapon data (MySQL) - by MrCesar - 29.04.2020, 14:02
Re: Saving weapon data (MySQL) - by tuss - 29.04.2020, 21:54
Re: Saving weapon data (MySQL) - by JacksonWhite - 31.05.2020, 14:04

Forum Jump:


Users browsing this thread: 9 Guest(s)