Jump to content
Astley

Kill Feed

Recommended Posts

How would i make a kill feed that i could have in game and in the logs?

Player Killed Player at 10m with Weapon

 

not any good at coding but i am at copy and paste if anybody can help me out

Share this post


Link to post
Share on other sites

Someones already posted a working one, Dig through the forums a bit and find it..

Share this post


Link to post
Share on other sites

unless i found the wrong one it not been answered, i don't want to use cftools i want to add it into the server files

unless you saw a better post please link it

Share this post


Link to post
Share on other sites

So far, that specific code is being kept close to the chest of the creators. There are only a select handful of servers who have it, and I believe they are riding out the time a little bit before releasing, as it is a feature that helps drive users to their servers.

 

Your best bet, is to do what they did. Spend hours going through the files and figuring it out.

Share this post


Link to post
Share on other sites

i'm in there already asking them how already, guess i have to wait a while

Share this post


Link to post
Share on other sites

Extract scipts.pbo and place the files in a directory named "scripts" in the server root.

Then follow the instruction from the tread i've quotet.
Playerbase.c is locatet in scripts\4_World\Entities\ManBase
Survivorbase is in scripts\4_World\Entities\ManBase\PlayerBase

Thats all

 

Share this post


Link to post
Share on other sites

Nobody understands these funny instructions from zalexki.
Could not someone please post a manual, which one also understands.

Share this post


Link to post
Share on other sites

Just do what he say...

Insert this in SurvivorBase.c

private string PlayerIdentityName = "empty";

string GetPlayerIdentityName()
{
    return this.PlayerIdentityName;
}

void SetPlayerIdentityName(string name)
{
    this.PlayerIdentityName = name;
}

Insert this in PlayerBase.c (search forr eekilled for the right position)

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?");
}

and this too (search for onconnect for right position)

SurvivorBase sb = this;
sb.SetPlayerIdentityName(this.GetIdentity().GetName());

That's it

Edited by ZombieCooKie
  • Like 2

Share this post


Link to post
Share on other sites

Thank you, works great.
Is there a possibility to give the players their steam name or something similar?
If people do not give a name to the game in their startup option, call it Survivor or Survivor 1, and so on.

Share this post


Link to post
Share on other sites
On 21/10/2018 at 12:06 AM, ZombieCooKie said:

 

Thanks! How would you display just “playerName was killed”, as displayed in the original mod? 

Share this post


Link to post
Share on other sites
9 minutes ago, Fester808 said:

Thanks! How would you display just “playerName was killed”, as displayed in the original mod? 

GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By " + manKiller.GetIdentity().GetName());

GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " was killed " );

Not tested!

Share this post


Link to post
Share on other sites
On 20-10-2018 at 4:19 PM, ulli_123 said:

Thank you, works great.
Is there a possibility to give the players their steam name or something similar?
If people do not give a name to the game in their startup option, call it Survivor or Survivor 1, and so on.

I Guess you can try this...

SurvivorBase sbKilled = this;
 
if (killer.IsMan()) {
	Man manKiller = Man.Cast(killer);
	switch(killer.GetIdentity().GetPlainId()) {
		// Admin Sasaa
		case "76561198015080948":
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By Admin SaSaa");
		break;
		
		// Normal players
		default:
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By " + manKiller.GetIdentity().GetName());
		break;
	}
} else {
    GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed by zombie/bleedout/fall?");
}


Untested!!!
 

Edited by kaspar rave
Found error in code

Share this post


Link to post
Share on other sites

I'm at work so it didn't test it yet but

this should give the distance to

if (killer.IsMan()) {
	Man manKiller = Man.Cast(killer);
	float distance = vector.Distance(manKiller.GetPosition(),sbKilled.GetPosition());
	switch(player.GetIdentity().GetPlainId()) {
		// Admin Sasaa
		case "76561198015080948": // steam64_id
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By Admin SaSaa from " + distance );
		break;
		
		// Admin Mister X
		case "xxxxxxxxxxxxxxxxx": // steam64_id
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By player X from " + distance );
		break;
		
		// Normal players
		default:
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By " + manKiller.GetIdentity().GetName() + " from " + distance );
		break;
	}
} else {
    GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed by zombie/bleedout/fall?");
}

 

Share this post


Link to post
Share on other sites

so is there  a fully working kill feed i can use please where would i add it and dose it work :D

Share this post


Link to post
Share on other sites
On 20/10/2018 at 1:42 PM, ulli_123 said:

Nobody understands these funny instructions from zalexki.
Could not someone please post a manual, which one also understands.

having same issues how do i add this as in playerbase.c it just errors up with that step

Share this post


Link to post
Share on other sites

hi i like to add death messages in my server. if you can give me the exactly script and where i can make it and place it.and i like to change color of messages how i can do that thx .

Share this post


Link to post
Share on other sites
On 30.10.2018 at 1:27 PM, Mostabdel said:

hi i like to add death messages in my server. if you can give me the exactly script and where i can make it and place it.and i like to change color of messages how i can do that thx .

It's explained all above

Share this post


Link to post
Share on other sites

how i can change the color of the message and adedd distance and weapon pls thx 

give me script for this thx 

Share this post


Link to post
Share on other sites
On 2-11-2018 at 11:44 PM, Mostabdel said:

how i can change the color of the message and adedd distance and weapon pls thx 

give me script for this thx 

As I stated before use this

if (killer.IsMan()) {
	Man manKiller = Man.Cast(killer);
	float distance = vector.Distance(manKiller.GetPosition(),sbKilled.GetPosition());
	switch(player.GetIdentity().GetPlainId()) {
		// just to make sure my name is correct and not surviver X
        // Admin sasaa
		case "76561198015080948": // steam64_id
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By [Owner/Admin] SaSaa from " + distance + " meter");
		break;
		
		// Normal players
		default:
			GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed By " + manKiller.GetIdentity().GetName() + " from " + distance+" meter" );
		break;
	}
} else {
    GetGame().ChatPlayer( 0, sbKilled.GetPlayerIdentityName() + " Killed by zombie/bleedout/fall?");
}

works on my server.

It's all stated above in this post
I just edited the code to sort out all admin trough there steam id's.
I also changed onconnect and ondisconnect to display when a player joins/leaves

Share this post


Link to post
Share on other sites

and whene i make make this scripts 

show me all the steps pls to have deathmessages in color thx

Share this post


Link to post
Share on other sites

give me the code of color pls.

its for PHP or HTML.

 

Share this post


Link to post
Share on other sites

and now we dont see the PBO Scripts its dont work or what ?

in file Addons in dayz 

Share this post


Link to post
Share on other sites

first off use the edit option, second its C language.

and as far as I know there is no color option.

Also for the 4th time all the steps are metioned above

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×