Andris01 0 Posted February 24, 2019 I missed something or wrong coding idk. Can u check my files. I using pbo manager for extrancting the script. So this is my SurvivorBase.c ; class SurvivorBase extends PlayerBaseClient { private string PlayerIdentityName = "empty"; string GetPlayerIdentityName() { return this.PlayerIdentityName; } void SetPlayerIdentityName(string name) { this.PlayerIdentityName = name; } } This is PlayerBase.c "eekilled" part ; override void EEKilled( Object killer ) { SurvivorBase sbKilled = this; if (killer.IsMan()) { Man manKiller = Man.Cast(killer); GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By " + manKiller.GetIdentity().GetName()); } else { GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed by zombie/bleedout/fall?"); } Print("EEKilled, you have died"); if ( m_AdminLog ) { m_AdminLog.PlayerKilled( this, killer ); } if( GetBleedingManagerServer() ) delete GetBleedingManagerServer(); // kill character in database if (GetHive()) { GetHive().CharacterKill(this); } // disable voice communication GetGame().EnableVoN(this, false); GetSymptomManager().OnPlayerKilled(); //! log melee kill in case of melee - older logging //LogMeleeKill(); super.EEKilled( killer ); } override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos) { super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos); if ( m_AdminLog ) { m_AdminLog.PlayerHitBy( this, source, dmgZone, ammo ); } //! melee specific stuff if (damageType == 0) { //! save melee source for further processing (eg. ADM log) m_MeleeLastHitTime = GetGame().GetTime(); m_MeleeSource = source; } /*Print("damage player = " + damageResult.GetDamage(dmgZone, "Health")); if (dmgZone == "") Print("NO DAMAGE ZONE HIT");*/ if( damageResult != null && damageResult.GetDamage(dmgZone, "Shock") > 0) { m_LastShockHitTime = GetGame().GetTime(); } //DamagePlayer(damageResult, source, modelPos, ammo); //new bleeding computation //--------------------------------------- if ( damageResult != null && GetBleedingManagerServer() ) { float dmg = damageResult.GetDamage(dmgZone, "Blood"); GetBleedingManagerServer().ProcessHit(dmg, source, component, dmgZone, ammo, modelPos); } //--------------------------------------- End the "onconnect" part; void OnConnect() { SurvivorBase sb = this; sb.SetPlayerIdentityName(this.GetIdentity().GetName()); Debug.Log("Player connected:"+this.ToString(),"Connect"); // NEW STATS API StatRegister("playtime"); StatRegister("dist"); m_PlayerOldPos = GetPosition(); if( m_AnalyticsTimer ) m_AnalyticsTimer.Run( 60, this, "UpdatePlayerMeasures", null, true ); } I just need a simple kill feed for a clear vision to keep server rules in place. (PVE server) Share this post Link to post Share on other sites
MrSisterFister 4 Posted February 25, 2019 Here's mine that i made. includes random death messages for different kills and a player Kill Streak. Here is my SurvivorBase.c class SurvivorBase extends PlayerBaseClient { private string PlayerIdentityName = "empty"; string GetPlayerIdentityName() { return this.PlayerIdentityName; } void SetPlayerIdentityName(string name) { this.PlayerIdentityName = name; } } Now for the PlayerBase.c // kill/death messages ref TStringArray killmessages; ref TStringArray deathmessages; ref TStringArray suicidemessages; // kill count int KillCount; void PlayerBase() { Init(); } void InitializeMessages() { // kill messages killmessages.Insert("was killed by"); killmessages.Insert("was murdered by"); killmessages.Insert("was nullified by"); killmessages.Insert("was destroyed by"); killmessages.Insert("was shat on by"); killmessages.Insert("was ended by"); killmessages.Insert("was raped by"); killmessages.Insert("was pumped by"); killmessages.Insert("got pooped on by"); killmessages.Insert("got peed on by"); killmessages.Insert("got wasted by"); killmessages.Insert("got fucked up by"); killmessages.Insert("got blasted by"); killmessages.Insert("got molested by"); killmessages.Insert("got kicked in the dunger by"); killmessages.Insert("had their ass fucked by"); killmessages.Insert("had their dick removed by"); killmessages.Insert("had their dick blasted by"); killmessages.Insert("had their pussy blown by"); killmessages.Insert("had their pussy blasted by"); killmessages.Insert("had their pee pee blasted off by"); killmessages.Insert("sadly learned about"); killmessages.Insert("sooked bum hole tears from"); killmessages.Insert("was left in a wheelbarrow by"); // death messages deathmessages.Insert("died like a noober"); deathmessages.Insert("died like a fag"); deathmessages.Insert("died sucking themself off"); deathmessages.Insert("died sniffing their ass"); deathmessages.Insert("died poking their mum"); deathmessages.Insert("died having a pokey bum wank"); deathmessages.Insert("died from dysentery"); deathmessages.Insert("died from natural causes"); // suicide messages suicidemessages.Insert("killed themself"); suicidemessages.Insert("commited suicide"); suicidemessages.Insert("took the easy way out"); suicidemessages.Insert("had enough of life"); suicidemessages.Insert("didnt know the number for the Samaritans"); //Rebecca White's Phrase suicidemessages.Insert("failed at counselling"); suicidemessages.Insert("cheated the doctor out of a job"); suicidemessages.Insert("fingered their ass to death"); suicidemessages.Insert("sooked their own turd to death"); } inside void Init() // create all messages killmessages = new TStringArray; deathmessages = new TStringArray; suicidemessages = new TStringArray; InitializeMessages(); KillCount = 0; Further down the file. override void EEKilled( Object killer ) { Print("EEKilled, you have died"); SurvivorBase sbKilled = this; if (killer.IsMan()) { Man manKiller = Man.Cast(killer); if (sbKilled.GetPlayerIdentityName() == manKiller.GetIdentity().GetName()) { // suicide GetGame().ChatPlayer(0,sbKilled.GetPlayerIdentityName() + " " + suicidemessages.GetRandomElement()); } else { // kill PlayerBase playerKiller = PlayerBase.Cast(killer); playerKiller.KillCount++; string kill_count = string.ToString(playerKiller.KillCount) string kill_count_message = "(KS: " + kill_count + ")"; GetGame().ChatPlayer(0, sbKilled.GetPlayerIdentityName() + " " + killmessages.GetRandomElement() + " " + manKiller.GetIdentity().GetName() + kill_count_message); } } else { // random death GetGame().ChatPlayer(0,sbKilled.GetPlayerIdentityName() + " " + deathmessages.GetRandomElement()); } Void OnConnect() void OnConnect() { Debug.Log("Player connected:"+this.ToString(),"Connect"); SurvivorBase sb = this; sb.SetPlayerIdentityName(this.GetIdentity().GetName()); // NEW STATS API StatRegister("playtime"); StatRegister("dist"); m_PlayerOldPos = GetPosition(); m_AnalyticsTimer.Run( 60, this, "UpdatePlayerMeasures", null, true ); } Hope this helps.. I am a fucked up guy so i won't apologize for my choice in kill messages... its your problem to deal with my messages. 1 Share this post Link to post Share on other sites
Andris01 0 Posted March 5, 2019 I tried on my local dayz server but it doesn't work for me unfortunately. This is the error message: "Can't compile "World" script module! scripts/4_World/entities\manbase\playerbase.c(245): Broken expression (missing ';'?)" this is (245) line in my script: suicidemessages = new TStringArray; void Init() { // create all messages killmessages = new TStringArray; deathmessages = new TStringArray; suicidemessages = new TStringArray; InitializeMessages(); KillCount = 0; //Print("PSOVIS: new player"); //PrintString( "isServer " + GetGame().IsServer().ToString() ); //PrintString( "isClient " + GetGame().IsClient().ToString() ); //PrintString( "isMultiplayer " + GetGame().IsMultiplayer().ToString() ); I'm a lama for programming. probably I messed up something... Whatever your killmessages are awesome! 🙂 Share this post Link to post Share on other sites
MrSisterFister 4 Posted March 6, 2019 PM me, i will help you out. 1 Share this post Link to post Share on other sites