I just find it easier to do it that way for some reason. If I WERE to do it the other way, would it look like this?
//we need the gun add-on for this, so force it to load
%error = ForceRequiredAddOn("Weapon_Gun");
if(%error == $Error::AddOn_Disabled)
{
//A bit of a hack:
// we just forced the gun to load, but the user had it disabled
// so lets make it so they can't select it
GunItem.uiName = "";
}
if(%error == $Error::AddOn_NotFound)
{
//we don't have the gun, so we're screwed
error("ERROR: Weapon_Minishot - required add-on Weapon_Gun not found");
}
else
{
exec("./Weapon_Minishot.cs");
//we need the shotgun add-on for this, so force it to load
%error = ForceRequiredAddOn("Weapon_Shotgun");
if(%error == $Error::AddOn_Disabled)
{
//A bit of a hack:
// we just forced the shotgun to load, but the user had it disabled
// so lets make[/quote] it so they can't select it
ShotgunItem.uiName = "";
}
if(%error == $Error::AddOn_NotFound)
{
//we don't have the shotgun, so we're screwed
error("ERROR: Weapon_Minishot - required add-on Weapon_Shotgun not found");
}
else
{
exec("./Weapon_Minishot.cs");
exec('./secondserver.cs');
To just have it in there twice but replace "Gun" with the other required addon? (In this case, "Shotgun")