.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Enhancement Workshop > Metamod and metamod plugins
Metamod and metamod plugins Plugins and improvements for the metamod server-side mod

Reply
 
Thread Tools
Re: restrictweapons_plugin instructions
Old
  (#11)
Onno Kreuzinger
aka: memed / Server Admin
 
Onno Kreuzinger's Avatar
 
Status: Offline
Posts: 705
Join Date: Jan 2004
Location: germany
Default Re: restrictweapons_plugin instructions - 18-04-2004

http://sourceforge.net/projects/amxmod


sunny morning view from my balcony:

see our WIKI!
see our filebase!
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#12)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: restrictweapons_plugin instructions - 18-04-2004

well heres the small code for amx that does the actual restricting.
probably wouldn't help much unless you know small..
Attached Files
File Type: txt restmenu.sma.txt (16.5 KB, 1179 views)
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#13)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: restrictweapons_plugin instructions - 21-04-2004

This is one of the default plugins for AMX(X)...
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#14)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: restrictweapons_plugin instructions - 22-04-2004

They seem to be hooking the network messages too, just like what I am doing. Unless I missed out something I really don't see how this plugin can work ??? If these messages are indeed sent (and they must be, for this plugin works) then why on Earth does my metamod not catch them ??



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#15)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: restrictweapons_plugin instructions - 22-04-2004

Quote:
Originally Posted by Pierre-Marie Baty
yes but...

I've got bad news folks...

Just found out this...
With CS 1.6 they changed the netcode and it appears now that the buy menus are entirely handled client-side, not like before where the menu codes were sent over the network from the client to the server and back...

This means that there's no way I can make the plugin work with CS 1.6...
AFIK mEAn's weapon restrictions work fine under CS 1.6.

I trap all weapon buy commands (menu and alias) from the client and refuse to pass them on to the engine if the weapon is restricted.

You cannot do the same thing for bots because you cannot capture the commands a bot issues (well you can, but it's not easy enough to be worth doing), instead I simply prevent a restricted weapon from being spawned whenever a bot makes the purchase - not the best solution and it has problems such as the bot loosing money for buying nothing, but it works.

*edit*

Function hook is on pfnClientCommand to trap client weapon buying commands.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut

Last edited by botmeister; 22-04-2004 at 20:36..
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#16)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: restrictweapons_plugin instructions - 20-05-2004

Quote:
Originally Posted by botmeister
AFIK mEAn's weapon restrictions work fine under CS 1.6.
botmeister, lets have a look at the source. Are you still planning on releasing the source to mean?
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#17)
rex
Member
 
rex's Avatar
 
Status: Offline
Posts: 64
Join Date: Feb 2004
Default Re: restrictweapons_plugin instructions - 24-05-2004

let me know if this is a really dumb question.
is there anyway of restricting a weapon for a map everytime it loads?
say i want to restrict the AWP for de_dust. i restrict it but next time the map loads it not restriced anymore, but i still want it to be.
thanks for any help.
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#18)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: restrictweapons_plugin instructions - 24-05-2004

Not with restrictweapons_plugin. Maybe botmeister's mEAn admin mod does that, though...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#19)
rex
Member
 
rex's Avatar
 
Status: Offline
Posts: 64
Join Date: Feb 2004
Default Re: restrictweapons_plugin instructions - 25-05-2004

Okay, Thanks PMB i will have a look at that and see.
  
Reply With Quote
Re: restrictweapons_plugin instructions
Old
  (#20)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: restrictweapons_plugin instructions - 25-05-2004

Quote:
Originally Posted by rex
let me know if this is a really dumb question.
is there anyway of restricting a weapon for a map everytime it loads?
say i want to restrict the AWP for de_dust. i restrict it but next time the map loads it not restriced anymore, but i still want it to be.
thanks for any help.
From what I have tried the best thing to do is run Amx and this script.

/* AMX Mod script.
*
* (c) Copyright 2002, SuicideDog
* This file is provided as is (no warranties).
* Simple AWP restriction for CS (this works for 1.6)
*/
#include <amxmod>
public check_awp(id) {
if (get_cvar_num("sv_noawp")!=1) return PLUGIN_CONTINUE
new llama = read_data(0)
client_print(llama,print_center,"AWPs are banned. Find a real gun!")
client_cmd(llama,"weapon_awp;wait;wait;wait;drop")
return PLUGIN_CONTINUE
}
public plugin_init(){
register_plugin("Drop Awp","0.1","SuicideDog")
register_event("WeapPickup","check_awp","b","1=18" )
register_cvar("sv_noawp","1")
return PLUGIN_CONTINUE
}


You can then simply set / unset the cvar sv_noawp
If you are using rcon it would be:

so sv_noawp 1
to limit it and

rcon sv_noawp 0
to allow it again.

This works really well and this script can easily be changed to support other weapons.

Last edited by Austin; 25-05-2004 at 07:12..
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com