Raised This Month: $59 Target: $400
 14% 

Damage by the amount of money 1.5


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Exolent[jNr] (178)
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-08-2009 , 21:19   Damage by the amount of money 1.5
Reply With Quote #1

Damage by the amount of money 1.5

Description:
Depending on the money that you have, you bring more damage.
For example, if you have more than $14000, the damage is multiplied by 2.5.

Cvar:
amx_dmg_money : On/off the plugin

Server Command:
moneydmg_addlevel <money> <damage multiplier>: Money necessary and multiply the damage.
Example:
moneydmg_addlevel 10000 1.5
You need to have 5000 of money and the damage is multiplied by 1.5

Installation:
Add your custom levels writing in amxx.cfg:
moneydmg_addlevel <money> <damage multiplier>

Changelog:
1.0 - First Release (04 - 08 - 09)
1.3 - Plugin Fixed (04 - 09 - 09)
1.4 - Code Optimized and added new cvars (04 - 11 - 09)
1.5 - Plugin Updated at Exolent's way, thanks (06 - 18 - 09)

Credits:
joaquimandrade
Exolent[jNr]
ConnorMcLeod
Nextra
Starsailor

Enjoy
Attached Files
File Type: sma Get Plugin or Get Source (dmg_amount_money.sma - 2023 views - 1.8 KB)
__________________

Last edited by alan_el_more; 06-18-2009 at 19:51. Reason: Plugin updated at version 1.5
alan_el_more is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 04-08-2009 , 21:22   Re: Damage by the amount of money 1.0
Reply With Quote #2

For Zombie Plague?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-08-2009 , 21:23   Re: Damage by the amount of money 1.0
Reply With Quote #3

Quote:
Originally Posted by TitANious View Post
For Zombie Plague?
Only if you have ON the money
__________________
alan_el_more is offline
Old 04-08-2009, 21:24
TitANious
This message has been deleted by TitANious. Reason: nvm
Old 04-08-2009, 21:29
alan_el_more
This message has been deleted by alan_el_more.
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 04-08-2009 , 21:30   Re: Damage by the amount of money 1.0
Reply With Quote #4

Lol I deleted it. Can you say it requires Zombie Plague?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 04-08-2009 , 21:30   Re: Damage by the amount of money 1.0
Reply With Quote #5

PHP Code:
    for(new id;id <= g_maxplayers;id++)
    switch(
cs_get_user_money(id))
    {
        case 
5000..10000:
        {
            
level_1[id] = true
            level_2
[id] = false
            level_3
[id] = false
        
}
        case 
10001..14000:
        {
            
level_1[id] = false
            level_2
[id] = true
            level_3
[id] = false
        
}
        case 
14001..16000:
        {
            
level_1[id] = false
            level_2
[id] = false
            level_3
[id] = true
        
}
    }

---->
PHP Code:
for(new id;id <= g_maxplayers;id++)  {
        switch(
cs_get_user_money(id))
        {
            case 
5000..10000:
            {
                
level_1[id] = true
                level_2
[id] = false
                level_3
[id] = false
            
}
            case 
10001..14000:
            {
                
level_1[id] = false
                level_2
[id] = true
                level_3
[id] = false
            
}
            case 
14001..16000:
            {
                
level_1[id] = false
                level_2
[id] = false
                level_3
[id] = true
            
}
        }
    } 
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 04-08-2009 , 21:32   Re: Damage by the amount of money 1.0
Reply With Quote #6

Quote:
Originally Posted by TitANious View Post
Lol I deleted it. Can you say it requires Zombie Plague?
Not really, it's just a write mistake.
__________________
"There is no knowledge, that is not power"
fezh is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-08-2009 , 21:32   Re: Damage by the amount of money 1.0
Reply With Quote #7

Quote:
Originally Posted by TitANious View Post
Lol I deleted it. Can you say it requires Zombie Plague?
no
__________________
alan_el_more is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-08-2009 , 22:18   Re: Damage by the amount of money 1.0
Reply With Quote #8

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

enum Level
{
    
Level0,
    
Level1,
    
Level2,
    
Level3
}

new 
Level:PlayerLevels[33]
new 
Float:LevelDamageMultiplier[Level] = {_:1.0,_:1.5,_:2.0,_:2.5}

new 
g_enabled

public plugin_init()
{
    
register_plugin("Damage by the amount of money""1.0""alan_el_more")
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
RegisterHam(Ham_Spawn,"player","playerSpawn",1)
    
    
g_enabled register_cvar("amx_dmg_money""1")
}

public 
playerSpawn(id)
{
    if(
get_pcvar_num(g_enabled) && is_user_alive(id))
    {
        switch(
cs_get_user_money(id))
        {
            case 
5000..10000:
            {
                
PlayerLevels[id] = Level1
            
}
            case 
10001..14000:
            {
                
PlayerLevels[id] = Level2
            
}
            case 
14001..16000:
            {
                
PlayerLevels[id] = Level3
            
}
            default:
            {
                
PlayerLevels[id] = Level0;
            }
        }
    }
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    
SetHamParamFloat(4damage LevelDamageMultiplier[PlayerLevels[attacker]])

__________________
joaquimandrade is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-08-2009 , 22:21   Re: Damage by the amount of money 1.0
Reply With Quote #9

thanks for optimize the code
__________________
alan_el_more is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-08-2009 , 22:24   Re: Damage by the amount of money 1.0
Reply With Quote #10

Quote:
Originally Posted by alan_el_more View Post
thanks for optimize the code
__________________
joaquimandrade is offline
Reply


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 05:44.


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