Raised This Month: $ Target: $400
 0% 

Money plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
code
Member
Join Date: Nov 2011
Old 03-08-2014 , 14:14   Money plugin
Reply With Quote #1

I need money plugin for my jailbreak server i will pay. skype - trollis54321
If a t kills ct - get 10$
If a ct kills t - get 0 $
If t wins round - get 2$
If ct wins round - get 1$

Simple plugin so please HELP

Another thing money gets added only if there are 3 players online.
Please Help

Found one good code
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 );
        }
    }

Last edited by code; 03-08-2014 at 14:16.
code 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:16.


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