Raised This Month: $32 Target: $400
 8% 

How to Detect ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-06-2018 , 12:10   How to Detect ?
Reply With Quote #1

How to detect :

If a Player has bought a weapon or not
And if has bought then what is the weapon or index ??
instinctpt1 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-06-2018 , 12:51   Re: How to Detect ?
Reply With Quote #2

#include cstrike

PHP Code:
/**
 * Called when a client attempts to purchase an item.
 *
 * @note This is called immediately when the client issues a buy command. The
 *       game has not yet checked if the client can actually buy the weapon.
 * @note For a list of possible item ids see the CSI_* constants.
 *
 * @param index     Client index
 * @param item      Item id
 *
 * @return          PLUGIN_CONTINUE to let the buy attempt continue
 *                  PLUGIN_HANDLED to block the buy attempt
 */
forward CS_OnBuyAttempt(indexitem);

/**
 * Called when a client purchases an item.
 *
 * @note This is called right before the user receives the item and before the
 *       money is deducted from their cash reserves.
 * @note For a list of possible item ids see the CSI_* constants.
 *
 * @param index     Client index
 * @param item      Item id
 *
 * @return          PLUGIN_CONTINUE to let the buy continue
 *                  PLUGIN_HANDLED to block the buy
 */
forward CS_OnBuy(indexitem); 
Sometimes navigating in the includes files is not bad as you think.

Edit : this is for amx v183 dev
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-07-2018 at 08:23.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-06-2018 , 12:55   Re: How to Detect ?
Reply With Quote #3

Thnx natsheh <3
instinctpt1 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-06-2018 , 13:07   Re: How to Detect ?
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
#include cstrike

PHP Code:
/**
 * Called when a client attempts to purchase an item.
 *
 * @note This is called immediately when the client issues a buy command. The
 *       game has not yet checked if the client can actually buy the weapon.
 * @note For a list of possible item ids see the CSI_* constants.
 *
 * @param index     Client index
 * @param item      Item id
 *
 * @return          PLUGIN_CONTINUE to let the buy attempt continue
 *                  PLUGIN_HANDLED to block the buy attempt
 */
forward CS_OnBuyAttempt(indexitem);

/**
 * Called when a client purchases an item.
 *
 * @note This is called right before the user receives the item and before the
 *       money is deducted from their cash reserves.
 * @note For a list of possible item ids see the CSI_* constants.
 *
 * @param index     Client index
 * @param item      Item id
 *
 * @return          PLUGIN_CONTINUE to let the buy continue
 *                  PLUGIN_HANDLED to block the buy
 */
forward CS_OnBuy(indexitem); 
Sometimes navigating in the includes files is not bad as you think.
Important, only in 1.8.3.
iceeedr is offline
Send a message via Skype™ to iceeedr
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-06-2018 , 13:19   Re: How to Detect ?
Reply With Quote #5

Pre 1.8.3 can use this
__________________
Bugsy is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-06-2018 , 13:40   Re: How to Detect ?
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
Pre 1.8.3 can use this
Yeah i know that but was thinking for another way without any external include, now glad to know that it is by default in 1.8.3
instinctpt1 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 21:22.


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