hiquezerah
New Member
- Joined
- Dec 24, 2020
- Messages
- 11
- Reaction score
- 1
I am using myacc
hello guys, I'm looking for a way to pull a function to the twig file, I'm making some changes in my character view.
I'm wanting to pull a value from a storage that the player has for the twig.
Example:
View attachment 68432
I managed to add this function in php and it worked. But I'm not able to use it in a twig, could someone help me?
Function.php
But now I'm needing to add to the twig file.
Example:
View attachment 68433
could someone tell me how can i call the "reborn" function inside character.html.twig?
@slaw
hello guys, I'm looking for a way to pull a function to the twig file, I'm making some changes in my character view.
I'm wanting to pull a value from a storage that the player has for the twig.
Example:
View attachment 68432
I managed to add this function in php and it worked. But I'm not able to use it in a twig, could someone help me?
Function.php
function reborn(){
global $db, $config;
$resposta = $db->query('SELECT * FROMplayer_storage
WHEREKEY
= 30024;');
return $resposta;
}
using these 2 codes I managed to add to php.$rebornado = 0;
foreach(reborn() as $rbStorage){
if ($rbStorage['player_id'] == $listPlayer['id']){
echo'<td>Rebornado level<br>'. $rbStorage['value'] . '</td>';
$rebornado = 1;
break;
}
}
if ($rebornado == 0)
echo'<td>Não rebornado</td>';
$rebornado = 0;
But now I'm needing to add to the twig file.
Example:
View attachment 68433
could someone tell me how can i call the "reborn" function inside character.html.twig?
@slaw