SA-MP Forums Archive
MySQL Real Time updating? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: MySQL Real Time updating? (/showthread.php?tid=404612)



MySQL Real Time updating? - Moudzy123 - 03.01.2013

Hi, so recently I've gotten in touch with hosting servers, and it was time to go to MySQL, which I've never used before and luckily it's easy to configure. So I was wandering, if it was possible to update ingame things real time with mysql? i.e change someone's money or name via the database while they're still on.


Re: MySQL Real Time updating? - skullmuncher1337 - 03.01.2013

You could make an in-game command to UPDATE their money amount in the database and reload their money variable.


Re: MySQL Real Time updating? - ca2k - 03.01.2013

AFAIK people mostly do that on logout. The UPDATE etc.


Re: MySQL Real Time updating? - skullmuncher1337 - 03.01.2013

That is true^ as ca2k said. Now about changing someone's name while they are ingame, that is easy to do with just SetPlayerName, and a database UPDATE for that.

Also - read this: https://sampwiki.blast.hk/wiki/Mysql_tutorial