Raised This Month: $ Target: $400
 0% 

Killing Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2007 , 07:35   Re: Killing Money
Reply With Quote #1

Try this.

Change the values '600', '2000', '1000' to what you want.

Code:
    #include <amxmodx>     #include <cstrike>     #define MAX_CLIENTS 32         new g_iOldMoney_k[ MAX_CLIENTS + 1 ];         public plugin_init()     {         register_plugin( "", "1.0", "Amxx Community" );                 register_event( "SendAudio", "eTeam_win", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin" );         register_event( "DeathMsg" , "eDeath_Msg", "a" );         register_message( get_user_msgid( "Money" ), "message_money" );     }         public message_money( msg_id, msg_dest, msg_entity )     {         switch( get_msg_arg_int( 1 ) - g_iOldMoney_k[ msg_entity ] )         {             case 300  : // kill money             {                   cs_set_user_money( msg_entity, g_iOldMoney_k[ msg_entity ] + 600 );                 return PLUGIN_HANDLED;             }             case 3250 : // Team win money             {                 cs_set_user_money( msg_entity, g_iOldMoney_k[ msg_entity ] + 2000 );                 return PLUGIN_HANDLED;             }             case 1500 : // Team lost money             {                 cs_set_user_money( msg_entity, g_iOldMoney_k[ msg_entity ] + 1000 );                 return PLUGIN_HANDLED;             }         }         return PLUGIN_CONTINUE;     }     public eDeath_Msg()     {         new iKiller = read_data( 1 );                 if( !iKiller )             return;                 g_iOldMoney_k[ iKiller ] = cs_get_user_money( iKiller );     }         public eNew_round()     {         save_old_money();     }         public eTeam_win()     {         save_old_money();     }     save_old_money()     {         new iPlayers[32], iNum, iPid;         get_players( iPlayers, iNum );                 for( new i; i < iNum; i++ )         {             iPid = iPlayers[i];             g_iOldMoney_k[ iPid ] = cs_get_user_money( iPid );         }     }
__________________
Arkshine 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:14.


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