You're welcome. Good luck!

Donation Credits
Rewards players with Economy credits for donations on a website
Total Downloads: 690 - First Release: Feb 23, 2016 - Last Update: Jan 22, 2018
- 5/5, 7 likes
-
only
app_config.php
? -
-
Help please:
sandboxAPIKey = Sandbox account ?
sandboxClientId = Client ID ?
liveAPIKey = PayPal account: (EMAIL PAYPAL)
liveClientId = Client ID -
sandboxAPIKey= Will be the PayPal REST Application Sandbox API Key (Hidden under the 'Secret' Link on the Sandbox Tab)
sandboxClientId = Will be the PayPal REST Application Sandbox Client ID (Listed as ClientID on the Sandbox Tab)
liveAPIKey = Will be the PayPal REST Application Live API Key (Hidden under the 'Secret' Link on the Live Tab)
liveClientId = Will be the PayPal REST Application Live Client ID (Listed as ClientID on the Live Tab) -
I need this to move people to a usergroup what do you need to get this done? I can pay if it will speed up the process
-
Are you using Oxide permissions or some other plugin to handle your current usergroups?
How are your usergroups structured? (Hierarchy)
Ideally, what is the process for a player to receive a new usergroup?Last edited by a moderator: Mar 11, 2016 -
Maybe update Line:221
I just use the database accounts together with the users balance
Code:string sqlText = "UPDATE Donations SET steam_id=@0, user=@1, amount=0, total_amount=@2+@3 WHERE steam_id=@0";
-
Hi i get 500 error what might that be?
-
[DOUBLEPOST=1457802372][/DOUBLEPOST] -
Code:
public void rewardUser(BasePlayer player) { if (!playerList.ContainsKey(player.userID)) { Puts("Trying to reward player, who haven't been loaded yet? Player name: " + player.displayName); return; } Dictionary<string, long> statsInit = getConnectedPlayerDetailsData(player.userID); string user = EncodeNonAsciiCharacters(player.displayName); string sqlText = "REPLACE INTO Donations (steam_id, user, amount, total_amount) " + "VALUES (@0, @1, 0, @2+@3)"; //Econ Reward DepositPlayerMoney(player, statsInit["amount"]); if (usingMySQL()) { var sql = Ext.MySql.Sql.Builder.Append(sqlText, player.userID, //0 user, //1 statsInit["amount"], //2 statsInit["total_amount"]); //3 _mySql.Insert(sql, _mySqlConnection, list => { if (list == 0) // Save to DB failed. Puts("OMG WE DIDN'T SAVED IT!: " + sql.SQL); }); } //Reload Player reloadUser(player); }
Propose to replace. I do not use your table donations and KEY
Code:string sqlText = "UPDATE Donations SET steam_id=@0, user=@1, amount=0, total_amount=@2+@3 WHERE steam_id=@0";
Code:DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `session_id` varchar(40) DEFAULT NULL, `steamid` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'steamid', `steamid64` bigint(20) DEFAULT NULL, `username` text COMMENT 'nickname', `lastname` text, `firstname` text, `threename` text, `phone` text, `email` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'email', `balance` bigint(20) DEFAULT NULL COMMENT 'balance', `total_amount` bigint(20) DEFAULT '0', `gold` int(10) DEFAULT '0', `level` int(3) DEFAULT NULL COMMENT 'account level', `exp` int(10) DEFAULT NULL COMMENT 'expirience', `urlprofile` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'URL STEAM', `remote_ip` varchar(100) CHARACTER SET cp1251 DEFAULT NULL COMMENT 'ipaddress', `last_ip` varchar(100) DEFAULT NULL, `avatar` text COMMENT 'avatar', `avatarmedium` text, `avatarfull` text, `status` text, `last_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=1528 DEFAULT CHARSET=utf8 CHECKSUM=1;
-
-
-
I have some trouble. Been following your instructions, filled everything in the app_config
When i try out i can login through steam, choose amount, proceed to paypal, login, checkout.
When redirected i come to "/reward.php?paid=1" with the text:
"Something went wrong with your Steam Account Authentication, please Log in to Steam."
The donation gets through and are paid(charged from the paypal account).
In the database it says its paid (all though no the amount of credit is showned).
Please help me -
-
Replace into in this case will always generate a new record, the statement is not specifying the tables primary key (id) so instead of updating (since it cant find the record) it will insert -
The donation.sql file would be a great contribution for those who can not mount the database, to me in particular I would go very well as well as not put
Thank you -
@OldeTobeh
when i try to create the table with your code :
#1067 - Invalid default value for 'last_date'
Code:CREATE TABLE IF NOT EXISTS `Donations` ( `steam_id` bigint(20) NOT NULL, `user` text NOT NULL, `amount` bigint(20) NOT NULL DEFAULT '0', `total_amount` bigint(20) NOT NULL DEFAULT '0', `last_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`steam_id`), UNIQUE KEY `steam_id` (`steam_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
then it crated the table idk ift right than set the config file but start getting this error:
i get this error :
Code:[Oxide] 12:01 AM [Debug] at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] in <filename unknown>:0 at MySql.Data.MySqlClient.Driver.Open () [0x00000] in <filename unknown>:0 at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0
-
why this error?
[DOUBLEPOST=1461035359,1460958461][/DOUBLEPOST]i need update for the new protocol mysql oxide
[DOUBLEPOST=1461118595][/DOUBLEPOST]@Wulf can you update this plugins plz??Attached Files:
-
-
How fix it?
Code:[Oxide] 22:55 [Error] DonateCredits.cs(29,27): error CS0234: The type or namespace name `Connection' does not exist in the namespace `Oxide.Ext.MySql'. Are you missing an assembly reference?