Raised This Month: $ Target: $400
 0% 

VIP get money for HS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ady20
Member
Join Date: Sep 2012
Old 09-29-2012 , 06:40   VIP get money for HS
Reply With Quote #1

Is there any plugin that a VIP will get money for each HS? Like 10-20$ for 1 hs. Thats all. I can't seem to find any. All I need is that the VIP get money for each HS. Thats all.
Ady20 is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 09-29-2012 , 06:48   Re: VIP get money for HS
Reply With Quote #2

I can make you a quick one like in 10 mins. This one should work:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "VIP HS MONEY"
#define VERSION "1.0"
#define AUTHOR "Dunn0"

new mpdmkbmhb

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
mpd register_cvar("money_per_damage","0")
    
mkb register_cvar("money_kill_bonus","0")
    
mhb register_cvar("money_hs_bonus","20")
    
register_event("Damage","Damage","b")
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
}

public 
Damage(id)
{
    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint)
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
hitpoint==1money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }


Last edited by Unkolix; 09-29-2012 at 06:54.
Unkolix is offline
quark
Veteran Member
Join Date: Oct 2011
Location: Your mind.
Old 09-29-2012 , 07:39   Re: VIP get money for HS
Reply With Quote #3

Quote:
All I need is that the VIP get money for each HS
And I dont think that you made this, Or are you dunn0?
__________________

Check out My Plugins:
qServerInfo ; ASKTAG

Last edited by quark; 09-29-2012 at 07:43.
quark is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 09-29-2012 , 07:50   Re: VIP get money for HS
Reply With Quote #4

If you don't see it... I left the credits to the maker... I just took some code from his plugin...

Last edited by Unkolix; 09-29-2012 at 07:50.
Unkolix is offline
Ady20
Member
Join Date: Sep 2012
Old 09-29-2012 , 07:52   Re: VIP get money for HS
Reply With Quote #5

hm....

cstrike/addons/amxmodx/scripting/moneyvip.sma<25> : error 017: undefined symbol "maxplayers"
cstrike/addons/amxmodx/scripting/moneyvip.sma<30> : error 017 undefined symbol "cs_set_user_money"
cstrike/addons/amxmodx/scripting/moneyvip.sma<32> : ewarning 204: symbol is assigned a value that is never used: "mkb"

Last edited by Ady20; 09-29-2012 at 08:02.
Ady20 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-29-2012 , 12:08   Re: VIP get money for HS
Reply With Quote #6

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "VIP HS MONEY"
#define VERSION "1.0"
#define AUTHOR "Dunn0"

new mpdmkbmhbmaxplayers

#define VIP_LEVEL ADMIN_LEVEL_H

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
mpd register_cvar("money_per_damage","0")
    
mkb register_cvar("money_kill_bonus","0")
    
mhb register_cvar("money_hs_bonus","20")
    
maxplayers get_maxplayers()
    
register_event("Damage","Damage","b")
    
register_event("DeathMsg""event_death""a")
}

public 
Damage(id)
{
    new 
attacker get_user_attacker(id,weapon,hitpoint)
    if(! (
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id) )
        return 
PLUGIN_HANDLED
    
if (get_user_flags(attacker) & VIP_LEVEL
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
read_data(3) & HIT_HEAD)    money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
    return 
PLUGIN_HANDLED
}  
public 
event_death()
{
    new 
attacker read_data(1)
    new 
victim read_data(2)

    if(! (
victim <= maxplayers && victim != attacker) )
        return 
PLUGIN_HANDLED

    
if (get_user_flags(attacker) & VIP_LEVEL
    {
        new 
money get_pcvar_num(mkb)
        if(
read_data(3) )    money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
    return 
PLUGIN_HANDLED

i edited his code to remove the specified errors, and any other runtime errors i thought might occur.
I also gave you a define to set how you determine VIP. just change VIP_LEVEL value to w/e.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 09-29-2012 at 12:10.
Liverwiz is offline
Ady20
Member
Join Date: Sep 2012
Old 09-29-2012 , 13:05   Re: VIP get money for HS
Reply With Quote #7

Thank you all a lot.
Ady20 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 16:58.


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