the code virtually source is ready, but just have some basic changes.
Thank @
Yuri-BR for sharing this code, only it is already in the source.
I'll just teach to put the code in flash.
Go to Data folder
LangPack/
NameLang.lang
Search
Code:
$FR_SURVIVOR_SCREEN_CREATE_KILLED_CIVILIANS=CIVILIANS KILLED
Add
Code:
$FR_HeadShot_Ratio=HEADSHOT RATIO
$FR_KDR=KILL DEATH RATIO
$FR_ACCURACY=ACCURACY
Now, go to
FrontEnd.fla
\src\classes\warz\frontend
Open Frontend.as
Search
Code:
public function addClientSurvivor (Name:String, health:Number, xp:int, timeplayed:int,
Add final line
Code:
, kdrS:int, hsrS:int, accyS:int)
like this, don't forgot '
,' symbol
Now
Go to src\classes\warz\dataObjects
Open Survivor.as
Search and edit
Code:
public var civiliansKilled:int;
Add
Code:
public var kdrS:int;
public var hsrS:int;
public var accyS:int;
Search
Code:
public function Survivor (Name:String, health:Number, xp:int, timeplayed:int,
Change or add
Code:
kdrS:int, hsrS:int, accyS:int
Like this (don't forgot ',' symbol)
Search
Code:
this.civiliansKilled = civiliansKilled;
Add
Code:
this.kdrS = kdrS;
this.hsrS = hsrS;
this.accyS = accyS;
Now, open FrontEnd.fla and go to
_Survivors>Survivors
Right Click and EDIT
Add in TEXT
PHP Code:
KDRTitle
HeadShotTitle
AccuracyTitle
and add in RED line TEXT
Now, Open src\classes\warz\frontend
SurvivorsScreen.as
Search
Code:
Survivors.KilledCivTitle.text = "$FR_SURVIVOR_SCREEN_CREATE_KILLED_CIVILIANS";
Add
Code:
Survivors.HeadShotTitle.text = "$FR_HeadShot_Ratio";
Survivors.KDRTitle.text = "$FR_KDR";
Survivors.AccuracyTitle.text = "$FR_ACCURACY";
Search
Code:
Survivors.KilledCiv.text = "";
Add
Code:
Survivors.HeadShotTitle.text = "";
Search
Code:
Survivors.LastMap.text = survivor.lastMap;
Add
Code:
Survivors.kdrS.text = String (survivor.kdrS);
Survivors.hsrS.text = String (survivor.hsrS);
Survivors.accyS.text = String (survivor.accyS);
Publish and Test
Now in WarZ.sln
Search and uncomment
Code:
sprintf(kdrS, "%.2f", getRatio(float(slot.Stats.KilledSurvivors + slot.Stats.KilledBandits), float(slot.Stats.Deaths)));
Now, change all this func.
Code:
// Kill/Death System Code \ RaGEZONE
char kdrS[32];
sprintf(kdrS, "%.2f", getRatio(float(slot.Stats.KilledSurvivors + slot.Stats.KilledBandits), float(slot.Stats.Deaths)));
var[23].SetString(kdrS); // kdr
char hsrS[32];
sprintf(hsrS, "%.2f", getRatio(float(slot.Stats.ShotsHeadshots), float(slot.Stats.ShotsFired)));
var[24].SetString(hsrS); // hsr
char accyS[32];
sprintf(accyS, "%.2f", getRatio(float(slot.Stats.ShotsHits), float(slot.Stats.ShotsFired)*100.0f)); // accuracy
var[25].SetString(accyS); // accyS
var[26].SetInt(slot.Stats.Deaths); // died*/
in
23 change to
26
Code:
gfxMovie.Invoke("_root.api.addClientSurvivor", var, 23);
Build and test
Finish
