.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Metamod and metamod plugins (http://forums.bots-united.com/forumdisplay.php?f=15)
-   -   restrictweapons_plugin instructions (http://forums.bots-united.com/showthread.php?t=1394)

SGt_pAIn 17-04-2004 00:00

restrictweapons_plugin instructions
 
Downloaded the plugin but found instructions on use for forceteams_plugin. Can I get the cvars for use. Thanks PMB

MusicMan 17-04-2004 10:25

Re: restrictweapons_plugin instructions
 
Can't you find them in the readme?

MusicMan

Terran 17-04-2004 10:46

Re: restrictweapons_plugin instructions
 
If I understand his question correctly he downloaded the restrictweapons_plugin (is this a metamod or AMX or ??? plugin?) but the included readme is for another plugin...

MusicMan 17-04-2004 10:47

Re: restrictweapons_plugin instructions
 
oh I see, well I guess you're right

MusicMan

SGt_pAIn 17-04-2004 12:19

Re: restrictweapons_plugin instructions
 
It was a metamod plugin I got from PMB site. The readme is for a different plugin. Would like to get either the readme or cvars. http://racc.bots-united.com/english/downloads.html

Pierre-Marie Baty 17-04-2004 12:50

Re: restrictweapons_plugin instructions
 
Oh shit! My bad!

here are the CVARs
cvar_t restrict_pistols = {"restrict_pistols", "0", FCVAR_EXTDLL};
cvar_t restrict_usp = {"restrict_usp", "0", FCVAR_EXTDLL};
cvar_t restrict_glock18 = {"restrict_glock18", "0", FCVAR_EXTDLL};
cvar_t restrict_deagle = {"restrict_deagle", "0", FCVAR_EXTDLL};
cvar_t restrict_p228 = {"restrict_p228", "0", FCVAR_EXTDLL};
cvar_t restrict_elite = {"restrict_elite", "0", FCVAR_EXTDLL};
cvar_t restrict_fiveseven = {"restrict_fiveseven", "0", FCVAR_EXTDLL};
cvar_t restrict_shotguns = {"restrict_shotguns", "0", FCVAR_EXTDLL};
cvar_t restrict_m3 = {"restrict_m3", "0", FCVAR_EXTDLL};
cvar_t restrict_xm1014 = {"restrict_xm1014", "0", FCVAR_EXTDLL};
cvar_t restrict_submachineguns = {"restrict_submachineguns", "0", FCVAR_EXTDLL};
cvar_t restrict_mp5 = {"restrict_mp5", "0", FCVAR_EXTDLL};
cvar_t restrict_tmp = {"restrict_tmp", "0", FCVAR_EXTDLL};
cvar_t restrict_p90 = {"restrict_p90", "0", FCVAR_EXTDLL};
cvar_t restrict_mac10 = {"restrict_mac10", "0", FCVAR_EXTDLL};
cvar_t restrict_ump45 = {"restrict_ump45", "0", FCVAR_EXTDLL};
cvar_t restrict_rifles = {"restrict_rifles", "0", FCVAR_EXTDLL};
cvar_t restrict_ak47 = {"restrict_ak47", "0", FCVAR_EXTDLL};
cvar_t restrict_sg552 = {"restrict_sg552", "0", FCVAR_EXTDLL};
cvar_t restrict_m4a1 = {"restrict_m4a1", "0", FCVAR_EXTDLL};
cvar_t restrict_aug = {"restrict_aug", "0", FCVAR_EXTDLL};
cvar_t restrict_scout = {"restrict_scout", "0", FCVAR_EXTDLL};
cvar_t restrict_awp = {"restrict_awp", "0", FCVAR_EXTDLL};
cvar_t restrict_g3sg1 = {"restrict_g3sg1", "0", FCVAR_EXTDLL};
cvar_t restrict_sg550 = {"restrict_sg550", "0", FCVAR_EXTDLL};
cvar_t restrict_machineguns = {"restrict_machineguns", "0", FCVAR_EXTDLL};
cvar_t restrict_m249 = {"restrict_m249", "0", FCVAR_EXTDLL};
cvar_t restrict_primaryammo = {"restrict_primaryammo", "0", FCVAR_EXTDLL};
cvar_t restrict_secondaryammo = {"restrict_secondaryammo", "0", FCVAR_EXTDLL};
cvar_t restrict_equipment = {"restrict_equipment", "0", FCVAR_EXTDLL};
cvar_t restrict_kevlar = {"restrict_kevlar", "0", FCVAR_EXTDLL};
cvar_t restrict_kevlarhelmet = {"restrict_kevlarhelmet", "0", FCVAR_EXTDLL};
cvar_t restrict_flashbang = {"restrict_flashbang", "0", FCVAR_EXTDLL};
cvar_t restrict_hegrenade = {"restrict_hegrenade", "0", FCVAR_EXTDLL};
cvar_t restrict_smokegrenade = {"restrict_smokegrenade", "0", FCVAR_EXTDLL};
cvar_t restrict_defusekit = {"restrict_defusekit", "0", FCVAR_EXTDLL};
cvar_t restrict_nightvision = {"restrict_nightvision", "0", FCVAR_EXTDLL};

note that it may not work with CS 1.6 with the new buy aliases... and it doesn't know the shield either.
I'm going to update it to have it support CS 1.6 right now... and I'll include the TRUE readme this time :)

Terran 17-04-2004 16:26

Re: restrictweapons_plugin instructions
 
Does this restriction plugin also work for bots?

Pierre-Marie Baty 17-04-2004 18:09

Re: restrictweapons_plugin instructions
 
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... :(

Terran 17-04-2004 20:28

Re: restrictweapons_plugin instructions
 
Hmm, that is strange as I can restrict weapons with AMX at CS 1.6 - but not for bots...

Pierre-Marie Baty 18-04-2004 22:12

Re: restrictweapons_plugin instructions
 
How do you do that ?

Source code ?

Onno Kreuzinger 18-04-2004 22:22

Re: restrictweapons_plugin instructions
 
http://sourceforge.net/projects/amxmod

sPlOrYgOn 18-04-2004 22:31

Re: restrictweapons_plugin instructions
 
1 Attachment(s)
well heres the small code for amx that does the actual restricting.
probably wouldn't help much unless you know small..

Terran 21-04-2004 21:22

Re: restrictweapons_plugin instructions
 
This is one of the default plugins for AMX(X)...

Pierre-Marie Baty 22-04-2004 00:04

Re: restrictweapons_plugin instructions
 
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 ??

botmeister 22-04-2004 19:28

Re: restrictweapons_plugin instructions
 
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.

Austin 20-05-2004 06:55

Re: restrictweapons_plugin instructions
 
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?

rex 24-05-2004 13:53

Re: restrictweapons_plugin instructions
 
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.

Pierre-Marie Baty 24-05-2004 17:13

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

rex 25-05-2004 00:30

Re: restrictweapons_plugin instructions
 
Okay, Thanks PMB i will have a look at that and see.

Austin 25-05-2004 06:09

Re: restrictweapons_plugin instructions
 
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.

rex 25-05-2004 06:18

Re: restrictweapons_plugin instructions
 
thanks Austin, i already use amx mod x. what i was looking for is a way to restrict bots from buying. but thanks for your help.:)


All times are GMT +2. The time now is 07:44.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.