Hi,
I'm trying to write a small lottery plugin that pays a random amount of planets to a random player at the end of each map (very similar to lottery plugins for older ASECO's).
For the payment I want to use the plugin.donate.php, which should be able to make a payment from the server to a player (according to the description). But my attempt crashed UASECO (unfortunately I don't get any error messages).
I'm adding the dependence in the constructor: $this->addDependence('PluginDonate', Dependence::REQUIRED, '1.0.0', null);
And I'm trying to use the plugin like this: $aseco->plugins['PluginDonate']->admin_payment($aseco, $aseco->server->login, $targetLogin, $amountPlanets);
($targetLogin = login of the player who won the lottery)
I'm still new to PHP and I couldn't find any help on how to use the donate plugin to make a payment from the server. Thank you in advance.
Cheers,
Padawan
Use donate plugin for payments to players
Re: Use donate plugin for payments to players
You should use the pay method instead of the DonatePlugin: https://www.uaseco.org/dedicated-server/methods.php#Pay
Code: Select all
$billid = $aseco->client->query('Pay', 100, $login, $label);
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
-
- Posts: 2
- Joined: 06 Jun 2020, 18:33
Re: Use donate plugin for payments to players
Thank you. That does the job!
I'm not sure if you confused the arguments. At least I used it like this:

I'm not sure if you confused the arguments. At least I used it like this:
Code: Select all
$billid = $aseco->client->query('Pay', $login, 100, $label);
- w1lla
- Posts: 2287
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Use donate plugin for payments to players
That is the correct one.thepadawan wrote: ↑30 Jun 2020, 17:46 Thank you. That does the job!![]()
I'm not sure if you confused the arguments. At least I used it like this:Code: Select all
$billid = $aseco->client->query('Pay', $login, 100, $label);
TM² Info
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
Who is online
Users browsing this forum: No registered users and 1 guest