Raised This Month: $ Target: $400
 0% 

Add/modify weapons in cl_setrebuy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 11-01-2013 , 18:47   Add/modify weapons in cl_setrebuy
Reply With Quote #1

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?
kNowo is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-01-2013 , 19:47   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #2

What are you exactly trying to achieve?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 11-02-2013 , 10:59   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #3

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.

Last edited by kNowo; 11-02-2013 at 10:59.
kNowo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-02-2013 , 12:38   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #4

rebuy/autobuy rules are same as default buy, so it won't work.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 11-02-2013 , 15:02   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #5

What do you mean by default buy rules? Can you explain more on that?
kNowo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-02-2013 , 15:03   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #6

He means that the same restrictions that exist in the buy menu exist for rebuy/autobuy
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 11-02-2013 , 17:08   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #7

I still don't know which rules ConnorMcLeod meant

Last edited by kNowo; 11-02-2013 at 17:09.
kNowo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-02-2013 , 17:11   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #8

The rule that prevents CT's from purchasing T weapons and vise versa
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
kNowo
Senior Member
Join Date: Apr 2011
Location: Malaysia
Old 11-02-2013 , 17:26   Re: Add/modify weapons in cl_setrebuy
Reply With Quote #9

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?
kNowo 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 23:14.


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