How to get player money from SQL?
#5

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
If you just want to give a player some money, you don't need to know the money he has upfront.

PHP код:
UPDATE playerdata SET Money Money '%i' WHERE UserID '%i' 
Such a query gets the specified player's money and adds the given money to it, whatever money the player already has.

You may want to use a playername instead of a UserID to reference the correct player offline:
PHP код:
UPDATE playerdata SET Money Money '%i' WHERE PlayerName '%e' 
Nice but adding money like that is only useful when player is offline.
Reply


Messages In This Thread
How to get player money from SQL? - by DuyDang2412 - 06.03.2017, 10:00
Re: How to get player money from SQL? - by JessThompson - 06.03.2017, 14:03
Re: How to get player money from SQL? - by amirm3hdi - 06.03.2017, 21:23
Re: How to get player money from SQL? - by PowerPC603 - 07.03.2017, 00:14
Re: How to get player money from SQL? - by amirm3hdi - 25.04.2017, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)