AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Add/modify weapons in cl_setrebuy (https://forums.alliedmods.net/showthread.php?t=229116)

kNowo 11-01-2013 18:47

Add/modify weapons in cl_setrebuy
 
How do I add let's say m4a1 into a player's cl_setrebuy commands.
I've done some debugging of the command but the args are PrimaryWeapon SecondaryWeapon and not the actual weapon names. Also, is it possible to add m4a1 into a Terrorist player's cl_setrebuy cmd without changing the player's team pdata or something like that?

bibu 11-01-2013 19:47

Re: Add/modify weapons in cl_setrebuy
 
What are you exactly trying to achieve?

kNowo 11-02-2013 10:59

Re: Add/modify weapons in cl_setrebuy
 
Isn't it obvious? I want to manually edit a player's cl_setrebuy arguments, adding m4a1 into a Terrorist player's cl_setrebuy.

I've made a plugin to allow CTs buy Ts-specific weapons and vice versa and now I would like the players that did so in the last round can buy the same weapon by simply using rebuy command.

ConnorMcLeod 11-02-2013 12:38

Re: Add/modify weapons in cl_setrebuy
 
rebuy/autobuy rules are same as default buy, so it won't work.

kNowo 11-02-2013 15:02

Re: Add/modify weapons in cl_setrebuy
 
What do you mean by default buy rules? Can you explain more on that?

YamiKaitou 11-02-2013 15:03

Re: Add/modify weapons in cl_setrebuy
 
He means that the same restrictions that exist in the buy menu exist for rebuy/autobuy

kNowo 11-02-2013 17:08

Re: Add/modify weapons in cl_setrebuy
 
I still don't know which rules ConnorMcLeod meant

YamiKaitou 11-02-2013 17:11

Re: Add/modify weapons in cl_setrebuy
 
The rule that prevents CT's from purchasing T weapons and vise versa

kNowo 11-02-2013 17:26

Re: Add/modify weapons in cl_setrebuy
 
Well, you can change the player's team offset first then engclient_cmd(index, "m4a1") to make him able to buy m4a1. What about the rebuy, will doing the same thing make it work?


All times are GMT -4. The time now is 23:14.

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