View Single Post
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