This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

First Round Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tote
Senior Member
Join Date: Jul 2023
Old 05-06-2024 , 09:29   Re: First Round Kill
Reply With Quote #1

Quote:
Originally Posted by BlizzardPeru View Post
Could you add a HUD that says: Player "X" made the first blood gets a Money + HP + ARMOR Bonus?
Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool: g_bFirstKill

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event ( "DeathMsg", "event_death", "a" )
	register_event ( "HLTV", "event_new_round", "a", "1=0", "2=0" )  
}

public plugin_precache ( ) {
	
	precache_sound ( "misc/firstblood.wav" );
	
}

public event_death ( ) {
	
	new attacker = read_data ( 1 )
	
	if ( ! g_bFirstKill ) {
		
		new szName[33]
		get_user_name(attacker, szName, charsmax(szName))
		g_bFirstKill = true
		cs_set_user_money ( attacker, cs_get_user_money ( attacker ) + 2000 )
		set_user_health ( attacker, get_user_health ( attacker ) + 15 )
		set_user_armor  ( attacker, get_user_armor ( attacker ) + 15 )
		emit_sound( 0, CHAN_AUTO, "misc/firstblood.wav", 0.7, ATTN_NORM, 0, PITCH_NORM );
		set_hudmessage(random_num(10,255), random(256), random(256), -1.0, 0.20, 0, 6.0, 12.0, 0.0, 0.0, -1)
		show_hudmessage(0, "Player %s made the first kill and got +15 HP, +15 AR & 2000$ !", szName)
		
	}
}

public event_new_round ( )
	g_bFirstKill = false

Last edited by Tote; 05-06-2024 at 09:30.
Tote 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 20:04.


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