/* AMXX Mod script.
Ford�totta: CheeseDave [www.dav3.extra.hu]
*
* (c) Copyright 2004, maintianed by BigBaller
* This file is provided as is (no warranties).
*
* ADMIN ALLINONE COMMANDS
* [2005 / 03 / 26 -- last change]
* [Plugin Count -- 18 plugins]
*
* Changelog:
* v1.0 -- Initial build (14 in one)
* v1.1 -- Made AMXX Compatible
* v1.2 -- Fixed Money Command by Using DarkMoney plugin instead.
* Also made everything [AMXX] instead of [AMX]
* v1.3 -- Added f117bomb's NoClip and Stack Plugins
* v1.4 -- Added Steam Weapon support thanks to Kingpin on AMXX Forums!
* Also fixed amx_armor to allow admins to give themselfs armor! Thanks to GIR on AMXX Forums for pointing this out!
* v1.5 -- Added #define USING_STEAM in the header. WON users only have to comment this line instead of searching the plugin.
* Reorganized plugin, moved plugin_init() to the top of the plugin and moved around the body.
* Added information, based on amx_show_activity cvar, gravity and rocket will now display admin actions.
* Added a gag plugin per request, very simple and based off tcquest78's code.
* Removed the description and examples of the commands from the plugin, uses a URL for information instead.
* v1.5.1 Bug fix, due to reorganization amx_fire command didnt work, that has been fixed.
* v1.6 -- Created a sv_alltalk plugin like that of the amx_gravity. Added log_amx to all the plugins.
* This is to help combat "abusive admins".
* v2.0 -- Skipped to version 2.0 as it hopes to be one of the final versions (if not final) of this plugin.
* AMX MOD X Multilingual system enabled now and it gives error message in AMX MOD X Logs if
* required modules are not running. Also updated commands list to better reflect correct usage.
* Changed amx_weapon command to use a new flag and only that command on that flag, This means
* in order for any admin to have access to amx_weapon they must have the FLAG T listed in the users.ini
*
*
* For command information and examples please read this post
*
* CREDITS:
* ---------------
* (in order of how they are placed in plugin)
*
* -) ADMIN HEAL v0.9.3 by f117bomb
* -) ADMIN ARMOR v1 by Rav
* -) ADMIN GODEMODE v0.9.3 by f117bomb
* -) ADMIN NO CLIP v0.9.3 by f117bomb
* -) ADMIN TELEPORT v0.9.3 by f117bomb
* -) ADMIN STACK v0.9.3 by f117bomb
* -) GIVING CLIENT WEAPONS v0.8.4 by {W`C} Bludy
* -) DARK MONEY 1.0 by DarkShadowST
* -) ADMIN ALLTALK 1.0 by BigBaller
* -) ADMIN GAG 1.0 by tcquest78
* -) ADMIN GRAVITY v0.2 by JustinHoMi
* -) ADMIN GLOW v0.9.3 by f117bomb
* -) ADMIN BURY v0.9.3 by f117bomb
* -) ADMIN DISARM v1.1 by mike_cao
* -) AMX UBER SLAP v0.9.3 by BarMan (Skullz.NET)
* -) ADMIN SLAY 2 v0.9.2 by f117bomb
* -) ADMIN FIRE v1.0.0 by f117bomb
* -) ADMIN ROCKET v1.3 by f117bomb
*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
public plugin_modules()
{
require_module("fun")
require_module("cstrike")
}
public plugin_init()
{
register_plugin("AINO Commands", "2.0", "AMXX Com [HU:CHDAVE]")
register_dictionary("admin_allinone.txt")
register_concmd("amx_heal","admin_heal",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> <elet mennyisege> - elet adas")
register_concmd("amx_godmode","admin_godmode",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> <0=KI 1=BE> - isten mod")
register_concmd("amx_noclip","admin_noclip",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> <0=KI 1=BE> - falon atjaras")
register_concmd("amx_teleport","admin_teleport",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> [x] [y] [z] - teleportalas")
register_concmd("amx_givemoney","give_money",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> <mennyiseg> - penz adas")
register_concmd("amx_takemoney","take_money",ADMIN_LEVEL_A,"<azonosito, nick, @csapat vagy #userid> <mennyiseg> - penz elvetel")
register_concmd("amx_disarm","admin_disarm",ADMIN_LEVEL_B,"<azonosito, nick, @csapat vagy #userid> - lefegyverzes")
//ADMIN HEAL v0.9.3 by f117bomb
//=========================================================
public admin_heal(id,level,cid){
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id,"%L", LANG_PLAYER, "AINO_NO_CLIENTS")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
new user_health = get_user_health(players[a])
set_user_health(players[a], str_to_num(arg2) + user_health)
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_HEAL_TEAM_CASE2", name2, arg[1])
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_HEAL_TEAM_CASE1", arg[1])
}
console_print(id, "%L", LANG_PLAYER, "AINO_HEAL_ALL_SUCCESS")
log_amx("%L", LANG_SERVER, "AINO_LOG_HEAL_ALL", name2, arg[1])
}
else {
new player = cmd_target(id,arg,7)
if (!player) return PLUGIN_HANDLED
new user_health = get_user_health(player)
set_user_health(player, str_to_num(arg2) + user_health)
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_HEAL_PLAYER_CASE2", name2, name)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_HEAL_PLAYER_CASE1", name)
}
console_print(id, "%L", LANG_PLAYER, "AINO_HEAL_PLAYER_SUCCESS", name)
log_amx("%L", LANG_SERVER, "AINO_LOG_HEAL_PLAYER", name2, name)
}
return PLUGIN_HANDLED
}
//ADMIN GODEMODE v0.9.3 by f117bomb
//=========================================================
public admin_godmode(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id, "%L", LANG_PLAYER, "AINO_NO_CLIENTS")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
set_user_godmode(players[a],str_to_num(arg2))
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat, "%L", LANG_PLAYER, "AINO_GODMODE_TEAM_CASE2", name2, arg[1])
case 1: client_print(0,print_chat, "%L", LANG_PLAYER, "AINO_GODMODE_TEAM_CASE1", arg[1])
}
console_print(id, "%L", LANG_PLAYER, "AINO_GODMODE_ALL_SUCCESS")
log_amx("%L", LANG_SERVER, "AINO_LOG_GODMODE_ALL", name2, arg[1])
}
else {
new player = cmd_target(id,arg,3)
if (!player) return PLUGIN_HANDLED
set_user_godmode(player,str_to_num(arg2))
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_GODMODE_PLAYER_CASE2", name2, name)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_GODMODE_PLAYER_CASE1", name)
}
console_print(id, "%L", LANG_PLAYER, "AINO_GODMODE_PLAYER_SUCCESS", name)
log_amx("%L", LANG_SERVER, "AINO_LOG_GODMODE_PLAYER", name2, name)
}
return PLUGIN_HANDLED
}
//ADMIN NO CLIP v0.9.3 by f117bomb
//=========================================================
public admin_noclip(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id, "%L", LANG_PLAYER, "AINO_NO_CLIENTS")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
set_user_noclip(players[a],str_to_num(arg2))
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_NOCLIP_TEAM_CASE2", name2, arg[1])
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_NOCLIP_TEAM_CASE1", arg[1])
}
console_print(id, "%L", LANG_PLAYER, "AINO_NOCLIP_ALL_SUCCESS")
log_amx("%L", LANG_SERVER, "AINO_LOG_NOCLIP_ALL",name2,arg[1])
}
else {
new player = cmd_target(id,arg,7)
if (!player) return PLUGIN_HANDLED
set_user_noclip(player,str_to_num(arg2))
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_NOCLIP_PLAYER_CASE2", name2, name)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_NOCLIP_PLAYER_CASE1", name)
}
console_print(id, "%L", LANG_PLAYER, "AINO_NOCLIP_PLAYER_SUCCESS", name)
log_amx("%L", LANG_SERVER, "AINO_LOG_NOCLIP_PLAYER", name2, name)
}
return PLUGIN_HANDLED
}
//ADMIN TELEPORT v0.9.3 by f117bomb
//=========================================================
new storedorigin[3]
public admin_teleport(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32], sx[8], sy[8], sz[8], origin[3], name2[32]
new argc = read_argc()
read_argv(1,arg,31)
get_user_name(id,name2,31)
if (argc > 2) {
read_argv(2,sx,7)
read_argv(3,sy,7)
read_argv(4,sz,7)
origin[0] = str_to_num(sx)
origin[1] = str_to_num(sy)
origin[2] = str_to_num(sz)
}
else {
origin = storedorigin
}
new player = cmd_target(id,arg,7)
if (!player) return PLUGIN_HANDLED
set_user_origin(player, origin)
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_TELE_PLAYER_CASE2", name2, name)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_TELE_PLAYER_CASE1", name)
}
console_print(id, "%L", LANG_PLAYER, "AINO_TELE_PLAYER_SUCCESS", name, origin[0], origin[1], origin[2])
log_amx("%L", LANG_SERVER, "AINO_LOG_TELE_PLAYER", name2, name)
return PLUGIN_HANDLED
}
public admin_userorigin(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32], origin[3]
read_argv(1,arg,31)
new player = cmd_target(id,arg,3)
if (!player) return PLUGIN_HANDLED
get_user_origin(player, origin)
storedorigin = origin
new name[32]
get_user_name(player,name,31)
console_print(id, "%L", LANG_PLAYER, "ADMIN_TELE_PLAYER_STORED", name, origin[0], origin[1], origin[2])
return PLUGIN_HANDLED
}
//DARK MONEY 1.0 by DarkShadowST
//=========================================================
public give_money(id,level,cid){
if (!cmd_access(id,level,cid,3)){
return PLUGIN_HANDLED
}
new arg1[32], arg2[8], name2[32]
read_argv(1,arg1,31)
read_argv(2,arg2,7)
new adminname[32]
new player = cmd_target(id,arg1,2)
if (!player) return PLUGIN_HANDLED
get_user_name(player,name2,31)
if ((cs_get_user_money(player) + str_to_num(arg2)) > 16000)
{
cs_set_user_money(player,16000,1)
if(get_cvar_num("amx_moneymsg") == 1)
{
client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_GIVE", name2)
return PLUGIN_HANDLED
}
client_print(id, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_GIVE_CONSOLE", name2)
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(player,cs_get_user_money(player) + str_to_num(arg2),1)
if(get_cvar_num("amx_moneymsg") == 1)
{
client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_GIVE", name2)
return PLUGIN_HANDLED
}
client_print(id, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_GIVE_CONSOLE", name2)
return PLUGIN_HANDLED
}
get_user_name(id,adminname,31)
log_amx("%L", LANG_SERVER, "AINO_LOG_MONEY_PLAYER_GIVE", adminname, name2)
return PLUGIN_HANDLED
}
public take_money(id,level,cid){
if (!cmd_access(id,level,cid,3)){
return PLUGIN_HANDLED
}
new arg1[32], arg2[8], name2[32]
read_argv(1,arg1,31)
read_argv(2,arg2,7)
new adminname[32]
new player = cmd_target(id,arg1,1)
if (!player) return PLUGIN_HANDLED
get_user_name(player,name2,31)
if ((cs_get_user_money(player) - str_to_num(arg2)) <= 0)
{
cs_set_user_money(player,0,1)
if(get_cvar_num("amx_moneymsg") == 1)
{
client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_TAKE_ALL", name2)
return PLUGIN_HANDLED
}
client_print(id, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCESSS_TAKE_CONSOLE", name2)
}
else
{
cs_set_user_money(player,cs_get_user_money(player) - str_to_num(arg2),1)
if(get_cvar_num("amx_moneymsg") == 1)
{
client_print(0, print_chat, "%L", LANG_PLAYER, "AINO_MONEY_PLAYER_SUCCESS_TAKE", name2)
return PLUGIN_HANDLED
}
}
get_user_name(id,adminname,31)
log_amx("%L", LANG_SERVER, "AINO_LOG_MONEY_PLAYER_TAKE", adminname, name2)
return PLUGIN_HANDLED
}
}
//ADMIN DISARM v1.1 by mike_cao
//=========================================================
disarm_player(id,victim){
new name[32], origin[3], name2[32]
get_user_origin(victim,origin)
origin[2] -= 2000
set_user_origin(victim,origin)
new iweapons[32], wpname[32], inum
get_user_weapons(victim,iweapons,inum)
for(new a=0;a<inum;++a){
get_weaponname(iweapons[a],wpname,31)
engclient_cmd(victim,"drop",wpname)
}
engclient_cmd(victim,"weapon_knife")
origin[2] += 2005
set_user_origin(victim,origin)
get_user_name(victim,name,31)
console_print(id, "%L", LANG_PLAYER, "AINO_DISARM_PLAYER_SUCCESS",name)
get_user_name(id,name2,31)
log_amx("%L", LANG_SERVER, "AINO_LOG_DISARM_PLAYER", name2, name)
}
public admin_disarm(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,31)
if (arg[0]=='@'){
new players[32], /*name[32],*/ inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id, "%L", LANG_PLAYER, "AINO_DISARM_NOALIVE")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a){
disarm_player(id,players[a])
}
}
else {
new player = cmd_target(id,arg,5)
if (!player) return PLUGIN_HANDLED
disarm_player(id,player)
}
return PLUGIN_HANDLED
}