AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Autobuy + rebuy (https://forums.alliedmods.net/showthread.php?t=226333)

Adam108 09-16-2013 14:14

Autobuy + rebuy
 
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

dark_style 09-16-2013 14:16

Re: Autobuy + rebuy
 
http://forums.alliedmods.net/showthread.php?t=149380

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

Adam108 09-16-2013 14:31

Re: Autobuy + rebuy
 
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.

dark_style 09-17-2013 01:38

Re: Autobuy + rebuy
 
The forward I gave you should block the autobuy attempts also, did you even try it ?

Adam108 09-17-2013 09:05

Re: Autobuy + rebuy
 
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

Adam108 09-17-2013 14:11

Re: Autobuy + rebuy
 
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

Black Rose 09-17-2013 15:56

Re: Autobuy + rebuy
 
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?

Adam108 09-18-2013 08:41

Re: Autobuy + rebuy
 
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.

Black Rose 09-18-2013 12:35

Re: Autobuy + rebuy
 
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.

Adam108 09-18-2013 14:32

Re: Autobuy + rebuy
 
Ok :D Firstly, i will try the easilier way :D Do you know any easy way? :D


All times are GMT -4. The time now is 19:04.

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