Post: [SCRIPT] - Custom Sights
07-19-2012, 12:21 PM #1
TOM DAINTY
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Quickly typed this up and released as some people are rubbish at releasing codes. Fairly simple allows you to have custom sights when aiming down sight with your weapons. It's fully customizable, meaning you can select which sight you would like, it destroys on death to and it only creates one icon not numerous amounts, so yeah enjoy.

Note:
Thread it like this:
self thread ToggleSights();

if it's from a mod menu then like this: (depends on what base you are using)
self.funtion[0][0] = ::ToggleSights;

Precache This in the init() located in the rank.gsc:
precacheShader("rank_prestige10");

    
ToggleSights()
{
if(self.custom == false)
{
self iPrintln("Custom Sights [^2ON^7]");
thread initSight("rank_prestige10");
self.custom = true;
}
else
{
self iPrintln("Custom Sights [^1OFF^7]");
self notify("stop_sight");
self.custom = false;
}
}
initSight( Icon )
{
self endon("death");
self endon("stop_sight");
self.CS = createRectangle( "CENTER", "CENTER", 0, 0, 15, 15, undefined, Icon, 0, 0 );
for(;Winky Winky
{
if(self AdsButtonPressed())
{self.CS.alpha = .8;}
else
{self.CS.alpha = 0;}
wait .3;
}
}


You will also need these if you haven't got them already
    
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElem = newClientHudElem(self);
barElem.elemType = "bar";
barElem.width = width;
barElem.height = height;
barElem.align = align;
barElem.relative = relative;
barElem.children = [];
barElem.sort = sort;
barElem.color = color;
barElem.alpha = alpha;
barElem setShader(shader,width,height);
barElem setPoint(align,relative,x,y);
thread destroyElem(barElem);
return barElem;
}
destroyElem(elem)
{
self waittill_any("death","stop_sight");
elem destroy();
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to TOM DAINTY for this useful post:

Raul Villaman, Simple-_-Modz, WillyPopPop

The following 2 users groaned at TOM DAINTY for this awful post:

247Yamato, Newelly
07-19-2012, 03:23 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Isn't this Vaders? :confused: it's just i have the same one in my patch, except mine gives a random sight each time not just 10th all the time.

The following 2 users say thank you to IVI40A3Fusionz for this useful post:

x Elite MoDz x
07-19-2012, 03:46 PM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by C5MN
O lol i dont think its vaders version :p


My edited version of Vaders

    
CustomSights()
{
if(self.CS==0)
{
self iPrintln("Custom Sights [^2ON^7]");
self.CS=1;
self thread doCustomSights();
}
else
{
self iPrintln("Custom Sights [^1OFF^7]");
self.CS=0;
self.Sight destroy();
self notify("StopSights");
}
}
doCustomSights()
{
self endon("StopSights");
self.Sights=strTok("rank_comm1|rank_prestige1|rank_prestige2|rank_prestige3|rank_prestige4|rank_prestige5|rank_prestige6|rank_prestige7|rank_prestige8|rank_prestige9|rank_prestige10","|");
self.RandomSight=randomint(11);
self.Sight=undefined;
for(;Winky Winky
{
if(self AdsButtonPressed())
{
if(!isDefined(self.Sight))
{
wait .1;
self.Sight=createIcon(self.Sights[self.RandomSight],15,15);
self.Sight setPoint("CENTER","CENTER",0,0);
self.Sight.alpha=.7;
}
}
else if(isDefined(self.Sight))
{
self.Sight destroy();
self.Sight=undefined;
}
wait .01;
}
}


It was like one of the first things i added to my Unreleased Patch for COD4.

Hmmm seems Tom has changed some variable names since i last visited this thread, or i've looked at the wrong thread :p.

The following 2 users say thank you to IVI40A3Fusionz for this useful post:

Simple-_-Modz
07-19-2012, 03:52 PM #4
TOM DAINTY
Do a barrel roll!
Originally posted by IVI40A3Fusionz View Post
Isn't this Vaders? :confused: it's just i have the same one in my patch, except mine gives a random sight each time not just 10th all the time.


Ermm Excuse me.. I coded that this morning..

The following 3 users say thank you to TOM DAINTY for this useful post:

Raul Villaman, Simple-_-Modz
07-19-2012, 03:53 PM #5
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Blazing247 View Post
Ermm Excuse me.. I coded that this morning..


Woah not saying it's not yours, it was a question.

The following user thanked IVI40A3Fusionz for this useful post:

07-19-2012, 03:55 PM #6
Newelly
Can’t trickshot me!
Originally posted by Blazing247 View Post
Quickly typed this up and released as some people are rubbish at releasing codes. Fairly simple allows you to have custom sights when aiming down sight with your weapons. It's fully customizable, meaning you can select which sight you would like, it destroys on death to and it only creates one icon not numerous amounts, so yeah enjoy.

Note:
Thread it like this:
self thread ToggleSights();

if it's from a mod menu then like this: (depends on what base you are using)
self.funtion[0][0] = ::ToggleSights;

Precache This in the init() located in the rank.gsc:
precacheShader("rank_prestige10");

    
ToggleSights()
{
if(self.custom == false)
{
self iPrintln("Custom Sights [^2ON^7]");
thread initSight("rank_prestige10");
self.custom = true;
}
else
{
self iPrintln("Custom Sights [^1OFF^7]");
self notify("stop_sight");
self.custom = false;
}
}
initSight( Icon )
{
self endon("death");
self endon("stop_sight");
self.CS = createRectangle( "CENTER", "CENTER", 0, 0, 15, 15, undefined, Icon, 0, 0 );
for(;Winky Winky
{
if(self AdsButtonPressed())
{self.CS.alpha = .8;}
else
{self.CS.alpha = 0;}
wait .3;
}
}


You will also need these if you haven't got them already
    
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElem = newClientHudElem(self);
barElem.elemType = "bar";
barElem.width = width;
barElem.height = height;
barElem.align = align;
barElem.relative = relative;
barElem.children = [];
barElem.sort = sort;
barElem.color = color;
barElem.alpha = alpha;
barElem setShader(shader,width,height);
barElem setPoint(align,relative,x,y);
thread destroyElem(barElem);
return barElem;
}
destroyElem(elem)
{
self waittill_any("death","stop_sight");
elem destroy();
}


mhmm, this was released a while ago i may have released it since i converted it from MW2.
credit: x_daftvader_x

but yeaah!
07-19-2012, 03:57 PM #7
TOM DAINTY
Do a barrel roll!
Originally posted by IVI40A3Fusionz View Post
Woah not saying it's not yours, it was a question.


ryan fuck off you little mug! I coded this because if you have a look in the converted codes thread his custom sights in there are fucked up so I coded my own this morning..

and no credit goes to daftvader, because this is probably one of the most easiest things to make!

The following 2 users say thank you to TOM DAINTY for this useful post:

Simple-_-Modz
07-19-2012, 03:58 PM #8
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Blazing247 View Post
ryan fuck off you little mug! I coded this because if you have a look in the converted codes thread his custom sights in there are fucked up so I coded my own this morning..


Why you going all rage mode over a question about a little script that anyone could make in a few minutes? I'm not saying you didn't make it i was making an assumption, if you made it yourself, good job, but some people will think that you should give credits to someone for the idea, when i don't give credits i have all the NGU staff, Vader, Kieran, Yamato etc all over my ass. Is that so wrong for me to do now? Make assumptions.

The following user thanked IVI40A3Fusionz for this useful post:

x Elite MoDz x
07-19-2012, 04:02 PM #9
TOM DAINTY
Do a barrel roll!
Originally posted by IVI40A3Fusionz View Post
Why you going all rage mode over a question about a little script that anyone could make in a few minutes? I'm not saying you didn't make it i was making an assumption, if you made it yourself, good job, but some people will think that you should give credits to someone for the idea, when i don't give credits i have all the NGU staff, Vader, Kieran, Yamato etc all over my ass. Is that so wrong for me to do now? Make assumptions.


no one gets credit for this because I had no help from anyone I really couldn't care about credits it's a fucking website. sort ya life out u mug, you sound like a **** in ur videos I hope u dont get a partnership.

The following 2 users say thank you to TOM DAINTY for this useful post:

Raul Villaman, Simple-_-Modz
07-19-2012, 07:57 PM #10
x Elite MoDz x
Climbing up the ladder
Originally posted by Blazing247 View Post
no one gets credit for this because I had no help from anyone I really couldn't care about credits it's a fucking website. sort ya life out u mug, you sound like a **** in ur videos I hope u dont get a partnership.

woooaahh, cool it down brothers, i think a storms a brewin'.

oh

and nice script tom Winky Winky keep up the good work dude <3


....



And Ryan, Reply To My PM : ~# Please*

The following user thanked x Elite MoDz x for this useful post:

Raul Villaman

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo