★ Player Join/Leave Announcer ★

Search, find and discuss about Mutators!
User avatar
Que
Inhuman
Posts: 793
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

★ Player Join/Leave Announcer ★

Post by Que »

PlayerAnnouncer4 by ProAsm ,no0ne & Buggie- 2020/22
--------------------------------------------------------------------

Mutator Start
?Mutator=PlayerAnnouncer4.Announce

PlayerAnnouncer requires a Serverpackage.
ServerPackages=PlayerAnnouncer4

PlayerAnnouncer.ini
------------------
bEnableSounds=True - Enables PlayerAnnouncer operation.
bUseInternalSounds=True - Uses the default PlayerAnnouncer sounds.
bEnableGameEndSounds=False - Allows Join and Leave sounds at game end.
PlayerJoinSound= - Any .uax sound
PlayerLeaveSound= - Any .uax sound

Changelog:
==========
PlayerAnnouncer4.

Added message on screen for incoming/leaving players. Thanks @Buggie for helping with fixes.
You do not have the required permissions to view the files attached to this post.
Last edited by Que on Fri Sep 30, 2022 1:24 pm, edited 10 times in total.
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers
User avatar
UTPe
Masterful
Posts: 584
Joined: Sun Jul 12, 2009 7:10 pm
Personal rank: Dude
Location: Trieste, Italy

Re: ★ Player Join/Leave Announcer ★

Post by UTPe »

Thank you very much mate. I'll try it asap ! :highfive:
Personal map database: http://www.ut99maps.net

"These are the days that we will return to one day in the future only in memories." (The Midnight)
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: ★ Player Join/Leave Announcer ★

Post by esnesi »

Thanks alot, much appreciated :gj:

Iam going for botpack.click or botpack.newbeep! 8)
Can it also be set as ServerActor?

Iam interested in why the serverpackage PlayerAnnoucner is needed for default sounds.

Edit, works as serveractor! :tu:
User avatar
Que
Inhuman
Posts: 793
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: ★ Player Join/Leave Announcer ★

Post by Que »

@eanesi Afaik anything player pawn related needs to be set as Server Package.

@Utpe no worries mate ,enjoy! :)
Last edited by Que on Wed Dec 16, 2020 1:13 am, edited 1 time in total.
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: ★ Player Join/Leave Announcer ★

Post by esnesi »

Just tested without serverpackage playerannouncer with botpack.click, that works.
With a custom sound ofcourse that package needs to be listed, but i don't think a listing is needed for PlayerAnnouncer.

I assume the mutator/actor already does it's job when it's listed.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: ★ Player Join/Leave Announcer ★

Post by Chamberly »

Afaik, if you are using default files then you don't have to set it as server packages as long they are coded within these files. Unless you are using different version of the botpack file and so on then it'll be a mess.
Image
Image
Image Edit: Why does my sig not work anymore?
giresun27
Average
Posts: 42
Joined: Thu Mar 26, 2020 4:27 pm
Personal rank: 34

Re: ★ Player Join/Leave Announcer ★

Post by giresun27 »

It works fine when its 2 teams team deathmatch
but with 4 teams on team deathmatch I dont hear the incoming voice when someone joins the server I only hear mandown when they leave the server
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: ★ Player Join/Leave Announcer ★

Post by esnesi »

Had an issue last Friday.

We were playing JailBreak, and players joined and left.
Suddenly the sound i selected for joining players (botpack.click), got jammed.
So we all we were hearing was the click sound on repeat lol.

Sadly i haven't been able to reproduce this issue yet.
I do know that JailBreak depends on even teams, and will autofill with Bots if teams are not even.
Assuming it has to do something with that.

Code: Select all

bEnableSounds=True
bUseInternalSounds=False
bEnableGameEndSounds=False
PlayerJoinSound=Botpack.Click
PlayerLeaveSound=
User avatar
Chronox
Novice
Posts: 19
Joined: Sat Sep 07, 2013 5:25 am
Personal rank: Rookie Admin
Location: Colombia

Re: ★ Player Join/Leave Announcer ★

Post by Chronox »

Hi,

Just wanted to mention that you have a typo on the "readme" file, it displays:

PlayerAnnouncer requires a Serverpackage.
ServerPackage=PlayerAnnouncer <----- Missing an "s" in ServerPackages.
Image
User avatar
UTPe
Masterful
Posts: 584
Joined: Sun Jul 12, 2009 7:10 pm
Personal rank: Dude
Location: Trieste, Italy

Re: ★ Player Join/Leave Announcer ★

Post by UTPe »

Hi Que,
could it be possible to add, along with the join/leave sound, also an optional join/leave colored custom message centered on the screen ?
could the message contain, optionally, the name of the player joining/leaving game server ? thanks

I tried to edit code to support message function (just the message without the player name feature) but it did not work :ironic2:
You do not have the required permissions to view the files attached to this post.
Personal map database: http://www.ut99maps.net

"These are the days that we will return to one day in the future only in memories." (The Midnight)
User avatar
Que
Inhuman
Posts: 793
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: ★ Player Join/Leave Announcer ★

Post by Que »

Was able to show players coming into server but not leaving. Update in first post.
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: ★ Player Join/Leave Announcer ★

Post by Buggie »

It can be done from what I know.
You need make own list of user nicks together with PlayerPawn actor in one struct.
This list is array.
And later walk on it in timer.
If PlayerPawn turn to None or get flag bDeleteMe, when Name is still not empty, you show message and set name to empty value.
If this be last item in array, you decrease array size variable.
You goes for array from back for this going work good.
On each join new player via SpawnNotify you add new player to array with some placeholder name, since real name not set yet.
On timer you also check if this name is placeholder. If it is and real name loaded, then you announce join, set real name, instead of placeholder.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: ★ Player Join/Leave Announcer ★

Post by Barbie »

Too bad that the game controller class'GameInfo' does not route the logout event to the BaseMutator.
Nexgen instead is doing that; if you are running it, you can create a plugin for it. (Also CPU expensive polling via Tick() as in above Mutator is not needed.)
code of NexgenPlugin.playerLeft()

Code: Select all

/***************************************************************************************************
 *
 *  $DESCRIPTION  Called if a player has left the server.
 *  $PARAM        client  The player that has left the game.
 *  $REQUIRE      client != none
 *
 **************************************************************************************************/
function playerLeft(NexgenClient client) {
	// To implement in subclass.
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: ★ Player Join/Leave Announcer ★

Post by Buggie »

Polling once per second (Timer) for limited by size array almost not make impact on CPU. So if there used Tick it definitely need to be rewritten.
User avatar
Que
Inhuman
Posts: 793
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: ★ Player Join/Leave Announcer ★

Post by Que »

Perhaps you could implement your fixes @buggie and we release as version 3?
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers