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-07-2012, 11:08 PM #29
DlBSY993
There's 0nly 1..
Originally posted by COD5
most proberly stuff thats leeched? Or stuff that so simple lol.


Why would my stuff be leeched? Unless leeching now means creating something then putting it in your patch ?

-Didn't think so..
03-11-2012, 07:37 PM #30
Correy
I'm the Original
Originally posted by DlBSY993 View Post
Why would my stuff be leeched? Unless leeching now means creating something then putting it in your patch ?

-Didn't think so..


he's trying to call you noob stare
03-15-2012, 08:27 PM #31
cool hack but u can get 10th prestige on cod 4 easy now with all the hacked lobbies so its not very useful
03-15-2012, 09:15 PM #32
Correy
I'm the Original
Originally posted by Silent
cool hack but u can get 10th prestige on cod 4 easy now with all the hacked lobbies so its not very useful


them fancy things make the patch alot better. Smile
03-26-2012, 12:00 PM #33
hey, when ever i add "#include maps\mp\gametypes\_hud_message;" to my includes it crashes my game. Im on pc right now and it almost finishes loading the map and then it just says iw3mp stopped responding. Anyway to fix this? thanks

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo