Raised This Month: $ Target: $400
 0% 

Properly catch buy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-20-2009 , 16:41   Re: Properly catch buy
Reply With Quote #1

Here, a snippet from VEN :

Code:
#include <amxmodx> #define MAX_CLIENTS 32 new g_weapons[MAX_CLIENTS + 1] public plugin_init() {         register_event("Money", "event_money", "be") } public client_command(id) {         static dummy[32], dummy2         g_weapons[id] = get_user_weapons(id, dummy, dummy2) } public event_money(id) {         new old_weapons = g_weapons[id]         client_command(id)         new new_weapon = g_weapons[id] & ~old_weapons         if (new_weapon) {                 new x = -1                 do ++x; while ((new_weapon /= 2) >= 1)                 static wname[32]                 get_weaponname(x, wname, sizeof wname - 1)                 server_print("Player [ClientIndex=%d] has bought ^"%s^" [WeaponIndex=%d]", id, wname, x)         } }

I'm not sure if it's a proper way or not.
Arkshine is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-20-2009 , 16:58   Re: Properly catch buy
Reply With Quote #2

Thanks, I'll test it. (+k)
(Need to wait 24 hours before giving you karma...)
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores 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 01:40.


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