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


Raised This Month: $ Target: $400
 0% 

Solved [L4D2] Tank Spawn Announcement with sound (versus)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-31-2021 , 09:35   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #1

Quote:
Originally Posted by Tank Rush View Post
I am looking for a plugin that works as follows:
When the tank spawns, it announces itself in chat by making a sound
Here the sound:
sound/ui/pickup_secret01.wav
Here is the announcement of the chat:
[!]The Tank has been spawned!
I can't believe I haven't added this to Mutant Tanks yet. Thanks for the idea!

Quote:
Originally Posted by Marttt View Post
I really don't recommend using Super Tanks, the plugin is old, the author is inactive and has a lot of versions in the thread.

Try Mutant Tanks plugin.

At least the author is active, always nice and helping. Also seem to have the feature you are asking for.

Btw, if you share your SUPER TANKS plugin .sp file I can try to implement it since I don't know which file you are using. (The main post doesn't compile and Ernecio version gives me invalid gamedata)
Thank you for the kind words. I wish there was a way to advertise Mutant Tanks to everyone who still relies on Super Tanks. Even with all the more recent versions of that plugin, most of the code is still outdated. I had to rewrite 90% of the logic in MT because the old code from ST was just causing way too many bugs and random crashes. Unfortunately, that's hard to explain to users who have no knowledge/experience in programming.
__________________
Psyk0tik is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-10-2021 , 15:30   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #2

There is no translation in this plugin you just need overwrite the "text" part.
I may release it as a plugin. I had hope that in the recent L4D2 updates this issue would have already been solved.
__________________

Last edited by Marttt; 09-19-2021 at 21:13.
Marttt is offline
BlackSabbarh
Senior Member
Join Date: Sep 2018
Old 03-17-2022 , 16:47   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #3

Quote:
Originally Posted by Marttt View Post
There is no translation in this plugin you just need overwrite the "text" part.
I may release it as a plugin. I had hope that in the recent L4D2 updates this issue would have already been solved.
Hi, when I use multitank and spawn 3 or 4 tanks at the same time, the sound only plays 1 time, how could I fix it so that it sounds 1 time for each Tank?
BlackSabbarh is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-17-2022 , 17:21   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #4

Just remove the check below

PHP Code:
    if (g_bAliveTank)
        return; 
__________________
Marttt is offline
BlackSabbarh
Senior Member
Join Date: Sep 2018
Old 03-27-2022 , 19:51   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
Just remove the check below

PHP Code:
    if (g_bAliveTank)
        return; 

Thanks
BlackSabbarh is offline
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 01-30-2021 , 09:49   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #6

Quote:
Originally Posted by Marttt View Post
Try this.
Sorry to bother you Marttt, but this keeps failing. The ad appears in the first, second and third waves for survivors, I have tested it playing only with bots; but when there is a player on the infected team the ad only appears for the first tank on both teams.
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382
Tank Rush is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-30-2021 , 11:39   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #7

Quote:
Originally Posted by Marttt View Post
Try this.
Try HookEvent "entity_killed"

PHP Code:
HookEvent("entity_killed",        PD_ev_EntityKilled);

public 
Action PD_ev_EntityKilled(Event event, const char[] namebool dontBroadcast)
{
    if (
g_bIsTankAlive && IsPlayerTank(event.GetInt("entindex_killed")))
    {
        
CreateTimer(1.5FindAnyTank_TIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action FindAnyTank(Handle timerany client)
{
    if(!
IsTankInGame()){
        
g_bIsTankAlive false;
    }
}

void IsTankInGame(exclude 0)
{
    for (
int i 1<= MaxClientsi++)
        if (
exclude != && IsClientInGame(i) && GetClientTeam(i) == && IsPlayerTank(i) && IsPlayerAlive(i) && !IsIncapacitated(i))
            return 
i;

    return 
0;

__________________

Last edited by HarryPotter; 01-30-2021 at 11:42.
HarryPotter is offline
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 01-30-2021 , 13:18   Re: [L4D2] Tank Spawn Announcement with sound (versus)
Reply With Quote #8

Quote:
Originally Posted by HarryPotter View Post
Try HookEvent "entity_killed"

PHP Code:
HookEvent("entity_killed",        PD_ev_EntityKilled);

public 
Action PD_ev_EntityKilled(Event event, const char[] namebool dontBroadcast)
{
    if (
g_bIsTankAlive && IsPlayerTank(event.GetInt("entindex_killed")))
    {
        
CreateTimer(1.5FindAnyTank_TIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action FindAnyTank(Handle timerany client)
{
    if(!
IsTankInGame()){
        
g_bIsTankAlive false;
    }
}

void IsTankInGame(exclude 0)
{
    for (
int i 1<= MaxClientsi++)
        if (
exclude != && IsClientInGame(i) && GetClientTeam(i) == && IsPlayerTank(i) && IsPlayerAlive(i) && !IsIncapacitated(i))
            return 
i;

    return 
0;

I'm sorry, I don't know how to do it
you can help?
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382
Tank Rush 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 16:08.


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