Raised This Month: $ Target: $400
 0% 

Bomb Features Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
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
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-25-2006 , 17:11   Re: Bomb Features Plugin
Reply With Quote #2

You could use the CSX module forwards: http://www.amxmodx.org/funcwiki.php?...bomb&go=search
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 06-25-2006 , 19:44   Re: Bomb Features Plugin
Reply With Quote #3

Or consult CS Bomb Scripting FAQ/Tutorial
VEN is offline
xnn
Junior Member
Join Date: Jun 2006
Old 06-26-2006 , 11:43   Re: Bomb Features Plugin
Reply With Quote #4

Thanks alot guys. Didn't knew about that resources...
xnn 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 08:09.


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