Raised This Month: $ Target: $400
 0% 

Best way to log buy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 11-22-2010 , 14:57   Re: Best way to log buy
Reply With Quote #1

Maybe this can help you.

PHP Code:
/* http://forums.alliedmods.net/showthread.php?t=59057&highlight=weapon+buy */

#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(iddummydummy2)
}

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 
= -1
                
do ++x; while ((new_weapon /= 2) >= 1)
                static 
wname[32]
                
get_weaponname(xwnamesizeof wname 1)
                
server_print("Player [ClientIndex=%d] has bought ^"%s^" [WeaponIndex=%d]"idwnamex)
        }

bibu 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 11:17.


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