/********************************************************************************
* *
* Impulse 101 blocker for AMXX *
* ============================ *
* *
* Version 0.1 - Last modified on 13th January, 2009. *
* Plugin by Adam Reece, http://www.reece-eu.net/ *
* *
* Thanks to all the regulars at #amxmodx (GameSurge) for their bug support <3 *
* *
********************************************************************************
* *
* This plugin will block players using the 'impulse 101' command while cheat *
* mode (sv_cheats 1) is off. Currently, 'impulse 101' wrongly works on Sven *
* Co-op 4 regardless of cheat mode being on or off, leading to map exploits. *
* *
********************************************************************************/
/* Includes */
#include <amxmodx>
#include <amxmisc>
#include <engine>
/* Plugin Information */
#define PLUGIN_NAME "Impulse 101 Blocker"
#define PLUGIN_SHORT "Impulse 101 Blocker"
#define PLUGIN_VER "0.1"
/* Messages */
#define MSG_I101_BLOCKED "Nem hasznalhatod az 'impulse 101' a cheat mod kivan kapcsolva."
#define MSG_I101_BLOCKED_ADMINS "Egy admin blokkolta az 'impulse 101' cheat parancsot."
/* Globals */
new p_cheatMode
/* Functions */
public plugin_init()
{
register_plugin(PLUGIN_SHORT, PLUGIN_VER, "Adam Reece")
register_impulse(101, "block")
p_cheatMode = register_cvar("sv_cheats", "0")
}
public block(id, level, cid)
{
if (get_pcvar_num(p_cheatMode) == 0)
{
new name[32]
new authID[36]
get_user_name(id, name, 31)
get_user_authid(id, authID, 35)
client_print(id, print_chat, "%s", MSG_I101_BLOCKED)
log_message("%s: %s %s (%s).", PLUGIN_NAME, MSG_I101_BLOCKED_ADMINS, name, authID)
for (new i = 0; i < get_playersnum(); i++)
{
if (is_user_admin(i) && i != id)
client_print(i, print_chat, "%s: %s %s (%s).", PLUGIN_NAME, MSG_I101_BLOCKED_ADMINS, name, authID)
}
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}