Raised This Month: $ Target: $400
 0% 

How to hook what player buys?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Re4per
Junior Member
Join Date: Aug 2012
Old 08-18-2012 , 06:02   How to hook what player buys?
Reply With Quote #1

I need to stop players from getting money for kills, round ends and team wins. I can do that with cs_set/get_user_money, but i need to know what player buys. Thanks.
Re4per is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-18-2012 , 09:53   Re: How to hook what player buys?
Reply With Quote #2

http://forums.alliedmods.net/showpos...29&postcount=3
dark_style is offline
Re4per
Junior Member
Join Date: Aug 2012
Old 08-18-2012 , 10:12   Re: How to hook what player buys?
Reply With Quote #3

Thanks
Re4per is offline
Old 08-18-2012, 10:15
dark_style
This message has been deleted by dark_style. Reason: ..
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-18-2012 , 11:05   Re: How to hook what player buys?
Reply With Quote #4

If you need to block you need that one :

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

Also i don't know if the other method is 100% reliable, but it should be.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-19-2012 , 02:48   Re: How to hook what player buys?
Reply With Quote #5

Connor it should be created with your buy forward, shouldn't it ? Just tell me if it is good method to do it with your forward, so I can use it.

Last edited by dark_style; 08-19-2012 at 03:07.
dark_style is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-19-2012 , 03:14   Re: How to hook what player buys?
Reply With Quote #6

I have read only title and not his post, so considering his post, i don't really know what should be used, because i'm not sur of what he exactly try to do.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Re4per
Junior Member
Join Date: Aug 2012
Old 08-19-2012 , 04:29   Re: How to hook what player buys?
Reply With Quote #7

I create a variable that holds players money. It only descends when he buys something and only ascends in some specific situations. When someone is killed or new round starts, players money is set to the sum in the variable, so he doesn't get money of kills and new rounds.

Connors method works perfectly.

Last edited by Re4per; 08-19-2012 at 04:30.
Re4per 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 05:52.


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