OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: NZ-PsychoKiwi on 06 Dec 2002, 00:15:22
-
Ok hope i am doing this in the right area :-\
Just wanted to know if anyone knows how to get a custom binocs in to ofp, using a new model, i have used the stuff out of the cfgweapons.hpp for the binoculars, but i have had no luck in getting them to use the binoc slot.
Any help or cpp example will help ;D
-
um well i dunno if this will work but just put this under cfgwepons section of the config
weaponType = WeaponSlotBinocular
-
I already have that in the cpp, but thanks for your reply ;D
Here is the cpp code -
-----------------------------------------------------
#define WeaponSlotItem 256
#define WeaponSlotBinocular 4096
class CfgPatches
{
class NZPKOBSoldier
{
units[] = {NZPKOBSoldier};
weapons[] = {};
requiredVersion = 1.10;
};
};
class CfgWeapons
{
class default {};
class NZPKOFBinocs : Default
{
scopeWeapon = public;
scopeMagazine = protected;
model="\NZPK_OFBinocs\OFBinocs.p3d";
modelOptics="optika_dalekohled";
weaponType = WeaponSlotBinocular;
magazineType = WeaponSlotItem;
ammo=; // no ammo
displayName = "NZPK Binoculars";
reloadTime=0.0;
sound[]={,0,1};
canLock=LockNo;
optics = true;
forceOptics = true;
primary = false;
opticsZoomMin=0.085;
opticsZoomMax=0.085;
magazines[] = {};
};
};
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierWB:Soldier{};
class OfficerW : SoldierWB {};
class NZPKOBSoldier: OfficerW
{
picture=igrenadier;
vehicleClass="Men";
displayName="Officer (Binoculars) ";
scope=2;
model="mc vojakwo2.p3d";
nightVision=true;
weapons[]={"M16","Throw","Put","NZPKOFBinocs"};
magazines[]={"M16","M16","M16","M16","HandGrenade", "HandGrenade", "HandGrenade", "HandGrenade",
"SmokeShell", "SmokeShell"};
};
};
-----------------------------------------------------
Maybe i have got something wrong in it :-\ So if anybody has a solution to this it would be grateful
-
dam im pretty much stumped
but iv got sum thing u could try
class CfgPatches
{
class NZPKOBSoldier
{
units[] = {NZPKOBSoldier};
weapons[] = {NZPKOFBinocs};
requiredVersion = 1.10;
};
};
sum times u gotta have the name of the item
if it dosnt work sorry im not that good wit configs specialy 1s like this
but where bouts in NZ u from?
-
You cant change the binocular or NVGoggles if I remember right. There hardcoded in the game. Sorry :-\
-
registered_fugitiv, thanks i put that in to it, but still no go.
Im at the bottom of the south island just before u go in to bluff.
SFG, u might be right, it is a shame though, looks like one model that won't see the light of ofp
Thanks guys for your help ;D
-
oh ok im from rotorua
to bad it didnt work because some new binoculars would be nice