Post: Prestige Slider
03-06-2012, 02:09 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); It's not just a prestige slider, it edit any stat you want.


New Preview



Add this to the includes:
    
#include maps\mp\gametypes\_hud_message;


Precache this:
    
precacheShader( "gradient_center" );


The function itself:
    
Slider( MIN, MAX, INPUT, TEXT, PERS )
{
self endon( "death" );
self.M["InMenu"] = undefined;
SLIDER["INIT"] = true;
if( PERS ) SLIDER["CURS"] = self.pers[PERS];
else SLIDER["CURS"] = 0;
SLIDER["ELEMENT"][0] = CreateValue( "CENTER", "CENTER", -35, 0, "defualt", 1.75, 2, .4 );
SLIDER["ELEMENT"][1] = CreateValue( "CENTER", "CENTER", 0, 0, "objective", 4, 3, 1 );
SLIDER["ELEMENT"][2] = CreateValue( "CENTER", "CENTER", 35, 0, "defualt", 1.75, 2, .4 );
SLIDER["ELEMENT"][3] = CreateValue( "CENTER", "CENTER", 0, 35, "defualt", 1.5, 2, 1 );
SLIDER["ELEMENT"][4] = CreateShader( "LEFT", "LEFT", -125, 220, 900, 40,"gradient_center", (0,0,0), 0.7, 1 );
while( isDefined( SLIDER["INIT"] ))
{
self freezeControls( true );
self setClientDvar( "r_blur", 9 );
self setClientDvar( "ui_hud_harcore", 1 );
SLIDER["CURS"] += self FragButtonPressed();
SLIDER["CURS"] -= self SecondaryOffHandButtonPressed();
if( SLIDER["CURS"] < MIN ) SLIDER["CURS"] = MAX;
if( SLIDER["CURS"] > MAX ) SLIDER["CURS"] = MIN;
if( SLIDER["CURS"] == MAX ) SLIDER["NEXT"] = MIN;
else SLIDER["NEXT"] = SLIDER["CURS"] + 1;
if( SLIDER["CURS"] == MIN ) SLIDER["PREV"] = MAX;
else SLIDER["PREV"] = SLIDER["CURS"] - 1;
SLIDER["ELEMENT"][0] setValue( SLIDER["PREV"] );
SLIDER["ELEMENT"][1] setValue( SLIDER["CURS"] );
SLIDER["ELEMENT"][2] setValue( SLIDER["NEXT"] );
SLIDER["ELEMENT"][3] setText( TEXT + " " + SLIDER["CURS"] );
if( self MeleeButtonPressed() ){
SLIDER["ELEMENT"][4] destroy();
for(K = 0; K < SLIDER["ELEMENT"].size; K++){
SLIDER["ELEMENT"][K] destroyElem();
self setClientDvar( "r_blur", 0 );
self setClientDvar( "ui_hud_harcore", 0 );
SLIDER["INIT"] = false;
self freezeControls( false );
wait .1;
}
}
if( self UseButtonPressed() ){
self maps\mp\gametypes\_persistence::statSet( INPUT, SLIDER["CURS"] );
self oldNotifyMessage( TEXT + " " + SLIDER["CURS"] );
self iPrintln( TEXT + " " + SLIDER["CURS"] + " Set!" );
wait 1;
}
wait .3;
}
}


you will also need to these:
    
CreateValue( point, relative, x, y, font, fontscale, sort, alpha )
{
Value = createFontString( font, fontscale );
Value setPoint( point, relative, x, y );
Value.alpha = alpha;
Value.sort = sort;
return Value;
}

    
CreateShader(point, rPoint, x, y, width, height, elem, colour, alpha, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = alpha;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}


Example of usage:
    
self thread ( 0, 11, "plevel", "Prestige", "prestige" );


Syntax Version:
    
self thread Slider( < minimum value > , < maximum value > , < input > , < hint text > , < pers array > );


Note: the CreateShader is self implemented so it will be different to yours.
if you already use one then use that, but you will need to re-thread the arguments yourself

This will work for all call of dutys without tweaking.

If you have any suggestions let me know.
Thanks to IELIITEM0DZX for a little help also
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Correy for this useful post:

Choco, COD5-MAN-, Oliver1556, User2340034u
03-06-2012, 08:20 PM #20
Taylor
Former Black Knight.
Originally posted by Correy View Post
A few improvements could be made, i personally don't like the emblems i prefer the text.
If you have any suggestions then quote me, or even something new to code would be nice too



what do you guys think?, release like this or improve?


Nice, Oh And Btw Nice FPS :carling: 8 FPS, Isnt It? You must login or register to view this content.

---------- Post added at 03:20 PM ---------- Previous post was at 03:18 PM ----------

Originally posted by thumper View Post
lol who cares about perstige and rank on cod4 anyomre.


godo spelinlg bro....... (btw i misspelled it on purpose)
03-06-2012, 08:20 PM #21
Taylor
Former Black Knight.
Originally posted by thumper View Post
lol who cares about perstige and rank on cod4 anyomre.


godo spelinlg bro....... (btw i misspelled it on purpose)
03-06-2012, 11:15 PM #22
xRaW
xI2aW-
Originally posted by IELIITEMODZX View Post
ennything is possible Winky Winky


took the words out of my mind. But the thing is i thought anything is possible not ennything :carling:
03-07-2012, 12:03 AM #23
Originally posted by xRaW View Post
took the words out of my mind. But the thing is i thought anything is possible not ennything :carling:
yes im not good at spelling lol Winky Winky
03-07-2012, 02:45 PM #24
Correy
I'm the Original
i released it :lol:
03-07-2012, 05:17 PM #25
I wanted to watch the video, but the first ten seconds of the horrible song scared me off.

The following user thanked Omniplasma for this useful post:

Correy
03-07-2012, 05:24 PM #26
thanks for the credit Winky Winky
03-07-2012, 08:37 PM #27
Correy
I'm the Original
Originally posted by IELIITEMODZX View Post
thanks for the credit Winky Winky


no problem bro Enzo.
03-07-2012, 10:00 PM #28
Originally posted by DlBSY993 View Post
/facepalm .......................

---------- Post added at 01:01 PM ---------- Previous post was at 12:59 PM ----------






You haven't seen some off things in my patch xD


most proberly stuff thats leeched? Or stuff that so simple lol.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo