Hi, I have been working on this mutator, It's purpose is to change a few stats to different weapons, like Damage, clipsize and so on.
However, strange thing is it dosn't work at all online on my gameserver, but in solo it works flawlessly. I have no clue what could be wrong.
Any idea what could be wrong? Something that's missing? Something that shouldn't be there? Ofcourse, I'm a total newbie in coding so I have no idea, Benjamin has written all the code by the way and I wouldn't be even close without his help, thanks Benjamin! However the problem still stands. For some reason, it's not working online.
Here's the code:
However, strange thing is it dosn't work at all online on my gameserver, but in solo it works flawlessly. I have no clue what could be wrong.
Any idea what could be wrong? Something that's missing? Something that shouldn't be there? Ofcourse, I'm a total newbie in coding so I have no idea, Benjamin has written all the code by the way and I wouldn't be even close without his help, thanks Benjamin! However the problem still stands. For some reason, it's not working online.
Here's the code:
Code:
class MutAlteredWeaponsPack extends Mutator;
simulated function PostBeginPlay()
{
KFGameType(Level.Game).default.LoadedSkills[1] = class'MutAlteredWeaponsPack.CustomKFVetSupportSpec';
KFGameType(Level.Game).default.LoadedSkills[2] =
class'MutAlteredWeaponsPack.CustomKFVetSharpshooter';
KFGameType(Level.Game).default.LoadedSkills[3] =
class'MutAlteredWeaponsPack.CustomKFVetCommando';
KFGameType(Level.Game).default.LoadedSkills[6] =
class'MutAlteredWeaponsPack.CustomKFVetDemolitions';
KFGameType(Level.Game).default.LoadedSkills[4] =
class'MutAlteredWeaponsPack.CustomKFVetBerserker';
KFGameType(Level.Game).default.LoadedSkills[0] =
class'MutAlteredWeaponsPack.CustomKFVetFieldMedic';
KFGameType(Level.Game).default.LoadedSkills[5] =
class'MutAlteredWeaponsPack.CustomKFVetFirebug';
//M249Mut
class'M249Mut'.default.ItemName = "M249 SAW";
class'M249Pickup'.default.ItemName = "M249 SAW";
class'M249Pickup'.default.ItemShortName = "M249 SAW";
class'M249Pickup'.default.PickupMessage = "You got the M249 SAW!";
// Set timer since info probably won't be available on the client yet
SetTimer(0.1, false);
}
simulated function Timer()
{
local KFLevelRules KFLR;
local int i;
// Get KFLevelRules actor if it's available
foreach DynamicActors(class'KFLevelRules', KFLR)
break;
// If not available, try again in a second
if (KFLR == none)
{
Log("Could not find KFLevelRules");
SetTimer(1.0, false);
return;
}
// Search through shop list for original Weapons
for (i = 0; i < ArrayCount(KFLR.ItemForSale); i++)
{
if (KFLR.ItemForSale[i] == class'KFMod.AA12Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomAA12Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M99Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM99Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M4Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM4Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.SCARMK17Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomSCARMK17Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.FNFAL_ACOG_Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomFNFAL_ACOGPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.BenelliPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomBenelliPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M4203Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM4203Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M14EBRPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM14EBRPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M32Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM32Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M79Pickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM79Pickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.LAWPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomLAWPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.CrossbuzzsawPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomBuzzPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.M7A3MPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomM7A3MPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.TrenchgunPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomTrenchPickup';
}
else if (KFLR.ItemForSale[i] == class'KFMod.MP5MPickup')
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.CustomMP5MPickup';
}
}
// Find a free slot and add the M249 to it
for (i = 0; i < ArrayCount(KFLR.ItemForSale); i++)
{
if (KFLR.ItemForSale[i] == none)
{
KFLR.ItemForSale[i] = class'MutAlteredWeaponsPack.M249Pickup';
break;
}
}
// Exit mutator since it's no longer needed
Destroy();
}
defaultproperties
{
bAddToServerPackages=True
GroupName="KFAlteredWeaponsPack"
FriendlyName="Altered Weapons Pack"
Description="Includes: AA12, M249 SAW, M4, Claymore, M14EBR, M4203, SCARMK17, FNFAL, M99 & Combat Shotgun"
bAlwaysRelevant=True
RemoteRole=ROLE_SimulatedProxy
}