AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to hook what player buys? (https://forums.alliedmods.net/showthread.php?t=193308)

Re4per 08-18-2012 06:02

How to hook what player buys?
 
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.

dark_style 08-18-2012 09:53

Re: How to hook what player buys?
 
http://forums.alliedmods.net/showpos...29&postcount=3

Re4per 08-18-2012 10:12

Re: How to hook what player buys?
 
Thanks

ConnorMcLeod 08-18-2012 11:05

Re: How to hook what player buys?
 
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.

dark_style 08-19-2012 02:48

Re: How to hook what player buys?
 
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.

ConnorMcLeod 08-19-2012 03:14

Re: How to hook what player buys?
 
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.

Re4per 08-19-2012 04:29

Re: How to hook what player buys?
 
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.


All times are GMT -4. The time now is 05:52.

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