MajikalJoker Posted December 10, 2021 Posted December 10, 2021 okay so.... ive been trying so many ways to do this but can not figure it out... im wanting o make it to where players get a daily event telling them how much interest they got in their bank for the day. ive tried about 8 different ways to do it but i can not get it to work, i cant get it to call the bank interest amount without breaking the script, and if i do it without i can make an event happen but it does not show how much they got and its blank on almost all info..... can anyone help? Quote
SRB Posted December 11, 2021 Posted December 11, 2021 Then post the ways you have tried, and people can help fix your code to do what you want. Bottle feeding you won't help you out much - you won't learn to debug, process plan, etc. Posting what you have, and working along with suggestions will give you a far more thorough understanding. Quote
Venox606 Posted December 16, 2021 Posted December 16, 2021 Here you go one try aWYoJHJbJ2RvbmF0b3JkYXlzJ10gPT0gMCkNCgl7DQoJJGRiLT5xdWVyeSgiSU5TRVJUIElOVE8gZXZlbnRzIFZBTFVFUygnJywneyRyWyd1c2VyaWQnXX0nLCd1bml4X3RpbWVzdGFtcCgpJywnMCcsJ0NvbmdyYXR1bGF0aW9ucywgeW91IGdhaW5lZCAkaW50cyEnKSIpOw0KCX0NCgllbHNlDQoJew0KCSRkYi0+cXVlcnkoIklOU0VSVCBJTlRPIGV2ZW50cyBWQUxVRVMoJycsJ3skclsndXNlcmlkJ119JywndW5peF90aW1lc3RhbXAoKScsJzAnLCdDb25ncmF0dWxhdGlvbnMsIHlvdSBnYWluZWQgJGludHNkIScpIik7DQoJfQ== Also not exact but very similar 2471643d2464622d3e7175657279282253454c454354202a2046524f4d20757365727320574845524520646f6e61746f7264617973203e203022293bda97768696c65282472643d2464622d3e66657463685f726f77282471642929da97bda96576656e745f616464282472645b27757365726964275d2c22596f75206761696e20736f6d6520696e74657372657374222c2463293bda97d Quote
URBANZ Posted December 16, 2021 Posted December 16, 2021 2 hours ago, Venox606 said: Here you go one try if($r['donatordays'] == 0){ $db->query("INSERT INTO events VALUES('','{$r['userid']}','unix_timestamp()','0','Congratulations, you gained $ints!')"); }else{ $db->query("INSERT INTO events VALUES('','{$r['userid']}','unix_timestamp()','0','Congratulations, you gained $intsd!')"); } haha definitely made me laugh, you do know if you quote encoded code it decodes it?? 1 Quote
MajikalJoker Posted December 16, 2021 Author Posted December 16, 2021 thank you for the help, we are not 100% sure that works due to the fact that everytime we try to add something like $ints= $r['bankmoney']/100*3 ; $intsd= $r['bankmoney']/100*8 ; $ints=money_formatter($ints); $intsd=money_formatter($intsd); anywhere in the daily con it breaks the whole thing Quote
URBANZ Posted December 16, 2021 Posted December 16, 2021 1 hour ago, MajikalJoker said: thank you for the help, we are not 100% sure that works due to the fact that everytime we try to add something like $ints= $r['bankmoney']/100*3 ; $intsd= $r['bankmoney']/100*8 ; $ints=money_formatter($ints); $intsd=money_formatter($intsd); $ints= $r['bankmoney']/100*3 ; $intsd= $r['bankmoney']/100*8 ; $ints=money_formatter($ints); $intsd=money_formatter($intsd); anywhere in the daily con it breaks the whole thing Add me on discord URBANZ#0001 Can help quicker on there 1 Quote
peterisgb Posted December 17, 2021 Posted December 17, 2021 (edited) Here is mine, I just copied and pasted 😄 if (17 == date('G')) { $qm = $db->query("SELECT userid, bankmoney FROM users WHERE bankmoney >= '1'"); while ($rm = $db->fetch_row($qm)) { $money = $rm['bankmoney']/100*2; event_add($rm['userid'], "Your Bank Interest of \$<span class=green>".number_format($money)."</span> has been credited to your bank account.", $c); } $db->query('UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney > 0'); } Snapshot of output. attached Edited December 17, 2021 by peterisgb added output 1 Quote
MajikalJoker Posted December 17, 2021 Author Posted December 17, 2021 3 hours ago, peterisgb said: Here is mine, I just copied and pasted 😄 if (17 == date('G')) { $qm = $db->query("SELECT userid, bankmoney FROM users WHERE bankmoney >= '1'"); while ($rm = $db->fetch_row($qm)) { $money = $rm['bankmoney']/100*2; event_add($rm['userid'], "Your Bank Interest of \$<span class=green>".number_format($money)."</span> has been credited to your bank account.", $c); } $db->query('UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney > 0'); } if (17 == date('G')) { $qm = $db->query("SELECT userid, bankmoney FROM users WHERE bankmoney >= '1'"); while ($rm = $db->fetch_row($qm)) { $money = $rm['bankmoney']/100*2; event_add($rm['userid'], "Your Bank Interest of \$<span class=green>".number_format($money)."</span> has been credited to your bank account.", $c); } $db->query('UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney > 0'); } Snapshot of output. attached is this used in the daily cron? Quote
MajikalJoker Posted December 17, 2021 Author Posted December 17, 2021 11 minutes ago, peterisgb said: Hourly buddy okay, thank you, ill give it a try Quote
MajikalJoker Posted January 5, 2022 Author Posted January 5, 2022 we managed to get this working and fixed! Topic can be closed Quote
peterisgb Posted January 5, 2022 Posted January 5, 2022 13 hours ago, MajikalJoker said: we managed to get this working and fixed! Topic can be closed Thats good. Did mine help at all? Quote
MajikalJoker Posted January 6, 2022 Author Posted January 6, 2022 11 hours ago, peterisgb said: Thats good. Did mine help at all? Yes it did, it was able to point us in the direction we needed to go, Thank you! 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.