Raised This Month: $ Target: $400
 0% 

[HLP] give money to player(s)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-24-2011 , 11:29   [HLP] give money to player(s)
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>


#define PLUGIN_NAME "Bomb Plant/Defuse Money Bonus"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "Locks"

new plantbonus
new boombonus
new defusebonus

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
    
register_event("23","Event_TargetBombed","a","1=17","6=-105","7=17");
    
plantbonus register_cvar("amx_plant_bonus""100")
    
boombonus register_cvar("amx_boom_bonus""100")
    
defusebonus register_cvar("amx_defuse_bonus""200")
}

public 
bomb_planted(id)
{
  
    new 
players[32], num
    get_players
(playersnum)
    new 
player
    
new bonus get_pcvar_num(boombonus)
    for(new 
i;i<num;i++)
    {
        
player=players[i]
        new 
CsTeams:Team cs_get_user_team(player)
        if(
Team == CS_TEAM_T)
        
cs_set_user_money(playercs_get_user_money(player) + bonus)
    
    }
}

public 
Event_TargetBombed(id)
{
  
    new 
players[32], num
    get_players
(playersnum)
    new 
player
    
new bonus get_pcvar_num(plantbonus)
    for(new 
i;i<num;i++)
    {
        
player=players[i]
        new 
CsTeams:Team cs_get_user_team(player)
        if(
Team == CS_TEAM_T)
        
cs_set_user_money(playercs_get_user_money(player) + bonus)
    
    }
}

public 
bomb_defused()
{
  
    new 
players[32], num
    get_players
(playersnum)
    new 
player
    
new bonus get_pcvar_num(defusebonus)
    for(new 
i;i<num;i++)
    {
        
player=players[i]
        new 
CsTeams:Team cs_get_user_team(player)
        if(
Team == CS_TEAM_CT)
        
cs_set_user_money(playercs_get_user_money(player) + bonus)
    
    }

This plugin gives money for the bomb plant \ boom \ defuse events.
How to make money was given to all players in the team?
__________________
sorry my bad english...
alonelive is offline
 


Thread Tools
Display Modes

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 23:23.


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