I would rather use an array instead of an object for looping and adding things to the database:Quote:
I can not remember the setup for items, but i think for uridium it's probably something like this:
base64 encode following:
So it's like: ew0KICAidXJpZGl1bSI6IHsNCiAgICAiYSI6IDEwMDAwMDANCi AgfQ0KfQ==PHP Code:{ "uridium": { "a": 1000000 }}
as vpro
Best Regards w8
PHP Code:
$voucher = json_decode('[{"items_id":"uridium","amount":10000},{"items_id":"weapons_lasers_lf3","amount":10}]');
foreach($voucher as $item) {
$query->insert("accounts_items")
->values([
"id" => $item["items_id"],
"amount" => $item["amount"]
]);
$Database->execute($query);
}