Raised This Month: $ Target: $400
 0% 

Money per kill adjust?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gameplayonline
Member
Join Date: Jun 2017
Old 06-20-2018 , 07:08   Money per kill adjust?
Reply With Quote #1

Hello im doign VIP plugin.
I have this code:
Code:
	/* Plugin generated by AMXX-Studio */


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

#define PLUGIN " VIP"
#define VERSION "1.0"
#define AUTHOR "felippeao"

new kill_bonus, hs_bonus;
new maxplayers;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	kill_bonus = register_cvar("money_kill_bonus","450")
	hs_bonus = register_cvar("money_hs_bonus","500")
	register_event("DeathMsg","death_msg","a")	
	// Add your code here...
}

public death_msg()
{
	
	new attacker = read_data( 1 )
	new headshot = read_data(3)
	
	if (get_user_flags(attacker) & ADMIN_LEVEL_H & read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) 
	{
		new money = read_data(2)
		if(headshot)
		{
			money += get_pcvar_num(hs_bonus)
			cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
			client_print(read_data(1), print_chat, "[VIP] %d got %d money for kill",read_data(1), get_pcvar_num(hs_bonus))
		}
		else 
		{
			cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(kill_bonus))
			client_print(read_data(1), print_chat, "[VIP] %d got %d money for kill",read_data(1), get_pcvar_num(kill_bonus))
		}
	}
}
	}
Im getting sometimes 802$ per kill... Why? Normal is 300 and my cvar is 450 bonus i think it must be 750 but im getting 802

Last edited by gameplayonline; 06-20-2018 at 07:16.
gameplayonline is offline
 



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 12:41.


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