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

[L4D & L4D2] Mutant Tanks (v9.1, 3-20-2024)


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-15-2018 , 17:33   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #411

https://forums.alliedmods.net/showthread.php?t=311624

Code:
#define SOUND_HEARTBEAT	 "player/heartbeatloop.wav"

public event_heal_success(Handle:event, const String:name[], bool:dontBroadcast)
{
	if (g_iGameMode==GAMEMODE_VERSUS) return;
	new client = GetClientOfUserId(GetEventInt(event,"subject"));

	if (client <= 0 || client > MaxClients) return;
	
	//disable black and white:
	SetEntProp(client, Prop_Send, "m_currentReviveCount", 0);
	SetEntProp(client, Prop_Send, "m_isGoingToDie", 0);
	
	//stop heartbeat:
	StopSound(client, SNDCHAN_AUTO, SOUND_HEARTBEAT);
}
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-15-2018 , 20:19   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #412

Quote:
Originally Posted by Dragokas View Post
https://forums.alliedmods.net/showthread.php?t=311624

Code:
#define SOUND_HEARTBEAT	 "player/heartbeatloop.wav"

public event_heal_success(Handle:event, const String:name[], bool:dontBroadcast)
{
	if (g_iGameMode==GAMEMODE_VERSUS) return;
	new client = GetClientOfUserId(GetEventInt(event,"subject"));

	if (client <= 0 || client > MaxClients) return;
	
	//disable black and white:
	SetEntProp(client, Prop_Send, "m_currentReviveCount", 0);
	SetEntProp(client, Prop_Send, "m_isGoingToDie", 0);
	
	//stop heartbeat:
	StopSound(client, SNDCHAN_AUTO, SOUND_HEARTBEAT);
}
Thanks, I'll include that. Now if only I could figure out the filename of that wind sound, so I can stop it whenever a Tank dies (that's usually when it starts playing for me).
__________________
Psyk0tik is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-16-2018 , 08:50   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #413

I managed to found sound path and possible reason, but I was unsuccessful in attempt to fix it without using hook.

Your culprit is:
Code:
#define SOUND_THROWN_MISSILE 		"player/tank/attack/thrown_missile_loop_1.wav"
I didn't touch your plugin. Instead I cracked panxiaohai's.
When he destroys rock's entity, game engine does not stop automatically the sound of rock thrown.
Code:
RemoveEdict(ent);
Interception show:
Quote:
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] player/tank/attack/thrown_missile_loop_1.wav
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 0, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 1, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 2, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 3, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 4, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 5, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 6, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 7, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
L 12/16/2018 - 16:16:11: [l4d_tankhelper_hook.smx] numClients: 5, entity: 1, channel: 135, volume: 0.000000, level: 0, pitch: 100, flags: 4, soundEntry: , seed: 0
I tried:

PHP Code:
public Action:Timer_StopSoundDelayed(Handle:timerany:thetank)
{

    
// method 1
    // not work
    
    
for (int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i)) //&& GetClientTeam(i) == 2)
        
{
            for (
int channel 0channel <= 7channel++)
            {
                
StopSound(ichannelSOUND_THROWN_MISSILE);
            }
            
StopSound(iSNDCHAN_USER_BASESOUND_THROWN_MISSILE); // 135
        
}
    }
    
    
// method 2
    // not work
    //EmitSoundToAll(SOUND_THROWN_MISSILE, _, _, _, SND_STOPLOOPING, _, _, _, _, _, _, _); 

as well as a delay (3 sec.) before stop, but without success.

As expected, sound blocked ok using:
Code:
public Action OnNormalSoundPlay(int clients[MAXPLAYERS], int &numClients,
		char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level,
		int &pitch, int &flags, char soundEntry[PLATFORM_MAX_PATH], int &seed)
{
	if (StrEqual(sample, SOUND_THROWN_MISSILE, false)) {
		numClients = 0;
		return Plugin_Changed;
	}
	return Plugin_Continue;
}
If you want to continue experiment, here is a plugin with those several methods.
As for me, I prefer to block that sound forever, if another methods will be unsuccess.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_tankhelper_hook.sp - 367 views - 11.9 KB)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-16-2018 , 11:12   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #414

Server L4d1 display error:

Quote:
[ST++] Your "CTerrorPlayer_OnStaggered" signature is outdated.
I used gamedata from your last release.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-16-2018 , 16:41   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #415

Quote:
Originally Posted by Dragokas View Post
Server L4d1 display error:

I used gamedata from your last release.
Just to make sure, that's Windows right?

Also, I'll use that soundhook method. Seems to be the most reliable method so far. Thanks.
__________________
Psyk0tik is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-16-2018 , 17:47   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #416

It's Linux here.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-17-2018 , 05:16   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #417

Quote:
Originally Posted by Dragokas View Post
It's Linux here.
The latest L4D1 binaries still use the same sig for Linux. The problem seems to be on your end.
__________________
Psyk0tik is offline
edwinvega86
Senior Member
Join Date: Feb 2016
Old 12-18-2018 , 06:51   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #418

excuse me and if I wanted them to generate 2 tank instead of one in all the maps what is the configuration?

"Regular Wave" "2"
"Finale Waves" "2,2,2"
edwinvega86 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-19-2018 , 05:15   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #419

Quote:
Originally Posted by edwinvega86 View Post
excuse me and if I wanted them to generate 2 tank instead of one in all the maps what is the configuration?

"Regular Wave" "2"
"Finale Waves" "2,2,2"
The "Regular Wave" setting only accepts 0 and 1 as values. It enables/disables a timer that spawns X number of Tanks every X second(s). The "Finale Waves" setting determines how many Tanks are spawned during each wave in finales. X,Y,Z with X being for 1st wave, Y being for 2nd wave, and Z being for 3rd wave.

If you're looking for a plugin that controls how many Tanks can spawn throughout each map, you'll have to look elsewhere.
__________________
Psyk0tik is offline
3aljiyavslgazana
Member
Join Date: Dec 2018
Old 12-19-2018 , 18:30   Re: [L4D & L4D2] Super Tanks++ (v8.49, 12-06-2018)
Reply With Quote #420

works lovely on l4d2 maps but in l4d1 maps final tanks cant apear more than 1 tank per wave
3aljiyavslgazana 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 07:37.


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