Raised This Month: $ Target: $400
 0% 

Autobuy + rebuy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Adam108
Junior Member
Join Date: Jul 2013
Old 09-16-2013 , 14:14   Autobuy + rebuy
Reply With Quote #1

Hi, i have a problem with weapon restricting.
Ive created a plugin, that restrict to buy AWP via register_clcmd("awp","blabla"). It is working, but when client press a autobuy key, and if he has an awp in the autobuy list, it will buy it to him. How can I restrict this?

Are there some differences between CS 1.6 and CS:CZ? (Im running that plugin on CS:CZ)

Sorry for my english
Adam108 is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-16-2013 , 14:16   Re: Autobuy + rebuy
Reply With Quote #2

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

I am not sure if it will work on CZ, I don't play CZ.
__________________




Last edited by dark_style; 09-16-2013 at 14:17.
dark_style is offline
Adam108
Junior Member
Join Date: Jul 2013
Old 09-16-2013 , 14:31   Re: Autobuy + rebuy
Reply With Quote #3

Ok, thanks.
Do exist any simply way to find out that player has pressed rebuy/autobuy key?
I tried these:
PHP Code:
    register_clcmd("autobuy","cmdAutobuy")
    
register_clcmd("rebuy","cmdAutobuy"
But these command arent working.
I konow about this, too:
PHP Code:
register_clcmd"cl_setautobuy""cmdAutobuy" 
But this command responds only once when the client is connected.

Last edited by Adam108; 09-16-2013 at 14:32.
Adam108 is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-17-2013 , 01:38   Re: Autobuy + rebuy
Reply With Quote #4

The forward I gave you should block the autobuy attempts also, did you even try it ?
__________________




Last edited by dark_style; 09-17-2013 at 01:51.
dark_style is offline
Adam108
Junior Member
Join Date: Jul 2013
Old 09-17-2013 , 09:05   Re: Autobuy + rebuy
Reply With Quote #5

No, i just requiered commands, those repond when client press autobuy or rebuy key. I found them:
cl_autobuy
cl_rebuy
So, thanks, that is all i need

Sorry for my english

Last edited by Adam108; 09-17-2013 at 09:06.
Adam108 is offline
Adam108
Junior Member
Join Date: Jul 2013
Old 09-17-2013 , 14:11   Re: Autobuy + rebuy
Reply With Quote #6

I am sorry, i have a second problem:
How can i find out, that player dropped a weapon? If i register..
PHP Code:
register_clcmd("drop","blabla"
...it won't run well, because the function won't respond when:
1. player die and all weapons those he carries will be dropped
2. player buy a new weapon and the old weapon will be dropped

Last edited by Adam108; 09-17-2013 at 14:13.
Adam108 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-17-2013 , 15:56   Re: Autobuy + rebuy
Reply With Quote #7

Try searching in scripting help forum for the words "drop weapon" as topic title.

In the end the XY-problem will make your plugin worse. What are you trying to do exactly?
__________________

Last edited by Black Rose; 09-17-2013 at 15:56.
Black Rose is offline
Adam108
Junior Member
Join Date: Jul 2013
Old 09-18-2013 , 08:41   Re: Autobuy + rebuy
Reply With Quote #8

I want to create my SniperLimit plugin.
I found plugin that responds when the weapon is dropped (http://forums.alliedmods.net/showthread.php?t=49247), but is this the easiliest way to get the weapon was dropped? I have a problem only with the drop when player buy a new weapon, everthing all other i know how to do.
Adam108 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-18-2013 , 12:35   Re: Autobuy + rebuy
Reply With Quote #9

VEN's solutions are always well-crafted and the most correct. It usually explains why certain methods are good/bad in comparison to others as well.

There's the easy way, which can give you problems when you realize it didn't work as you expected it.
Then there's the right way.
__________________
Black Rose is offline
Adam108
Junior Member
Join Date: Jul 2013
Old 09-18-2013 , 14:32   Re: Autobuy + rebuy
Reply With Quote #10

Ok Firstly, i will try the easilier way Do you know any easy way?
Adam108 is offline
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 19:05.


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