Home   Help Search Login Register  

Author Topic: Binocs cpp  (Read 1477 times)

0 Members and 1 Guest are viewing this topic.

NZ-PsychoKiwi

  • Guest
Binocs cpp
« 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

registered_fugitiv

  • Guest
Re:Binocs cpp
« Reply #1 on: 06 Dec 2002, 04:58:16 »
um well i dunno if this will work but just put this under cfgwepons section of the config
weaponType = WeaponSlotBinocular


NZ-PsychoKiwi

  • Guest
Re:Binocs cpp
« Reply #2 on: 06 Dec 2002, 22:16:26 »
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

registered_fugitiv

  • Guest
Re:Binocs cpp
« Reply #3 on: 07 Dec 2002, 02:06:25 »
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?

SFG

  • Guest
Re:Binocs cpp
« Reply #4 on: 07 Dec 2002, 05:43:12 »
You cant change the binocular or NVGoggles if I remember right. There hardcoded in the game. Sorry  :-\

NZ-PsychoKiwi

  • Guest
Re:Binocs cpp
« Reply #5 on: 08 Dec 2002, 22:21:45 »
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

registered_fugitiv

  • Guest
Re:Binocs cpp
« Reply #6 on: 08 Dec 2002, 23:46:30 »
oh ok im from rotorua
to bad it didnt work because some new binoculars would be nice