Jump to content
  • 0

How do I give new players a Starting Bank?


Bricktop

Question

Hey guys I just added coins and Banking to my server and was wondering how I would go about adding 300k coins to a new players bank so they would have it when they log in. But Of course I don't want them to be able to just change their name and get it again so I figure it would need to be tied to their steam UID? Any help would be appreciated. 

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You need to create a trigger:

 

CREATE TRIGGER `bankingIssueFix` AFTER INSERT ON `player_data`
 FOR EACH ROW INSERT INTO banking_data
( PlayerUID, PlayerName, BankSaldo,  LastUpdated)
VALUES
(NEW.PlayerUID, NEW.PlayerName, 0, NOW())

 

Just run the above code and change the 0 to 300000

 

Credit: @Rocu :

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...