Post: {CODE] Custom Sights (V 1.01) !!
01-29-2011, 12:27 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); ..........
(adsbygoogle = window.adsbygoogle || []).push({});

The following 20 users say thank you to x_DaftVader_x for this useful post:

Alfa, Amanda, d7w7z, DR-Dizzy, Dreamcather, EliteMossy, GeorgeGreen, Ghost1990, Hawk, Jake9, kingofkarate400, LINUX♥, Mw2Freak13, oGHOSTLYMODZ, Skyl1n3, TehMike, The InvadeR, Tuhoaja, Vampytwistッ
01-29-2011, 02:10 PM #47
Default Avatar
Newelly
Guest
Originally posted by x View Post
are you using the first one i posted or the new one at the bottom? The new one has an error I am waiting for d7w7z to fix it..


Ok im about to test see if it was that ill let you know Cool Man (aka Tustin)

---------- Post added at 10:10 AM ---------- Previous post was at 10:04 AM ----------

Nope Nothing Here Is My Menu Functioning Etc..

Init:
    
precacheShader("cardicon_prestige10_02");
precacheShader("cardicon_warpig");
precacheShader("cardicon_prestige10");
precacheShader("cardicon_weed");
precacheShader("cardicon_headshot");


missions:
    
VaderSights(){
self endon("death");
self endon("disconnect");
for(;Winky Winky{

x_DaftVader_x = createIcon( "cardicon_prestige10_02", 25, 25 );
x_DaftVader_x setPoint( "CENTER","CENTER",0,0 );
x_DaftVader_x.alpha = 0.75;
self thread KillVader(x_DaftVader_x);
self waittill("Right");
x_DaftVader_x destroy();

x_DaftVader_x = createIcon( "cardicon_prestige10", 25, 25 );
x_DaftVader_x setPoint( "CENTER","CENTER",0,0 );
x_DaftVader_x.alpha = 0.75;
self thread KillVader(x_DaftVader_x);

x_DaftVader_x destroy();
x_DaftVader_x = createIcon( "cardicon_weed", 25, 25 );
x_DaftVader_x setPoint( "CENTER","CENTER",0,0 );
x_DaftVader_x.alpha = 0.75;
self thread KillVader(x_DaftVader_x);
x_DaftVader_x destroy();

x_DaftVader_x = createIcon( "cardicon_warpig", 25, 25 );
x_DaftVader_x setPoint( "CENTER","CENTER",0,0 );
x_DaftVader_x.alpha = 0.75;
self thread KillVader(x_DaftVader_x);
x_DaftVader_x destroy();

x_DaftVader_x = createIcon( "cardicon_headshot", 25, 25 );
x_DaftVader_x setPoint( "CENTER","CENTER",0,0 );
x_DaftVader_x.alpha = 0.75;
self thread KillVader(x_DaftVader_x);
x_DaftVader_x destroy();
}}

KillVader(a){
self waittill ("death");
a destroy();
}


Menu..
    
menu.name[12] = "Custom Aiming Sites";
menu.function[12] = maps\mp\gametypes\_missions :: VaderSights;
menu.input[13] = "";


its set at missions because my mod menu is somewhere else Cool Man (aka Tustin)
if you was wondering at any point :y:
01-29-2011, 02:10 PM #48
Default Avatar
Newelly
Guest
Ok..
i just looked at my screen and the spinning 10th was on idk how it got there :/
ahaha

EDIT: Just Relised its coming on randomly i was just walking and it was flickering on/off/on/off

but thats the only cardicon (spinning 10th)

i also need to try and get it to follow the gun and only show when i aim in
atm its stuck in the middle of the screen aha
01-29-2011, 02:36 PM #49
EliteMossy
TheDigitalBoard.com
Chill guys, i just re-wrote DaftVaders one, and i will post it in about 10minutes.
01-29-2011, 02:37 PM #50
Skyl1n3
DO SOMETHING THEN!
Originally posted by x View Post
are you using the first one i posted or the new one at the bottom? The new one has an error I am waiting for d7w7z to fix it..


Oh, yeah I was trying the bottom one =D
01-29-2011, 02:41 PM #51
Originally posted by Newelly View Post
Ok..
i just looked at my screen and the spinning 10th was on idk how it got there :/
ahaha

EDIT: Just Relised its coming on randomly i was just walking and it was flickering on/off/on/off

but thats the only cardicon (spinning 10th)

i also need to try and get it to follow the gun and only show when i aim in
atm its stuck in the middle of the screen aha


its flickering because its destroying without waiting for "Right".. so its looping around and around..

My first code in the post addressed those problems, it should work for you... Try changing the button commands to something else..

---------- Post added at 02:41 PM ---------- Previous post was at 02:38 PM ----------

Originally posted by TheEliteMossy View Post
Chill guys, i just re-wrote DaftVaders one, and i will post it in about 10minutes.


Thanks .

Send it and I will edit my OP.

This was such a simple idea, i didn't think it would be such a big deal Smile
01-29-2011, 02:42 PM #52
EliteMossy
TheDigitalBoard.com
Add this to init()
    
level thread BuildCustomSights();


add this to onPlayerConnect()
    
player.PCS=0;


add this to onPlayerSpawned()
    
self.WantsSights=0;


Then add these to your menu

    
ToggleCustomSights();
CustomSights();


    
CustomSights()
{
if(self.WantsSights)
{
self.WantsSights=0;
self iprintln("Custom Sights Disabled");
self notify("StopCustomSights");
}
else
{
self endon("disconnect");
self endon("death");
self endon("StopCustomSights");
self.WantsSights=1;
self iprintln("Custom Sights Enabled");
if(!isDefined(self.SightIcon))
{
self.SightIcon=createIcon(level.CSL[self.PCS],25,25);
self.SightIcon setPoint("CENTER","CENTER",0,0);
self.SightIcon.alpha=0;
}
for(;Winky Winky
{
wait .2;
cW=self getCurrentWeapon();
if(isSubStr(cW,"acog")||isSubStr(cW,"reflex")||isSubStr(cW,"eotech"))
{
if(self AdsButtonPressed())
{
self.SightIcon setShader(level.CSL[self.PCS],25,25);
self.SightIcon.shader=level.CSL[self.PCS];
self.SightIcon.alpha=0.75;
}
else
{
self.SightIcon.alpha=0;
}
}
else
{
self.SightIcon.alpha=0;
}
}
}
}

ToggleCustomSights()
{
self.PCS++;
if(self.PCS>=level.CSL.size)self.PCSL=0;
self iprintln("Picked Sight: "+level.CSL[self.PCS]);
}

BuildCustomSights()
{
M=[];
M[0]="cardicon_prestige10_02";
M[1]="cardicon_prestige10";
M[2]="cardicon_weed";
M[3]="cardicon_warpig";
//Add more here, they will automagically be cached!
for(i=0;i<M.size;i++) precacheShader(M[i]);
level.CSL=M;
}



Have fun, it works 100%, i tested it Winky Winky

The following user thanked EliteMossy for this useful post:

Amanda
01-29-2011, 02:55 PM #53
Originally posted by TheEliteMossy View Post


Have fun, it works 100%, i tested it Winky Winky


Thanks for fixing that up. Added to OP.

It looked better with my name in the code though :derp:
01-29-2011, 03:02 PM #54
EliteMossy
TheDigitalBoard.com
Originally posted by x View Post
Thanks for fixing that up. Added to OP.

It looked better with my name in the code though :derp:


You tried my version? Want to see what you think

    
ToggleCustomSights()
{
self.PCS++;
if(self.PCS>=level.CSL.size)self.PCS=0;
self iprintln("Picked Sight: "+level.CSL[self.PCS]);
}


also the onPlayerSpawned bit needs
    
if(isDefined(self.SightIcon)) self.SightIcon.alpha=0;
self.WantsSights=0;


Bug Fixed that Winky Winky
01-29-2011, 03:08 PM #55
Correy
I'm the Original
Originally posted by TheEliteMossy View Post
You tried my version? Want to see what you think

    
ToggleCustomSights()
{
self.PCS++;
if(self.PCS>=level.CSL.size)self.PCS=0;
self iprintln("Picked Sight: "+level.CSL[self.PCS]);
}


Bug Fixed that Winky Winky


Nice Work, You and Vader would do really well making a patch together (Hint,Hint). Like A Fun Game Mode=D

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo