Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 67 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
Red Dot Crosshair
Versions: You must be logged in to view history.
Red dot crosshair Tut by [SSg]Titan*BK*

This Tutorial will show you how to have a red dot crosshair in game.

this works with the other crosshair's on but i would turn them off in game.

this has very little scripting.

1.open your map .gsc

go to main()
{

}


at the end of the coding in that section you will put.


player = getplayers();
  for(i=0; i < player.size; i++)
  {
    player[i] thread crosshair();
  }



so your script would look like this.


main()
{
    maps\_destructible_opel_blitz::init();
    precacheshellshock("electrocution");
    
    maps\_zombiemode_weapons::add_zombie_weapon( "mine_bouncing_betty",&"ZOMBIE_WEAPON_SATCHEL_2000", 2000 );
    maps\_zombiemode_weapons::add_zombie_weapon( "thompson_bigammo_mp",&"ZOMBIE_WEAPON_THOMPSON_BIGAMMO", 500 );
    maps\_zombiemode_weapons::add_zombie_weapon( "mp40_aperture_mp",&"ZOMBIE_WEAPON_MP40_APERTURE", 200 );

    precachemodel("tag_origin");
    precachemodel("zombie_zapper_power_box");
    precachemodel("zombie_zapper_power_box_on");
    precachemodel("zombie_zapper_cagelight_red");
    precachemodel("zombie_zapper_cagelight_green");
    
    level.valve_hint_north = (&"ZOMBIE_BUTTON_NORTH_FLAMES");
    level.valve_hint_south = (&"ZOMBIE_BUTTON_NORTH_FLAMES");
    
    precachestring(level.valve_hint_north);
    precachestring(level.valve_hint_south);    
    precachestring(&"ZOMBIE_BETTY_ALREADY_PURCHASED");
    precachestring(&"ZOMBIE_BETTY_HOWTO");
    precachestring(&"ZOMBIE_FLAMES_UNAVAILABLE");
    precachestring(&"ZOMBIE_USE_AUTO_TURRET");
    precachestring(&"ZOMBIE_ELECTRIC_SWITCH");
    precachestring(&"MILITARY2_TITLE");
    precachestring(&"MILITARY2_PLACE");
    precachestring(&"MILITARY2_DATE");
    
    include_weapons();
    include_powerups();        
    maps\nazi_zombie_military2_fx::main();    
    
    //init the perk machines
    maps\_zombiemode_perks::init();
    maps\_zombiemode::main();        
    level.burning_zombies = [];
    level.electrocuted_zombies = [];
    
    init_sounds();
    
    //the electric switch in the control room
    level thread master_electric_switch();
    
    //keeps track of the buyable doors surroundong the control room
    level thread watch_magic_doors();
    
    //special spawn point logic for the map
    level thread spawn_point_override();
    
    //zombie asylum custom stuff
    init_nazi_zombie_ver_ex();    
    
    level thread intro_screen();
    level thread toilet_useage();
    level thread chair_useage();
    //level thread magic_box_light();
 
    player = getplayers();
      for(i=0; i < player.size; i++)
      {
        player[i] thread crosshair();
  }
}


Just a note this one is for Zombies.
you may or may not have the same script as in this tut this is just an ex.

this is used to change the color to get a color just use radiant and hit k and chose a color.
        color = (0,0,1);


thanks Demonseed for this code.
this will give you a dvar to turn it on and off
also turn it off when you use sights.

 

crosshair()
{
   self thread laserDotAds();
   self setClientDvar( "g_redCrosshairs", 0 );

    while(1)
    {
      
        wait 1;
      
        shader = "white";
        color = (0,0,1);
        wait 0.03;
      
      if( !isdefined( self.laserdot ) )
        {
         self.laserdot = newClientHudElem( self );
         self.laserdot setShader(shader,3,3);
         self.laserdot.alignX = "center";
         self.laserdot.alignY = "middle";
         self.laserdot.alpha = 1;
         self.laserdot.color = color;
         self.laserdot.hideWhenInMenu = true;
         self.laserdot.x = 320;
         self.laserdot.y = 242;
        }
    }  
}

laserDotAds()
{

      while( true )
   {
      // Wait
      wait (.05);

      if( isdefined( self.laserdot ) )
      {
         if( self playerADS() == 1 )
            self.laserdot.alpha = 0;
         else
            self.laserdot.alpha = self.laserdotalpha;
      }
   }
}


next you need to put this at th bottom of your .gsc i would say above this part.

//water sheeting FX

// plays a water on the camera effect when you pass under a waterfall
watersheet_on_trigger( )


credits:
Titan*BK*
wizzardofozz
irishstorm
zeroy
modsonline.com
customcod.com

 

need any help add me to

xfire: steeltitan5

or pm me

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»