Raised This Month: $68 Target: $400
 17% 

Damage Money


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Shader62
New Member
Join Date: Aug 2019
Old 08-18-2019 , 02:06   Damage Money
#1

I would like when you shoot through the wall not to give you money


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

new const PLUGIN_NAME[  ] = "[Bio] Damage Money (Chance)", 
	 PLUGIN_VERSION[  ] = "1.0", 
	 PLUGIN_AUTHOR[  ] = "Dias";

const CHANCE = 30;

public plugin_init(  ) {

	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
	is_biomod_active(  ) ? plugin_init2(  ) : pause( "ad" );
}

public plugin_init2(  ) {

	RegisterHam(Ham_TakeDamage, "player", "fw_take_damage")
}

public fw_take_damage(victim, inflictor, attacker, Float:damage, damagebits)
{
	if(!is_user_connected(victim) || !is_user_connected(attacker))
		return HAM_IGNORED
	
	if(is_user_zombie(attacker) || !is_user_zombie(victim))
		return HAM_IGNORED
		
	if(damage == 0.0)
		return HAM_IGNORED

	new Chance = random_num( 1, 100 );

	if( Chance > 0 && Chance <= CHANCE ) {
		cs_set_user_money( attacker, cs_get_user_money( attacker ) + floatround( damage ) );
	} else {
		return HAM_HANDLED;
	}
		
	return HAM_HANDLED
}
Shader62 is offline
Old 08-18-2019, 07:46
Shader62
This message has been deleted by asherkin.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-18-2019 , 07:58   Re: Damage Money
#2

Quote:
Originally Posted by Shader62 View Post
???
What? You expect someone to do this in just 5 hours? People here can wait up to 5 months and still not get their request made. Don't bump your thread - you're not helping yourself, you just lower your chances of someone helping you.
__________________

Last edited by OciXCrom; 08-18-2019 at 07:58.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 08-23-2019, 10:06
Shader62
This message has been deleted by asherkin.
Old 08-23-2019, 11:11
Natsheh
This message has been deleted by asherkin.
Old 08-23-2019, 11:12
DON KHAN 1
This message has been deleted by asherkin.
Old 08-23-2019, 11:44
Mordekay
This message has been deleted by asherkin.
Closed Thread


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 04:26.


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