I thought about something, I was like I get on these hotels and you realize these users go away with coins, getting millions and millions of coins, and you know... that slows the server down with a quickness, because coins are what's mostly bought in the hotels anyway, besides furniture. So I've coded a script, where if a user has exceeded the limit, then they will reduce back to whatever your limit is.
The code:
It's been revised and works.
PHP Code:
<?php
include('core.php');
$limit = 100000000;
if($myrow['credits'] > $limit)
{
echo "<script language=\"JavaScript\">\n;
alert('Your coins have exceeded the hotels limit, so you are being reduced to the limit.');\n;
</script>";
mysql_query("UPDATE users SET credits = ".$limit." WHERE id = '".$my_id."' LIMIT 1") or die(mysql_error());
} else {
echo "<script language=\"JavaScript\">\n;
alert('You are under the limit, so your coins will stay safe!');
</script>";
}
?>
Coded it for PHPRetro as well:
Since the stuff is different, it took a while.
Place it in me.php under this code:
Code:
<ul id="link-bar" class="clearfix">
<li class="change-looks"><a href="<?php echo PATH; ?>/profile"><?php echo $lang->loc['change.looks']; ?> »</a></li>
<li class="credits">
<a href="<?php echo PATH; ?>/credits"><?php echo $user->user("credits"); ?></a> <?php echo $lang->loc['credits']; ?><br>
PHP Code:
<?php
$limit = 20000;
if($user->user("credits") > $limit)
{
echo 'Your coins have exceeded the hotels limit, so you are being reduced to the limit, the limit is: ';
echo $limit;
mysql_query("UPDATE users SET credits = ".$limit." WHERE id = ".$user->id."");
} else {
echo 'You are under the limit, so your coins will stay safe!';
}
?>
For HoloCMS place under the same code in me.php as well.
Do NOT make another php file for it. It's much easier.