i use the jailbust module for my game and found a bug
in the admin panel you can set the max time that you can be in jail
but when i do a crime or steal anything from shops i always end up in jail with that max time there is set in the admin panel
even when i put myself in jail for any time it will always be that max jail time
i found this part in jailbust and maybe the problem is there
Code: Select all
$result =
$db->Execute("select reason.value as reason, h1.value as level, u.username, u.id,
(jail.value + (length.value*60) - ?) / 60 as endtime
from users u
left join (select * from user_stats where stat_type = 7) h1 on u.id = h1.user_id
inner join user_variables jail on u.id = jail.user_id
and jail.variable_id = ?
inner join user_variables length on u.id = length.user_id
and length.variable_id = ?
inner join user_variables reason on u.id = reason.user_id
and reason.variable_id = ?
where (jail.value + (length.value*60) - ?)/ 60 between 0 and ?
order by jail.value + (length.value*60) - time_to_sec(now()), u.id",
time(), $jailId, $jailLengthId, $jailReasonId, time(), $param1);