Register

DonkeyPunch Community Gaming

GAME ON!!! -sTanG

News:

@)@) Rona Boogaloo is here, check out Vagrants Paradise newest server creation on DayZ SA Community Servers
Administrator
*****

DirtySanchez

January 09, 2016, 08:41:14 PM
Humanitarian Posts: 933 Humanity: +1337/-420
First I want to thank @GR8 for all his work to date.



I saw the killmsg's when it first came out here and I used to run the other guys version on the other guys mod :):P


I passed it up since I had months of usage and to me was played out. but again GR8 thanks for your work on it cause the other day odizzzzle tells me about it logging kills and deaths and that intrigued me, so I took a look at it but wasn't happy with all the extra communication, so I put it in exile itself to log the killer name, killer UID and the distance. Its basic but it does the trick and no overhead since its sending the info only from the server to the database, just as Exile intended.


I have even posted this info in the Feature Wishes section so they consider adding it to Exile.


Ok so here is the info:







In exile.ini:
Code: [Select]

[insertPlayerHistory]
SQL1_1 = INSERT INTO player_history SET account_uid = ?, name = ?, position_x = ?, position_y = ?, position_z = ?
Number Of Inputs = 5
SQL1_INPUTS = 1,2,3,4,5



BECOMES



[insertPlayerHistory]
SQL1_1 = INSERT INTO player_history SET account_uid = ?, name = ?, position_x = ?, position_y = ?, position_z = ?, killer = ?, kUID = ?, distance = ?
Number Of Inputs = 8
SQL1_INPUTS = 1,2,3,4,5,6,7,8













Create an override for ExileServer_object_player_event_onMpKilled.sqf by adding this code into your Mission side config.cpp inside the cfgCustomCode:
Code: [Select]

ExileServer_object_player_event_onMpKilled.sqf = "override\ExileServer_object_player_event_onMpKilled.sqf";










Edit your ExileServer_object_player_event_onMpKilled.sqf and save it to an override folder in your mission pbo

Code: [Select]
Add this just under _killer=_this select 1;


_kName = name _killer;
_kUID = getPlayerUID _killer;
_kDistance = floor(_victim distance _killer);


////////////////////////////////////////////
Find this line of code:


format["insertPlayerHistory:%1:%2:%3:%4:%5", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2] call ExileServer_system_database_query_fireAndForget;


CHANGE IT TO:


format["insertPlayerHistory:%1:%2:%3:%4:%5:%6:%7:%8", getPlayerUID _victim, name _victim, _victimPosition select 0, _victimPosition select 1, _victimPosition select 2, _kName, _kUID, _kDistance] call ExileServer_system_database_query_fireAndForget;










And then add the columns to your database:


Code: [Select]
ALTER TABLE `player_history`
 ADD COLUMN `killer` VARCHAR(64);
 ALTER TABLE `player_history`
 ADD COLUMN `kUID` VARCHAR(32);
 ALTER TABLE `player_history`
 ADD COLUMN `distance` INT(11);
« Last Edit: April 01, 2017, 12:10:26 AM by DirtySanchez »


Website: http://DonkeyPunch.INFO  |  Discord: https://discord.me/eXpoch  |  TeamSpeak: ts3.donkeypunch.info


 
1337-420