Raised This Month: $ Target: $400
 0% 

Bomb Features Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xnn
Junior Member
Join Date: Jun 2006
Old 06-25-2006 , 15:08   Bomb Features Plugin
Reply With Quote #1

Congrats for the new forums. All the stuff it's better organized and much more easy to find now
Now, here comes my problem. I made a plugin that plays a sound when the bomb is planted or defused, and it should write in chat that "someone" planted or defused the bomb. It only shows "planted the bomb" or "defused the bomb" without the name of the player. Can you please help me? Thanks alot. I'm still a beginner, but I'm willing to learn

Code:
/* ------------------------------------- */
/* Bomb Features Plugin created by xenon */
/*         http://www.cszone.ro/ 	 */
/*        http://www.amxmodx.org/        */
/* ------------------------------------- */

#include <amxmodx>
#include <cstrike>

public plugin_init() {
	register_plugin("Bomb Features","1.00","xenon")
	register_event("SendAudio", "bmb_plant", "a", "2&%!MRAD_BOMBPL")
	register_event("SendAudio", "bmb_def", "a", "2&%!MRAD_BOMBDEF")
}

public bmb_plant() {
	new planter = read_data(2)
	new name[32]
	get_user_name(planter,name,31)
		
	client_cmd(0,"stopsound")
	client_cmd(0,"spk misc/planted")
	client_print(0,print_chat,"%s planted the bomb!",planter)
	
	return PLUGIN_HANDLED
}

public bmb_def() {
	new defuser = read_data(2)
	new name[32]
	get_user_name(defuser,name,31)
	
	client_cmd(0,"stopsound")
	client_cmd(0,"spk misc/defused")
	client_print(0,print_chat,"%s defused the bomb!",defuser)
	
	return PLUGIN_HANDLED
}

public plugin_precache() {
	precache_sound("misc/planted.wav")
	precache_sound("misc/defused.wav")

	return PLUGIN_CONTINUE
}
xnn is offline
 


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 08:09.


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