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-23-2012, 02:36 PM #11
Originally posted by Blazing247 View Post
I really couldn't care about credits it's a fucking website


:ha!: :y:


And btw to everyone else , I never posted a fully working version of this anyway, I just had the idea from Black Ops and EliteMossy finished it, whatever happened to him anyway :think:
07-23-2012, 03:02 PM #12
Correy
I'm the Original
Originally posted by x. View Post
whatever happened to him anyway :think:


college and programming Enzo
07-23-2012, 03:29 PM #13
Originally posted by Correy View Post
college and programming Enzo
Ok, thanks, Curry, but it was a rhetorical question Enzo

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo