Very poorly written. It's also wrong because bad spacing (indentation only works for one line) and missing an else for each if past the first one if you're going to do the entire list each time.That should look like this, adds new stuff to the old equipment instead of exchanging it.
The original should work, given that CreateInventoryVeterancy works and doesn't check weight.
Code:
static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
{
if ( KFPRI.ClientVeteranSkillLevel >= 50 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.M99SniperRifle", GetCostScaling(KFPRI, class'M99Pickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 40 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.SPSniperRifle", GetCostScaling(KFPRI, class'SPSniperPickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 30 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.M14EBRBattleRifle", GetCostScaling(KFPRI, class'M14EBRPickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 20 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Crossbow", GetCostScaling(KFPRI, class'CrossbowPickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 10 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Winchester", GetCostScaling(KFPRI, class'WinchesterPickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 7 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.GoldenDualDeagle", GetCostScaling(KFPRI, class'GoldenDualDeaglePickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 6 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Dual44Magnum", GetCostScaling(KFPRI, class'Dual44MagnumPickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 5 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.DualMK23Pistol", GetCostScaling(KFPRI, class'DualMK23Pickup'));
if ( KFPRI.ClientVeteranSkillLevel >= 0 )
KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Dualies", GetCostScaling(KFPRI, class'DualiesPickup'));
}
Last edited:
Upvote
0