• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help zoom on a sniper rifle
#1
Need code for the 2x zoom zoom like in CoD mw3
  Reply
#2
l2search.
http://www.itsmods.com/forum/Thread-Rele...Scope.html
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#3
(04-06-2013, 12:03)SailorMoon Wrote: l2search.
http://www.itsmods.com/forum/Thread-Rele...Scope.html

Code:
VariableZoom()
{
    self endon("death");
    self endon("disconnect");
    if(isdefined(self.zoomtext))
        self.zoomtext destroy();
    self.zoom = 60;
    originalzoom = getDvarInt("cg_fovmin");
    while(1)
    {
        if(self ADSButtonPressed() && WeaponClass(self getCurrentWeapon()) == "sniper")
        {
            if(!isdefined(self.zoomtext))
            {
                self.zoomtext = self createfontstring("default",1.3,self);
                self.zoomtext setpoint("","",0,-195);
                self.zoomtext settext("Press [{+activate}] to increase zoom and Press [{+frag}] to reduce zoom");
                self.zoomtext.color = (1,1,1);
                self.zoomtext.sort = 15;
                self.zoomtext.alpha = 1;
                self.zoomtext.foreground = true;
                self.zoomtext.glowcolor = (0,1,0);
                self.zoomtext.glowalpha = 1;
                self.zoomtext setparent(level.uiParent);
                self.zoomtext.hideWhenInMenu = false;
                self.zoomtext.archived = false;
            }
            if(self UseButtonPressed())
                self.zoom --;
            if(self FragButtonPressed())
                self.zoom ++;
            if(self.zoom > 60)
                self.zoom = 60;
            self setClientDvar("cg_fovmin",self.zoom);
        }
        else
        {
            self.zoomtext destroy();
            self setClientDvar("cg_fovmin",originalzoom);    
        }            
    wait 0.05;
    }
}

how to replace the {+frag} on the {MWHEELDOWN}???
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to make superjump mod TDM sniper hipperz 4 1,583 03-28-2013, 15:09
Last Post: hillbilly
  Sniper rifles bullet's spread & Preventing joining to a team lammv 11 2,578 03-15-2013, 12:53
Last Post: lammv
  Preview Sniper Zoom and Mad vending machines Yamato 18 4,801 03-13-2013, 21:50
Last Post: Nukem
  [Release] Sniper Mod Yamato 25 16,630 09-03-2012, 17:43
Last Post: alvarogt95
Wink [Release] skata's sniper mod 2.0 skata3000 11 7,485 08-11-2012, 02:59
Last Post: mrhulkfan7
  Preview Mw3 only sniper lobby hussi 3 2,737 07-21-2012, 23:16
Last Post: hussi
  for sniper mode kpoviv 1 1,109 07-19-2012, 09:31
Last Post: kokole
  New DLC Available - Sniper Elite V2 Steam 0 1,274 06-22-2012, 12:48
Last Post: Steam
  [Release] Sniper Elite V2 +7 TRAiNER=iNVOKE/DVT iNVOKE 5 3,311 05-14-2012, 19:18
Last Post: iNVOKE
  Help Any Sniper only plugins jamie2009123 5 2,295 05-07-2012, 17:18
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread: 1 Guest(s)