This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

AMXBans install


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ScchutzZ
Junior Member
Join Date: Jan 2024
Old 01-06-2024 , 17:39   Re: AMXBans install
Reply With Quote #11

Quote:
Originally Posted by fysiks View Post
I can't seem to find anything like that in the code. I can only assume that's someone's personal customization. If you can provide a link to that site, I can take a look at it.
I managed to add it by doing it this way. If you want to add it to the source, you can add it this way, there is no problem for now, but you know better

in templates/ban_list.tpl under <div class="post">
Code:
		<span>
			{if isset($check_id)}
			<div class='error'><a href="http://{$smarty.server.HTTP_HOST}{$smarty.server.PHP_SELF}?bid={$check_id}"><span style='color:white;font-weight:bold;text-shadow: #990000 0px 0px 3px;'>{"_YOUAREBANNED"|lang}</span></a></div>
			{else}
			<div class='success'><span style='color:green;font-weight:bold;text-shadow: #00991E 0px 0px 3px;'>{"_IP"|lang} &mdash; ({$your_ip}) {"_YOUNOTBANNED"|lang}</span></div>
			{/if}
		</span>
in mainfolder/ban_list.php on top $smarty->assign("meta","");

Code:
$sql = "SELECT * FROM `" . $config->db_prefix . "_bans` WHERE player_ip = '{$_SERVER['REMOTE_ADDR']}' AND expired = 0 AND (`ban_length` = 0 OR `ban_created` + `ban_length` * 60 > " . time() . ")";
$result = mysqli_query($mysql, $sql);

if ($result) {
    $result_yes = mysqli_num_rows($result);
    if ($result_yes) {
        $user = mysqli_fetch_assoc($result);
        $bids = $user['bid'];
        $smarty->assign("check_id", $bids);
    }
    mysqli_free_result($result);
} else {
    // Handle error using mysqli_error($mysql)
}

$smarty->assign("your_ip", $_SERVER['REMOTE_ADDR']);
in language/yourlang.php

Code:
define("_YOUNOTBANNED", "Don't worry, you are not banned");
define("_YOUAREBANNED","You have been banned!!");
ScchutzZ is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode