The error I am getting is this:
An object reference is required for the non-static field, method, or property 'Flashlight.character'
Here is the code I have
using FireCallouts.SimpleFunctions;
using Rage;
namespace FireCallouts.Equipment
{
public class Flashlight
{
private Ped character;
public Flashlight(Ped character)
{
this.character = character;
}
public static void EnableFlashlight()
{
if (Game.LocalPlayer.Character && Game.IsKeyDown(Settings.Flashlight))
{
PedsSettings ps = PedsSettings.GetDefault();
Ped ped = character;
Vector3 flashlightPos = ped.GetOffsetPosition(ped.GetPositionOffset(ped.GetBonePosition(ps.FIREFIGHTER_FLASHLIGHT_ORIGIN_BONE)) + ps.FIREFIGHTER_FLASHLIGHT_ORIGIN_OFFSET.ToVector3());
Util.DrawSpotlightWithShadow(flashlightPos, ped.GetBoneRotation(PedBoneId.Spine2).ToVector(), ps.FIREFIGHTER_FLASHLIGHT_COLOR.ToColor(), 13.25f, 9.25f, 2.0f, 20f, 20.0f);
}
}
}
}