- Joined
- Jun 12, 2010
- Messages
- 133
- Reaction score
- 1
Nice release, but check if already released before you post
I did check before I posted! But after, I posted I found it.
---------- Post added at 10:19 PM ---------- Previous post was at 10:18 PM ----------
where have to i put in this code :
Code:#region User coins daily system! string now = DateTime.Today.ToString(); using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { int usercredits = dbClient.getInt("SELECT userid FROM user_dailycoins WHERE userid = '" + userID + "' AND date = '" + now + "'"); int userCoins = 500; int staffShare = 1000; if (usercredits == 0 && _Rank < 2) { dbClient.runQuery("INSERT INTO user_dailycoins (userid, date) VALUES ('" + userID + "','" + now + "')"); dbClient.runQuery("UPDATE users SET credits = credits + '" + userCoins + "' WHERE id = '" + userID + "'"); sendData("BK" + "You have just received " + userCoins + " coins from the daily system!"); refreshValueables(true, false); } else { if (usercredits == 0 && _Rank == 3) { dbClient.runQuery("INSERT INTO user_dailycoins (userid, date) VALUES ('" + userID + "','" + now + "')"); dbClient.runQuery("UPDATE users SET credits = credits + '" + staffShare + "' WHERE id = '" + userID + "'"); sendData("BK" + "You have just received " + staffShare + " coins from the daily system!"); refreshValueables(true, false); } } } #endregion
This is a Release not a tut! Lol. Put it in your logging case! Above or below. don't matter. I tested and worked fine.
Last edited: