AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Custom Rebuy (https://forums.alliedmods.net/showthread.php?t=307836)

sekac 05-27-2018 07:28

[REQ] Custom Rebuy
 
I want a plugin that saves your last bought weapons and allows you to buy them the next round with 'repurchase'. I need this so I can customize the original 'rebuy'.

karimoo97 05-27-2018 17:16

Re: [REQ] Custom Rebuy
 
What's wrong with the original rebuy ?
I'm not sure what do you exactly need but try THIS

sekac 05-28-2018 06:48

Re: [REQ] Custom Rebuy
 
Quote:

Originally Posted by karimoo97 (Post 2594158)
What's wrong with the original rebuy ?
I'm not sure what do you exactly need but try THIS

Sometimes it does absolutely nothing, other times it just buys your pistol without your primary. I will try storing players weapon on buy?

sekac 05-28-2018 07:19

Re: [REQ] Custom Rebuy
 
Can someone help me hook rebuy?

I tried this
PHP Code:

register_clcmd("rebuy""ClRebuy"

but it didn't work.

I want to block it and call custom_rebuy(id)

CrAzY MaN 05-28-2018 07:48

Re: [REQ] Custom Rebuy
 
What do u want?

1.U wanna make server custom rebuy?
Like press F2 to get server rebuy weapons.

2.Or rebuy that weapons which were bought by person last round?

sekac 05-28-2018 07:54

Re: [REQ] Custom Rebuy
 
Quote:

Originally Posted by CrAzY MaN (Post 2594218)
What do u want?

1.U wanna make server custom rebuy?
Like press F2 to get server rebuy weapons.

2.Or rebuy that weapons which were bought by person last round?

2. Rebuy the weapons which were bought by that person last round.

Here is what I have for getting the weapons.

PHP Code:

public client_buy(iditemID) {
    if(
itemID 30)
        return 
PLUGIN_CONTINUE;
    
    if(
itemID == 17 || itemID == 16 || itemID == || itemID == 26 || itemID == 11)
        
secWeapon[id] = itemID
    
else 
        
primWeapon[id] = itemID 


CrAzY MaN 05-28-2018 11:44

Re: [REQ] Custom Rebuy
 
I think u have default file named rebuy.txt and autobuy.txt in base folder

^SmileY 05-28-2018 13:12

Re: [REQ] Custom Rebuy
 
You can't block rebuy command since it execute internal file on client (Rebuy.txt) and to server commands that stored in this file.

Specify what you want to do here

sekac 05-28-2018 14:35

Re: [REQ] Custom Rebuy
 
Quote:

Originally Posted by ^SmileY (Post 2594256)
You can't block rebuy command since it execute internal file on client (Rebuy.txt) and to server commands that stored in this file.

Specify what you want to do here

I want to block the original rebuy command and execute a custom one. What about CS_InternalCommand?

^SmileY 05-28-2018 14:44

Re: [REQ] Custom Rebuy
 
Quote:

Originally Posted by sekac (Post 2594270)
I want to block the original rebuy command and execute a custom one. What about CS_InternalCommand?

This is not a valid repply, what you want to do exactly?

Again, you can't simple block rebuy or replace it, you can hook it and do actions based on parameters of that command or code that you want.


All times are GMT -4. The time now is 10:35.

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