Raised This Month: $ Target: $400
 0% 

Hook bought weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
IAmReallyCool
Member
Join Date: Nov 2013
Old 11-14-2014 , 16:35   Hook bought weapon
Reply With Quote #1

Hi. How can I hook the moment when e.g. weapon_m4a1 is bought from the shop?
IAmReallyCool is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 11-14-2014 , 20:45   Re: Hook bought weapon
Reply With Quote #2

Quote:
Originally Posted by IAmReallyCool View Post
Hi. How can I hook the moment when e.g. weapon_m4a1 is bought from the shop?
Check cstrike.inc on the latest dev build of amxx. They included forwards for catching the same events you're asking for
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-15-2014 , 04:26   Re: Hook bought weapon
Reply With Quote #3

Or use cs_buy forward from ConnorMcLeod if you don't want to use 1.8.3
__________________

Last edited by HamletEagle; 11-15-2014 at 04:27.
HamletEagle is offline
IAmReallyCool
Member
Join Date: Nov 2013
Old 11-15-2014 , 05:14   Re: Hook bought weapon
Reply With Quote #4

Thanks, I will check it. Won't Weappickup do in my case?
IAmReallyCool is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-15-2014 , 06:01   Re: Hook bought weapon
Reply With Quote #5

WeapPickup event is called only an entity pickup a weapon( like from the ground ). If you want to detect the moment when a weapon is added to player hook Ham_AddPlayerItem( pickup, buy, given by other plugins etc ). If you need to catch the moment when he buy it from the shop use cs_buy forward.
__________________

Last edited by HamletEagle; 11-15-2014 at 06:01.
HamletEagle is offline
IAmReallyCool
Member
Join Date: Nov 2013
Old 11-15-2014 , 07:18   Re: Hook bought weapon
Reply With Quote #6

Thanks a lot Ham_AddPlayerItem will perfectly do!
IAmReallyCool 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 17:45.


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