Raised This Month: $ Target: $400
 0% 

Autobuy and Rebuy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 01-20-2005 , 08:50   Autobuy and Rebuy
Reply With Quote #1

Since the last update from Valve the autobuy and rebuy commands dont appear to be passed thru the ClientCommand function any longer in a plugin.
I can have my plugin trap
CON_COMMAND_F( autobuy, "autobuy" ,FCVAR_GAMEDLL)
but there are no engine->Cmd_Args that I can see.. and even if it did..
it stops it all together.
How can I pass this event on for normal processing or not depending on
the list of weapons in there autobuy or rebuy list?
BeetleFart is offline
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 01-21-2005 , 07:09  
Reply With Quote #2

Use a similar method to this.......

http://forums.alliedmods.net/showthread.php?t=37058

I did my original autobuy like this then realised there wasn't an autobuy console command in the concommand list so I scrapped it and went down the client command route. Typical though, the day I release it, Valve go and change it.

Looks like I have to re-code it again

Mani.
Mani is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 01-21-2005 , 08:31  
Reply With Quote #3

Quote:
Originally Posted by Mani
Use a similar method to this.......

http://forums.alliedmods.net/showthread.php?t=37058

I did my original autobuy like this then realised there wasn't an autobuy console command in the concommand list so I scrapped it and went down the client command route. Typical though, the day I release it, Valve go and change it.

Looks like I have to re-code it again

Mani.

Thanks... I knew i had to go this route...
But I dont know what g_pICvar object is, not how to obtain it.
BeetleFart is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 01-21-2005 , 08:57  
Reply With Quote #4

Quote:
Originally Posted by BeetleFart
Thanks... I knew i had to go this route...
But I dont know what g_pICvar object is, not how to obtain it.
Ohhh, BF unless you have been doing engine hooks and ConCommand "hooks" you will have a couple of "interresting" hours ahead...

The new implementation is sort of harder and easier... harder because you need to understand and code ConCommand hook and engine function hook (you need to call the original ConCommand unless you want to reimplement the complete autobuy functionality), and easier because now rebuy can be implemented the same way as autobuy...

GL & HF
/X
XAD is offline
Manip
Senior Member
Join Date: Jan 2004
Old 01-21-2005 , 09:09  
Reply With Quote #5

Just to rub it in with sap 0.7, nothing has broken in the update (including the weapon restrictions)
Manip is offline
Send a message via AIM to Manip
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 01-21-2005 , 09:37  
Reply With Quote #6

Quote:
Originally Posted by Manip
Just to rub it in with sap 0.7, nothing has broken in the update (including the weapon restrictions)
Do you actually process autobuy/rebuy commands ?

I'm sure I checked by grep'ing the listed commands in the cvar interface. I did not find cl_setautobuy, cl_setrebuy, autobuy, rebuy etc. The only way I could get at them was by the client command call.

Now it's changed though, not a big deal but not what I wanted to be doing this evening

Mani.
Mani is offline
Manip
Senior Member
Join Date: Jan 2004
Old 01-21-2005 , 09:40  
Reply With Quote #7

I'm using ClientCommand to get them and process them by 'hand'.
Manip is offline
Send a message via AIM to Manip
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 01-21-2005 , 09:44  
Reply With Quote #8

Quote:
Originally Posted by Manip
I'm using ClientCommand to get them and process them by 'hand'.
Apparently the autobuy commands don't go through the client command anymore according to BF thanks to the latest Valve update. I haven't checked this myself but I assume he is correct.

I have checked that there are now concommands. 'autobuy' and 'rebuy'.

Mani
Mani is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 01-21-2005 , 09:48  
Reply With Quote #9

Quote:
Originally Posted by Mani
Quote:
Originally Posted by Manip
I'm using ClientCommand to get them and process them by 'hand'.
Apparently the autobuy commands don't go through the client command anymore according to BF thanks to the latest Valve update. I haven't checked this myself but I assume he is correct.

I have checked that there are now concommands. 'autobuy' and 'rebuy'.

Mani
You may want to check it just to be sure..
I do have a trap before i check for cl_autobuy in pcmd but, so just to make sure we should both (or all 3 ) check to see completely.
BeetleFart is offline
Manip
Senior Member
Join Date: Jan 2004
Old 01-21-2005 , 09:51  
Reply With Quote #10

Well I have an up-to-date HLSDS + CSS and it seems to catch them fine. ^Shrug^
Manip is offline
Send a message via AIM to Manip
Reply



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


All times are GMT -4. The time now is 00:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode