removed WON support

fixed some bugs
This commit is contained in:
Felix Geyer 2004-07-19 14:33:17 +00:00
parent bcc8292730
commit ef11026195
7 changed files with 105 additions and 229 deletions

View File

@ -47,9 +47,7 @@ new g_aName[MAX_ADMINS][32]
new g_aFlags[MAX_ADMINS] new g_aFlags[MAX_ADMINS]
new g_aAccess[MAX_ADMINS] new g_aAccess[MAX_ADMINS]
new g_aNum = 0 new g_aNum = 0
#if !defined NO_STEAM
new g_cmdLoopback[16] new g_cmdLoopback[16]
#endif
public plugin_init() public plugin_init()
{ {
@ -84,12 +82,10 @@ public plugin_init()
register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN) register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN)
#if !defined NO_STEAM
format( g_cmdLoopback, 15, "amxauth%c%c%c%c" , format( g_cmdLoopback, 15, "amxauth%c%c%c%c" ,
random_num('A','Z') , random_num('A','Z') ,random_num('A','Z'),random_num('A','Z') ) random_num('A','Z') , random_num('A','Z') ,random_num('A','Z'),random_num('A','Z') )
register_clcmd( g_cmdLoopback, "ackSignal" ) register_clcmd( g_cmdLoopback, "ackSignal" )
#endif
remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights
@ -149,32 +145,32 @@ public adminSql() {
get_cvar_string("amx_sql_pass",pass,31) get_cvar_string("amx_sql_pass",pass,31)
get_cvar_string("amx_sql_db",db,31) get_cvar_string("amx_sql_db",db,31)
new sql = dbi_connect(host,user,pass,db,error,127) new Sql:sql = dbi_connect(host,user,pass,db,error,127)
if(sql < 1){ if (sql <= SQL_FAILED) {
server_print("[AMXX] SQL error: can't connect: '%s'",error) server_print("[AMXX] SQL error: can't connect: '%s'",error)
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
dbi_query(sql,"CREATE TABLE IF NOT EXISTS admins ( auth varchar(32) NOT NULL default '', password varchar(32) NOT NULL default '', access varchar(32) NOT NULL default '', flags varchar(32) NOT NULL default '' )") dbi_query(sql,"CREATE TABLE IF NOT EXISTS admins ( auth varchar(32) NOT NULL default '', password varchar(32) NOT NULL default '', access varchar(32) NOT NULL default '', flags varchar(32) NOT NULL default '' )")
new Result = dbi_query(sql,"SELECT auth,password,access,flags FROM admins") new Result:Res = dbi_query(sql,"SELECT auth,password,access,flags FROM admins")
if(Result < 0) { if (rescode(Res) < 0) {
dbi_error(sql,error,127) dbi_error(sql,error,127)
server_print("[AMXX] SQL error: can't load admins: '%s'",error) server_print("[AMXX] SQL error: can't load admins: '%s'",error)
return PLUGIN_HANDLED return PLUGIN_HANDLED
} else if (Result == 0) { } else if (rescode(Res) == 0) {
server_print("[AMXX] No admins found.") server_print("[AMXX] No admins found.")
} }
new szFlags[32],szAccess[32] new szFlags[32],szAccess[32]
g_aNum = 0 g_aNum = 0
while( dbi_nextrow(sql) > 0 ) while( dbi_nextrow(Res) > 0 )
{ {
dbi_result(Result, "auth", g_aName[ g_aNum ] ,31) dbi_result(Res, "auth", g_aName[ g_aNum ] ,31)
dbi_result(Result, "password", g_aPassword[ g_aNum ] ,31) dbi_result(Res, "password", g_aPassword[ g_aNum ] ,31)
dbi_result(Result, "access", szAccess,31) dbi_result(Res, "access", szAccess,31)
dbi_result(Result, "flags", szFlags,31) dbi_result(Res, "flags", szFlags,31)
if ( (containi(szAccess,"z")==-1) && (containi(szAccess,"y")==-1) ) if ( (containi(szAccess,"z")==-1) && (containi(szAccess,"y")==-1) )
szAccess[strlen(szAccess)] = 'y' szAccess[strlen(szAccess)] = 'y'
@ -188,7 +184,7 @@ public adminSql() {
} }
server_print("[AMXX] Loaded %d admin%s from database",g_aNum, (g_aNum == 1) ? "" : "s" ) server_print("[AMXX] Loaded %d admin%s from database",g_aNum, (g_aNum == 1) ? "" : "s" )
dbi_free_result(Result) dbi_free_result(Res)
dbi_close(sql) dbi_close(sql)
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
@ -307,13 +303,7 @@ accessUser( id, name[] = "" )
new result = getAccess(id,username,userauthid,userip,password) new result = getAccess(id,username,userauthid,userip,password)
if (result & 1) client_cmd(id,"echo ^"* Invalid Password!^"") if (result & 1) client_cmd(id,"echo ^"* Invalid Password!^"")
if (result & 2) { if (result & 2) {
client_cmd(id,g_cmdLoopback)
#if !defined NO_STEAM
client_cmd(id,g_cmdLoopback)
#else
client_cmd(id,"echo ^"* You have no entry to the server...^";disconnect")
#endif
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
if (result & 4) client_cmd(id,"echo ^"* Password accepted^"") if (result & 4) client_cmd(id,"echo ^"* Password accepted^"")
@ -336,13 +326,8 @@ public client_infochanged(id)
return PLUGIN_CONTINUE return PLUGIN_CONTINUE
} }
#if !defined NO_STEAM
public ackSignal(id) public ackSignal(id)
server_cmd("kick #%d ^"You have no entry to the server...^"", get_user_userid(id) ) server_cmd("kick #%d ^"You have no entry to the server...^"", get_user_userid(id) )
public client_authorized(id) public client_authorized(id)
#else
public client_connect(id)
#endif
return get_cvar_num( "amx_mode" ) ? accessUser( id ) : PLUGIN_CONTINUE return get_cvar_num( "amx_mode" ) ? accessUser( id ) : PLUGIN_CONTINUE

View File

@ -100,17 +100,10 @@ public cmdKick(id,level,cid){
server_cmd("kick #%d",userid2) server_cmd("kick #%d",userid2)
else else
{ {
#if !defined NO_STEAM
if (reason[0]) if (reason[0])
server_cmd("kick #%d ^"%s^"",userid2,reason) server_cmd("kick #%d ^"%s^"",userid2,reason)
else else
server_cmd("kick #%d",userid2) server_cmd("kick #%d",userid2)
#else
if (reason[0])
client_cmd(player,"echo ^"Kicked: Reason: %s^";disconnect",reason)
else
client_cmd(player,"echo ^"Kicked^";disconnect",reason)
#endif
} }
console_print(id,"[AMXX] Client ^"%s^" kicked",name2) console_print(id,"[AMXX] Client ^"%s^" kicked",name2)
return PLUGIN_HANDLED return PLUGIN_HANDLED
@ -203,33 +196,18 @@ public cmdBan(id,level,cid){
if ( equal(mode,"ip") ){ if ( equal(mode,"ip") ){
new address[32] new address[32]
get_user_ip(player,address,31,1) get_user_ip(player,address,31,1)
#if !defined NO_STEAM
if (reason[0]) if (reason[0])
server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address) server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address)
else else
server_cmd("kick #%d ^"banned %s^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,temp,minutes,address) server_cmd("kick #%d ^"banned %s^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,temp,minutes,address)
#else
if (reason[0])
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
else
client_cmd(player,"echo ^"banned %s^";disconnect",temp)
server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,address)
#endif
} }
else else
{ {
#if !defined NO_STEAM
if (reason[0]) if (reason[0])
server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2) server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2)
else else
server_cmd("kick #%d ^"banned %s^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,temp,minutes,authid2) server_cmd("kick #%d ^"banned %s^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,temp,minutes,authid2)
#else
if (reason[0])
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
else
client_cmd(player,"echo ^"banned %s^";disconnect",temp)
server_cmd("banid ^"%s^" ^"%s^";wait;writeip",minutes,authid2)
#endif
} }
new activity = get_cvar_num("amx_show_activity") new activity = get_cvar_num("amx_show_activity")
@ -606,11 +584,7 @@ public cmdLeave(id,level,cid){
server_cmd("kick #%d",get_user_userid(b)) server_cmd("kick #%d",get_user_userid(b))
else else
{ {
#if !defined NO_STEAM
server_cmd("kick #%d ^"You have been dropped because admin has left only specified group of clients^"",get_user_userid(b)) server_cmd("kick #%d ^"You have been dropped because admin has left only specified group of clients^"",get_user_userid(b))
#else
client_cmd(b,"echo * You have been dropped because admin has left only specified group of clients;disconnect")
#endif
} }
count++ count++
} }

View File

@ -38,31 +38,23 @@
// Comment if you don't want to hide not used reserved slots // Comment if you don't want to hide not used reserved slots
#define HIDE_RESERVED_SLOTS #define HIDE_RESERVED_SLOTS
#if !defined NO_STEAM
new g_cmdLoopback[16] new g_cmdLoopback[16]
#endif
public plugin_init() public plugin_init()
{ {
register_plugin("Slots Reservation","0.20","AMXX Dev Team") register_plugin("Slots Reservation","0.20","AMXX Dev Team")
register_cvar("amx_reservation","1") register_cvar("amx_reservation","1")
#if !defined NO_STEAM
format( g_cmdLoopback, 15, "amxres%c%c%c%c" , format( g_cmdLoopback, 15, "amxres%c%c%c%c" ,
random_num('A','Z') , random_num('A','Z') ,random_num('A','Z'),random_num('A','Z') ) random_num('A','Z') , random_num('A','Z') ,random_num('A','Z'),random_num('A','Z') )
register_clcmd( g_cmdLoopback, "ackSignal" ) register_clcmd( g_cmdLoopback, "ackSignal" )
#endif
} }
#if !defined NO_STEAM
public ackSignal(id) public ackSignal(id)
server_cmd("kick #%d ^"Dropped due to slot reservation^"", get_user_userid(id) ) server_cmd("kick #%d ^"Dropped due to slot reservation^"", get_user_userid(id) )
public client_authorized(id) public client_authorized(id)
#else
public client_connect(id)
#endif
{ {
new maxplayers = get_maxplayers() new maxplayers = get_maxplayers()
new players = get_playersnum( 1 ) new players = get_playersnum( 1 )
@ -76,14 +68,7 @@ public client_connect(id)
return PLUGIN_CONTINUE return PLUGIN_CONTINUE
} }
#if !defined NO_STEAM
client_cmd(id,g_cmdLoopback) client_cmd(id,g_cmdLoopback)
#else
if ( is_user_bot(id) )
server_cmd("kick #%d", get_user_userid(id) )
else
client_cmd(id,"echo ^"Dropped due to slot reservation^";disconnect")
#endif
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
@ -105,7 +90,7 @@ setVisibleSlots( players , maxplayers , limit )
num = maxplayers num = maxplayers
else if ( players < limit ) else if ( players < limit )
num = limit num = limit
set_cvar_num( "sv_visiblemaxplayers" , num ) set_cvar_num( "sv_visiblemaxplayers" , num )
} }
#endif #endif

View File

@ -34,7 +34,7 @@
#include <amxmodx> #include <amxmodx>
new Float:g_Flooding[33] = {0, ...} new Float:g_Flooding[33] = {0.0, ...}
new g_Flood[33] = {0, ...} new g_Flood[33] = {0, ...}
public plugin_init() public plugin_init()

View File

@ -32,7 +32,7 @@
* version. * version.
*/ */
/* File location: $moddir/addons/amxx/plugins/csstats.amx */ /* File location: $moddir/addons/amxx/data/csstats.amx */
#include <amxmodx> #include <amxmodx>

View File

@ -127,7 +127,7 @@ new g_HeMessages[4][] = {
new g_SHeMessages[4][] = { new g_SHeMessages[4][] = {
"%s detonated himself with a grenade", "%s detonated himself with a grenade",
"%s trys the effect of an HE Grenade", "%s trys the effect of an HE Grenade",
"%s swallows grenades whole!, "%s swallows grenades whole!",
"%s explodes!" "%s explodes!"
} }
new g_HeadShots[7][] = { new g_HeadShots[7][] = {

View File

@ -38,11 +38,7 @@
#include <amxmodx> #include <amxmodx>
#include <amxmisc> #include <amxmisc>
#if !defined NO_STEAM
#define MAXMENUPOS 34 #define MAXMENUPOS 34
#else
#define MAXMENUPOS 31
#endif
new g_Position[33] new g_Position[33]
new g_Modified new g_Modified
@ -50,41 +46,35 @@ new g_blockPos[112]
new g_saveFile[64] new g_saveFile[64]
new g_Restricted[] = "* This item is restricted *" new g_Restricted[] = "* This item is restricted *"
new g_menusNames[7][] = { new g_menusNames[7][] = {
"pistol", "pistol",
"shotgun", "shotgun",
"sub", "sub",
"rifle", "rifle",
"machine", "machine",
"equip", "equip",
"ammo" "ammo"
} }
new g_MenuTitle[7][] = { new g_MenuTitle[7][] = {
"Handguns", "Handguns",
"Shotguns", "Shotguns",
"Sub-Machine Guns", "Sub-Machine Guns",
"Assault & Sniper Rifles", "Assault & Sniper Rifles",
"Machine Guns", "Machine Guns",
"Equipment", "Equipment",
"Ammunition" "Ammunition"
} }
new g_menusSets[7][2] = { new g_menusSets[7][2] = {
#if !defined NO_STEAM {0,6},{6,8},{8,13},{13,23},{23,24},{24,32},{32,34}
{0,6},{6,8},{8,13},{13,23},{23,24},{24,32},{32,34}
#else
{0,6},{6,8},{8,13},{13,21},{21,22},{22,29},{29,31}
#endif
} }
#if !defined NO_STEAM
new g_AliasBlockNum new g_AliasBlockNum
new g_AliasBlock[MAXMENUPOS] new g_AliasBlock[MAXMENUPOS]
#endif
// First position is a position of menu (0 for ammo, 1 for pistols, 6 for equipment etc.) // First position is a position of menu (0 for ammo, 1 for pistols, 6 for equipment etc.)
// Second is a key for TERRORIST (all is key are minus one, 1 is 0, 2 is 1 etc.) // Second is a key for TERRORIST (all is key are minus one, 1 is 0, 2 is 1 etc.)
// Third is a key for CT // Third is a key for CT
// Position with -1 doesn't exist // Position with -1 doesn't exist
new g_Keys[MAXMENUPOS][3] = { new g_Keys[MAXMENUPOS][3] = {
#if !defined NO_STEAM
{1,1,1}, // H&K USP .45 Tactical {1,1,1}, // H&K USP .45 Tactical
{1,0,0}, // Glock18 Select Fire {1,0,0}, // Glock18 Select Fire
{1,3,3}, // Desert Eagle .50AE {1,3,3}, // Desert Eagle .50AE
@ -119,39 +109,6 @@ new g_Keys[MAXMENUPOS][3] = {
{6,-1,7}, // Tactical Shield {6,-1,7}, // Tactical Shield
{0,5,5}, // Primary weapon ammo {0,5,5}, // Primary weapon ammo
{0,6,6} // Secondary weapon ammo {0,6,6} // Secondary weapon ammo
#else
{1,0,0}, // H&K USP .45 Tactical
{1,1,1}, // Glock18 Select Fire
{1,2,2}, // Desert Eagle .50AE
{1,3,3}, // SIG P228
{1,4,-1}, // Dual Beretta 96G Elite
{1,-1,5}, // FN Five-Seven
{2,0,0}, // Benelli M3 Super90
{2,1,1}, // Benelli XM1014
{3,0,0}, // H&K MP5-Navy
{3,-1,1}, // Steyr Tactical Machine Pistol
{3,2,2}, // FN P90
{3,3,-1}, // Ingram MAC-10
{3,4,4}, // H&K UMP45
{4,0,-1}, // AK-47
{4,1,-1}, // Sig SG-552 Commando
{4,-1,2}, // Colt M4A1 Carbine
{4,-1,3}, // Steyr Aug
{4,4,4}, // Steyr Scout
{4,5,5}, // AI Arctic Warfare/Magnum
{4,6,-1}, // H&K G3/SG-1 Sniper Rifle
{4,-1,7}, // Sig SG-550 Sniper
{5,0,0}, // FN M249 Para
{6,0,0}, // Kevlar Vest
{6,1,1}, // Kevlar Vest & Helmet
{6,2,2}, // Flashbang
{6,3,3}, // HE Grenade
{6,4,4}, // Smoke Grenade
{6,-1,5}, // Defuse Kit
{6,6,6}, // NightVision Goggles
{0,5,5}, // Primary weapon ammo
{0,6,6} // Secondary weapon ammo
#endif
} }
new g_WeaponNames[MAXMENUPOS][] = { new g_WeaponNames[MAXMENUPOS][] = {
@ -169,10 +126,8 @@ new g_WeaponNames[MAXMENUPOS][] = {
"Ingram MAC-10", "Ingram MAC-10",
"H&K UMP45", "H&K UMP45",
"AK-47", "AK-47",
#if !defined NO_STEAM
"Gali", "Gali",
"Famas", "Famas",
#endif
"Sig SG-552 Commando", "Sig SG-552 Commando",
"Colt M4A1 Carbine", "Colt M4A1 Carbine",
"Steyr Aug", "Steyr Aug",
@ -188,9 +143,7 @@ new g_WeaponNames[MAXMENUPOS][] = {
"Smoke Grenade", "Smoke Grenade",
"Defuse Kit", "Defuse Kit",
"NightVision Goggles", "NightVision Goggles",
#if !defined NO_STEAM
"Tactical Shield", "Tactical Shield",
#endif
"Primary weapon ammo", "Primary weapon ammo",
"Secondary weapon ammo" "Secondary weapon ammo"
} }
@ -213,10 +166,8 @@ new g_MenuItem[MAXMENUPOS][] = {
"%d. %s\y\R%s^n\w^n", "%d. %s\y\R%s^n\w^n",
"\yAssault Rifles^n\w^n%d. %s\y\R%s^n\w", "\yAssault Rifles^n\w^n%d. %s\y\R%s^n\w",
#if !defined NO_STEAM
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
#endif
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w^n", "%d. %s\y\R%s^n\w^n",
@ -234,111 +185,101 @@ new g_MenuItem[MAXMENUPOS][] = {
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
#if !defined NO_STEAM
"%d. %s\y\R%s^n\w", "%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w^n", "%d. %s\y\R%s^n\w^n",
#else
"%d. %s\y\R%s^n\w^n",
#endif
"\yAmmunition^n\w^n%d. %s\y\R%s^n\w", "\yAmmunition^n\w^n%d. %s\y\R%s^n\w",
"%d. %s\y\R%s^n\w" "%d. %s\y\R%s^n\w"
} }
new g_Aliases[MAXMENUPOS][] = { new g_Aliases[MAXMENUPOS][] = {
"usp",//Pistols "usp", //Pistols
"glock", "glock",
"deagle", "deagle",
"p228", "p228",
"elites", "elites",
"fn57", "fn57",
"m3",//Shotguns "m3", //Shotguns
"xm1014", "xm1014",
"mp5",//SMG "mp5", //SMG
"tmp", "tmp",
"p90", "p90",
"mac10", "mac10",
"ump45", "ump45",
"ak47",//Rifles "ak47", //Rifles
#if !defined NO_STEAM "galil",
"galil", "famas",
"famas", "sg552",
#endif "m4a1",
"sg552", "aug",
"m4a1", "scout",
"aug", "awp",
"scout", "g3sg1",
"awp", "sg550",
"g3sg1",
"sg550",
"m249", //Machine Gun "m249", //Machine Gun
"vest",//Equipment "vest", //Equipment
"vesthelm", "vesthelm",
"flash", "flash",
"hegren", "hegren",
"sgren", "sgren",
"defuser", "defuser",
"nvgs", "nvgs",
#if !defined NO_STEAM "shield",
"shield",
#endif "primammo", //Ammo
"primammo",//Ammo "secammo"
"secammo"
} }
#if !defined NO_STEAM
new g_Aliases2[MAXMENUPOS][] = { new g_Aliases2[MAXMENUPOS][] = {
"km45",//Pistols "km45", //Pistols
"9x19mm", "9x19mm",
"nighthawk", "nighthawk",
"228compact", "228compact",
"elites", "elites",
"fiveseven", "fiveseven",
"12gauge",//Shotguns "12gauge", //Shotguns
"autoshotgun", "autoshotgun",
"smg",//SMG "smg", //SMG
"mp", "mp",
"c90", "c90",
"mac10", "mac10",
"ump45", "ump45",
"cv47",//Rifles "cv47", //Rifles
"defender", "defender",
"clarion", "clarion",
"krieg552", "krieg552",
"m4a1", "m4a1",
"bullpup", "bullpup",
"scout", "scout",
"magnum", "magnum",
"d3au1", "d3au1",
"krieg550", "krieg550",
"m249", //Machine Gun "m249", //Machine Gun
"vest",//Equipment "vest", //Equipment
"vesthelm", "vesthelm",
"flash", "flash",
"hegren", "hegren",
"sgren", "sgren",
"defuser", "defuser",
"nvgs", "nvgs",
"shield", "shield",
"primammo",//Ammo "primammo", //Ammo
"secammo" "secammo"
} }
#endif
#if !defined NO_STEAM
#define AUTOBUYLENGTH 511 #define AUTOBUYLENGTH 511
new g_Autobuy[33][AUTOBUYLENGTH + 1] new g_Autobuy[33][AUTOBUYLENGTH + 1]
//new g_Rebuy[33][AUTOBUYLENGTH + 1] //new g_Rebuy[33][AUTOBUYLENGTH + 1]
#endif
setWeapon( a , action ){ setWeapon( a , action ){
new b, m = g_Keys[a][0] * 8 new b, m = g_Keys[a][0] * 8
@ -356,7 +297,7 @@ setWeapon( a , action ){
else else
g_blockPos[ b ] = action g_blockPos[ b ] = action
} }
#if !defined NO_STEAM
for(new i = 0; i < g_AliasBlockNum; ++i) for(new i = 0; i < g_AliasBlockNum; ++i)
if ( g_AliasBlock[ i ] == a ){ if ( g_AliasBlock[ i ] == a ){
if ( !action || action == 2 ) { if ( !action || action == 2 ) {
@ -368,7 +309,6 @@ setWeapon( a , action ){
} }
if ( action && g_AliasBlockNum < MAXMENUPOS ) if ( action && g_AliasBlockNum < MAXMENUPOS )
g_AliasBlock[ g_AliasBlockNum++ ] = a g_AliasBlock[ g_AliasBlockNum++ ] = a
#endif
} }
findMenuId( name[] ){ findMenuId( name[] ){
@ -532,7 +472,6 @@ public actionMenu(id,key){
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
#if !defined NO_STEAM
public client_command( id ){ public client_command( id ){
if ( g_AliasBlockNum ) { if ( g_AliasBlockNum ) {
new arg[13] new arg[13]
@ -569,14 +508,11 @@ stock WeaponIsBlocked(weapon[]) {
return false // not blocked return false // not blocked
} }
#endif
#if !defined NO_STEAM
public blockcommand(id) { public blockcommand(id) {
client_print(id,print_center, g_Restricted ) client_print(id,print_center, g_Restricted )
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
#endif
public cmdMenu(id,level,cid){ public cmdMenu(id,level,cid){
if (cmd_access(id,level,cid,1)) if (cmd_access(id,level,cid,1))
@ -632,7 +568,6 @@ loadSettings(filename[]){
return 1 return 1
} }
#if !defined NO_STEAM
// JGHG // JGHG
public fn_setautobuy(id) { public fn_setautobuy(id) {
// Don't do anything if no items are blocked. // Don't do anything if no items are blocked.
@ -751,18 +686,15 @@ public fn_setrebuy(id) {
public fn_rebuy(id) { public fn_rebuy(id) {
} }
*/ */
#endif // !NO_STEAM
public plugin_init() { public plugin_init() {
register_plugin("Restrict Weapons","0.20","AMXX Dev Team") register_plugin("Restrict Weapons","0.20","AMXX Dev Team")
register_clcmd("buyammo1","ammoRest1") register_clcmd("buyammo1","ammoRest1")
register_clcmd("buyammo2","ammoRest2") register_clcmd("buyammo2","ammoRest2")
#if !defined NO_STEAM
register_clcmd("cl_setautobuy", "fn_setautobuy") register_clcmd("cl_setautobuy", "fn_setautobuy")
register_clcmd("cl_autobuy", "fn_autobuy") register_clcmd("cl_autobuy", "fn_autobuy")
//register_clcmd("cl_setrebuy", "fn_setrebuy") //register_clcmd("cl_setrebuy", "fn_setrebuy")
//register_clcmd("cl_rebuy", "fn_rebuy") //register_clcmd("cl_rebuy", "fn_rebuy")
#endif
register_clcmd("amx_restmenu","cmdMenu",ADMIN_CFG,"- displays weapons restriction menu") register_clcmd("amx_restmenu","cmdMenu",ADMIN_CFG,"- displays weapons restriction menu")
register_menucmd(register_menuid("#Buy", 1 ),511,"menuBuy") register_menucmd(register_menuid("#Buy", 1 ),511,"menuBuy")
register_menucmd(register_menuid("\yRestrict Weapons"),1023,"actionMenu") register_menucmd(register_menuid("\yRestrict Weapons"),1023,"actionMenu")