Raised This Month: $51 Target: $400
 12% 

request to modify erotic_bomb plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
golfu59
New Member
Join Date: Jan 2020
Old 01-12-2020 , 04:15   request to modify erotic_bomb plugin
Reply With Quote #1

Hello !
I also asked you to help me with this plugin ... I saw on other servers that when you plant the bomb the model dances ... to this plugin that I only dance when you do broadcast ...
Please if you can dance from the moment the bomb is planted.

Thank you very much!

Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN			"Erotic Bomb"
#define VERSION			"0.4"
#define AUTHOR			"8dp & Spection"

#define EROTIC_BOMB_W	"models/erotic_bomb/erotic_bomb.mdl"
#define m_flNextBeep	102
#define m_flNextBlink	106
#define	m_bIsC4			385 

/*=============================================================================================================*/

#define DEFUSE_ANIMATION_START 									// Анимация танца начинается при разминировании
//#define BEEP_SOUND											// Звуки бомбы
#define CUSTOM_SOUND "erotic_bomb/erotic_bomb.wav"				// Кастомная музыка

/*=============================================================================================================*/

new g_iBomb, g_iSequence 

#if defined DEFUSE_ANIMATION_START 
public Event_BombDefusing()
{
	if(pev(g_iBomb, pev_sequence)) return
	if(++g_iSequence == 4) g_iSequence = 1
	set_pev(g_iBomb, pev_frame, 0.0)
	set_pev(g_iBomb, pev_animtime, get_gametime())
	set_pev(g_iBomb, pev_sequence, g_iSequence)
}
#endif

bool:get_pdata_boolc(ent, charbased_offset, intbase_linuxdiff = 5) return !!( get_pdata_int(ent, charbased_offset / 4, intbase_linuxdiff) & (0xFF<<((charbased_offset % 4) * 8)) )
public Event_BombPlanted() 
{
	g_iBomb = FM_NULLENT
	while((g_iBomb = engfunc(EngFunc_FindEntityByString, g_iBomb, "classname", "grenade")))
	{
		if(pev_valid(g_iBomb) && get_pdata_boolc(g_iBomb, m_bIsC4))
		{
			Setup_Bomb()
			return
		}
	} 
}

Setup_Bomb()
{
	engfunc(EngFunc_SetModel, g_iBomb, EROTIC_BOMB_W)
	#if !defined DEFUSE_ANIMATION_START
	if(++g_iSequence == 4) g_iSequence = 1
	set_pev(g_iBomb, pev_sequence, g_iSequence)
	#endif
	set_pev(g_iBomb, pev_frame, 0.0)
	set_pev(g_iBomb, pev_animtime, get_gametime())
	set_pev(g_iBomb, pev_framerate, 1.0)
	set_pdata_float(g_iBomb, m_flNextBlink, get_gametime() + 9999.9)
	#if !defined BEEP_SOUND
	set_pdata_float(g_iBomb, m_flNextBeep, get_gametime() + 9999.9)
	#endif
	#if defined CUSTOM_SOUND
	emit_sound(g_iBomb, CHAN_STATIC, CUSTOM_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
	#endif
}

public plugin_precache()
{
	engfunc(EngFunc_PrecacheModel, EROTIC_BOMB_W)
	#if defined CUSTOM_SOUND
	engfunc(EngFunc_PrecacheSound, CUSTOM_SOUND)
	#endif
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	#if defined CUSTOM_SOUND
	register_logevent("Stop_BombSound", 2, "1=Round_End")
	register_event("HLTV", "Stop_BombSound", "a", "1=0", "2=0")
	#endif
	#if defined DEFUSE_ANIMATION_START
	register_event("BarTime", "Event_BombDefusing", "be", "1=5", "1=10") 
	#endif
	register_logevent("Event_BombPlanted", 3, "2=Planted_The_Bomb")
}

#if defined CUSTOM_SOUND
public Stop_BombSound() 
{
	if(g_iBomb)
	{
		emit_sound(g_iBomb, CHAN_STATIC, CUSTOM_SOUND, VOL_NORM, ATTN_NORM, SND_STOP, PITCH_NORM)
		g_iBomb = 0
	}
}
#endif
golfu59 is offline
golfu59
New Member
Join Date: Jan 2020
Old 01-15-2020 , 02:04   Re: request to modify erotic_bomb plugin
Reply With Quote #2

up!
golfu59 is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 01-15-2020 , 03:33   Re: request to modify erotic_bomb plugin
Reply With Quote #3

Read this
__________________

Mordekay is offline
Adriana
New Member
Join Date: Jan 2020
Old 01-30-2020 , 02:03   Re: request to modify erotic_bomb plugin
Reply With Quote #4

Hi ! Can't find a solution?
I am also interested in this plugin, I wish you a wonderful day.
We are waiting for an answer from someone skilled.
Adriana is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-31-2020 , 01:24   Re: request to modify erotic_bomb plugin
Reply With Quote #5

Code:
//  register_logevent("Event_BombPlanted", 3, "2=Planted_The_Bomb")     register_event("BarTime", "Event_BombPlanted", "be", "1=3")
__________________
DJEarthQuake 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:54.


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