alejandro762
Well-Known Member
- Joined
- Sep 6, 2021
- Messages
- 227
- Reaction score
- 64
Hello
We want to know how we can call a storage from web (using znote AAC ),
As i discovered this:
So i decide made the same with another name:
on config.php added:
Then added the code on characterprofile.php:
It seems working, but when i add a new one under, with another storage it 'disappear' from website and doesn't show the number on website.
There is an alternative to call a storage using php , instead of 'like' with a exact number value ?
'15___' = 5 Digits, 6 digits doesn't work also.
We want to know how we can call a storage from web (using znote AAC ),
As i discovered this:
Lua:
if ($config['Ach']) {
$user_id = (int) $user_id;
$achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`={$user_id} LIMIT 1");
}
So i decide made the same with another name:
Code:
if ($config['Storage']) {
$user_id = (int) $user_id;
$storagePoint= mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '15___' AND `player_id`={$user_id} LIMIT 1");
}
on config.php added:
Code:
$config['Storage'] = true;
Then added the code on characterprofile.php:
Code:
<?php if ($config['Storage'] && (int)$storagePoint['sum'] > 0): ?>
<tr>
<td>Storage</td>
<td><?php echo (int)$storagePoint['sum']; ?></td>
</tr>
<?php endif; ?>
It seems working, but when i add a new one under, with another storage it 'disappear' from website and doesn't show the number on website.
There is an alternative to call a storage using php , instead of 'like' with a exact number value ?
'15___' = 5 Digits, 6 digits doesn't work also.