Galahad Posted April 30, 2011 Posted April 30, 2011 (edited) This hook disables a banned players ability to play the game. Run this query first - ALTER TABLE players ADD ban int(2) NOT NULL DEFAULT 0 then make a hook called ban.php and add this in it -> /hooks/ban.php <?php defined('IN_EZRPG') or exit; //Made by 21lockdown //http://www.ezrpgproject.com/forum/ $hooks->add_hook('header', 'ban'); function hook_ban($db, $tpl, $player, $args = 0) { if ($player === 0 || LOGGED_IN == false) return $args; if ($player->ban == 1) { die ("You have been banned from the server!"); } return $args; } ?> Now to ban a player. Simply set the users "ban" field to 1. Edited April 30, 2011 by 21Lockdown 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.