AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Killing Money (https://forums.alliedmods.net/showthread.php?t=61922)

elpouletorange 10-14-2007 00:26

Killing Money
 
Hi, I only want to know how can I change the money give when somebody kill someone, and too the money give after the round (if win == 3600) (if lose == 1500).

Thanks.

elpouletorange:up:

Arkshine 10-14-2007 07:35

Re: Killing Money
 
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 );         }     }

purple_pixie 10-15-2007 09:12

Re: Killing Money
 
Doesn't team lose/win money depend on how many rounds you have won/lost consecutively?

And whether hostages were rescued / bomb planted?

Arkshine 10-15-2007 10:43

Re: Killing Money
 
1 Attachment(s)
I don't know purple_pixie.

I have just played few rounds and money stay the same.

I have not tested more thoroughly but I'm pretty sure that you're right.


EDIT : connor found that from cs1.5 manual. I don't know if it's the same for cs1.6.

elpouletorange 10-16-2007 11:39

Re: Killing Money
 
Thx ill try this when i will be back at home :D


All times are GMT -4. The time now is 01:14.

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