Did that button give you a weapon?
Hey guys
I want to detect if a button a user just pressed gave him a weapon. How can I check it? What method should I use? Should I just hook the Ham_Use for all the button types and get_user_weapon then set task to 0.1 seconds checking if that changed? or? |
Re: Did that button give you a weapon?
Nvm I figured it out, sorry for posting, I just have a really famous jb server and I cant test on it so I ask here. For the people who are interested of what I figured out. setting task to 0.2 after Ham_use is called, get_user_weapon gets you the right answer.
|
Re: Did that button give you a weapon?
Quote:
|
Re: Did that button give you a weapon?
Quote:
|
Re: Did that button give you a weapon?
It's really easy, most easy is to use HLDS from your steam account, but you can also use hlds update tools.
Then you have a ready to use server, just need to install metamod and amxx on it. About your thing, when a player is using a button, you should use that button pev_target and check which other entity is involved. |
Re: Did that button give you a weapon?
Quote:
If you get the Standalone HLDS like everyone that writes plugins should have then it is EXACTLY the same as a public server (some may not agree but it's best to test in an environment as close as possible to the final home). Would you like to know why? It's EXACTLY the same program! :) Game server providers don't get a special version. |
Re: Did that button give you a weapon?
Quote:
|
Re: Did that button give you a weapon?
Quote:
|
Re: Did that button give you a weapon?
Quote:
|
Re: Did that button give you a weapon?
Quote:
Listen server is lot more faster way to testing. |
| All times are GMT -4. The time now is 07:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.