![]() |
Re: restrictweapons_plugin instructions
|
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.. |
Re: restrictweapons_plugin instructions
This is one of the default plugins for AMX(X)...
|
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 ??
|
Re: restrictweapons_plugin instructions
Quote:
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. |
Re: restrictweapons_plugin instructions
Quote:
|
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. |
Re: restrictweapons_plugin instructions
Not with restrictweapons_plugin. Maybe botmeister's mEAn admin mod does that, though...
|
Re: restrictweapons_plugin instructions
Okay, Thanks PMB i will have a look at that and see.
|
Re: restrictweapons_plugin instructions
Quote:
/* 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. |
All times are GMT +2. The time now is 18:33. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.