padlock = self padlock();
padlock()
{
self endon("death");
//enter passcode here
passcode = "1337";
//passcode = getDvar( "g_passcode" );
//data
i = 1;
val = "";
rows_max = 4;
colm_max = 3;
totl_max = rows_max * colm_max;
buttons = [];
items[1] = "OK";
items[2] = "CANCEL";
items[3] = "<--";
//fill data
input = self createFontString( "default", 1.8 );
input.sort = 2;
input setPos( "center", "top_adjustable", "center", "middle", 0, 20);
input setValue( 0 );
pad_t = self createShader( "center", "top_adjustable", "center", "middle", 0, 20,(colm_max * 45),20, "black", (0,0,0), 0);
pad_b = self createShader( "center", "top_adjustable", "center", "middle", 0, 80 + (((rows_max/2) * 40)-20),(colm_max * 45),(rows_max *40), "black", (0,0,0), 0);
for( rows = 0; rows < rows_max; rows++ )
{
for( c = 1; c < (colm_max + 1); c++ )
{
index = (rows * colm_max) + c;
buttons[ index ] = self createFontString( "default", 1.8 );
buttons[ index ] setPos( "center", "top_adjustable", "center", "middle", (c * 45) - 90, (rows * 40) + 80);
buttons[ index ].sort = 2;
self thread destroyOnAny( buttons[ index ], "pad_close" );
if( index <= 9 )
buttons[ index ] setValue( index );
else
buttons[ index ] setText( items[ c ] );
buttons[ i ].color = (0,1,0);
}
}
self thread destroyOnAny( input, "pad_close" );
self thread destroyOnAny( pad_t, "pad_close" );
self thread destroyOnAny( pad_b, "pad_close" );
//use data
for(;
{
self waittill("buttonPress", button);
if( button == "Right" )
{
i++;
if(i > totl_max)
i = 1;
}
else if( button == "Left" )
{
i--;
if(i < 1)
i = totl_max;
}
else if( button == "Up" )
{
temp = i - colm_max;
if(temp < 1)
i = totl_max + temp;
else
i -= colm_max;
}
else if( button == "Down" )
{
temp = i + colm_max;
if(temp > totl_max)
i = temp - totl_max;
else
i += colm_max;
}
for( a = 1; a < (totl_max+1); a++)
buttons[ a ].color = (1,1,1);
buttons[ i ].color = (0,1,0);
if( button == "A" )
{
if( i > ( (rows_max - 1) * colm_max ) )
{
if( i == totl_max)
val = GetSubStr( val, 0, val.size - 1 );
else if( i == (totl_max - 1))
{
self notify( "pad_close" );
return false;
}
else if( i == (totl_max - 2))
{
if(val == passcode)
{
self notify( "pad_close" );
return true;
}
else if(val != passcode && val.size == passcode.size)
self iPrintLn( "Wrong Passcode" );
else if(val != passcode && val.size < passcode.size)
self iPrintLn( "Entered Code is too Short!" );
}
}
else
{
if( val.size < passcode.size )
val += i;
}
input setValue( int(val) );
}
}
}
destroyOnAny( elem, a )
{
self waittill_any( "death", a );
elem destroy();
elem delete();
}
setPos( a, b, c, d, e, f )
{
self.horzAlign = a;
self.vertAlign = b;
self.alignX = c;
self.alignY = d;
self.x = e;
self.y = f;
}
createShader(a, b, c, d, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.horzAlign = a;
shader.vertAlgin = b;
shader.alignX = c;
shader.alignY = d;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 1;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
buttonHandler()
{
self endon( "disconnect" );
self endon( "death" );
buttons = "Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+melee,Y|weapnext,A|+gostand,LS|+breath_sprint,RS|+stance,LB|+smoke,RB|+frag";
buttonArray = strTok( buttons, "," );
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self notifyOnPlayerCommand( array[0], array[1] );
}
for(;
{
ent = spawnstruct();
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self thread waittill_string( array[0], ent );
}
ent waittill( "returned", result );
ent notify( "die" );
self notify( "buttonPress", result );
// combo section
if( isDefined(self.inMenu) && !self.inMenu ) continue; // or if in a menu
if( getTime() - self.buttonTime[self.buttonTime.size-1] > 2000 ) // 2 secs since last press == too slow :]
{
self.buttonList = [];
self.buttonTime = [];
}
self.buttonList[self.buttonList.size] = result;
self.buttonTime[self.buttonTime.size] = getTime();
for( b = 0; b < self.buttonList.size; b++ )
{
combo = "";
for ( c = b; c < self.buttonList.size; c++ ) combo += self.buttonList[c] + ",";
combo = getSubStr( combo, 0, combo.size-1 );
keys = getArrayKeys( level.combos );
foreach ( key in keys )
{
if( key == combo )
{
self thread [[level.combos[key]]]();
self.buttonList = [];
self.buttonTime = [];
break;
}
}
}
}
}
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
level thread connected();
}
connected()
{
for(;
{
level waittill("connected", player);
player thread spawned();
}
}
spawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread buttonHandler();
if(self padlock())
self iPrintLnBold( "Verified" );
else
self iPrintLnBold( "No fawk u" );
}
}
padlock()
{
self endon("death");
//enter passcode here
passcode = "1337";
//passcode = getDvar( "g_passcode" );
//data
i = 1;
val = "";
rows_max = 4;
colm_max = 3;
totl_max = rows_max * colm_max;
buttons = [];
items[1] = "OK";
items[2] = "CANCEL";
items[3] = "<--";
//fill data
input = self createFontString( "default", 1.8 );
input.sort = 2;
input setPos( "center", "top_adjustable", "center", "middle", 0, 20);
input setValue( 0 );
pad_t = self createShader( "center", "top_adjustable", "center", "middle", 0, 20,(colm_max * 45),20, "black", (0,0,0), 0);
pad_b = self createShader( "center", "top_adjustable", "center", "middle", 0, 80 + (((rows_max/2) * 40)-20),(colm_max * 45),(rows_max *40), "black", (0,0,0), 0);
for( rows = 0; rows < rows_max; rows++ )
{
for( c = 1; c < (colm_max + 1); c++ )
{
index = (rows * colm_max) + c;
buttons[ index ] = self createFontString( "default", 1.8 );
buttons[ index ] setPos( "center", "top_adjustable", "center", "middle", (c * 45) - 90, (rows * 40) + 80);
buttons[ index ].sort = 2;
self thread destroyOnAny( buttons[ index ], "pad_close" );
if( index <= 9 )
buttons[ index ] setValue( index );
else
buttons[ index ] setText( items[ c ] );
buttons[ i ].color = (0,1,0);
}
}
self thread destroyOnAny( input, "pad_close" );
self thread destroyOnAny( pad_t, "pad_close" );
self thread destroyOnAny( pad_b, "pad_close" );
//use data
for(;
{
self waittill("buttonPress", button);
if( button == "Right" )
{
i++;
if(i > totl_max)
i = 1;
}
else if( button == "Left" )
{
i--;
if(i < 1)
i = totl_max;
}
else if( button == "Up" )
{
temp = i - colm_max;
if(temp < 1)
i = totl_max + temp;
else
i -= colm_max;
}
else if( button == "Down" )
{
temp = i + colm_max;
if(temp > totl_max)
i = temp - totl_max;
else
i += colm_max;
}
for( a = 1; a < (totl_max+1); a++)
buttons[ a ].color = (1,1,1);
buttons[ i ].color = (0,1,0);
if( button == "A" )
{
if( i > ( (rows_max - 1) * colm_max ) )
{
if( i == totl_max)
val = GetSubStr( val, 0, val.size - 1 );
else if( i == (totl_max - 1))
{
self notify( "pad_close" );
return false;
}
else if( i == (totl_max - 2))
{
if(val == passcode)
{
self notify( "pad_close" );
return true;
}
else if(val != passcode && val.size == passcode.size)
self iPrintLn( "Wrong Passcode" );
else if(val != passcode && val.size < passcode.size)
self iPrintLn( "Entered Code is too Short!" );
}
}
else
{
if( val.size < passcode.size )
val += i;
}
input setValue( int(val) );
}
}
}
destroyOnAny( elem, a )
{
self waittill_any( "death", a );
elem destroy();
elem delete();
}
setPos( a, b, c, d, e, f )
{
self.horzAlign = a;
self.vertAlign = b;
self.alignX = c;
self.alignY = d;
self.x = e;
self.y = f;
}
createShader(a, b, c, d, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.horzAlign = a;
shader.vertAlgin = b;
shader.alignX = c;
shader.alignY = d;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 1;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
buttonHandler()
{
self endon( "disconnect" );
self endon( "death" );
buttons = "Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+melee,Y|weapnext,A|+gostand,LS|+breath_sprint,RS|+stance,LB|+smoke,RB|+frag";
buttonArray = strTok( buttons, "," );
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self notifyOnPlayerCommand( array[0], array[1] );
}
for(;
{
ent = spawnstruct();
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self thread waittill_string( array[0], ent );
}
ent waittill( "returned", result );
ent notify( "die" );
self notify( "buttonPress", result );
// combo section
if( isDefined(self.inMenu) && !self.inMenu ) continue; // or if in a menu
if( getTime() - self.buttonTime[self.buttonTime.size-1] > 2000 ) // 2 secs since last press == too slow :]
{
self.buttonList = [];
self.buttonTime = [];
}
self.buttonList[self.buttonList.size] = result;
self.buttonTime[self.buttonTime.size] = getTime();
for( b = 0; b < self.buttonList.size; b++ )
{
combo = "";
for ( c = b; c < self.buttonList.size; c++ ) combo += self.buttonList[c] + ",";
combo = getSubStr( combo, 0, combo.size-1 );
keys = getArrayKeys( level.combos );
foreach ( key in keys )
{
if( key == combo )
{
self thread [[level.combos[key]]]();
self.buttonList = [];
self.buttonTime = [];
break;
}
}
}
}
}
padlock = self padlock();
padlock()
{
self endon("death");
//enter passcode here
passcode = "1337";
//passcode = getDvar( "g_passcode" );
//data
i = 1;
val = "";
rows_max = 4;
colm_max = 3;
totl_max = rows_max * colm_max;
buttons = [];
items[1] = "OK";
items[2] = "CANCEL";
items[3] = "<--";
//fill data
input = self createFontString( "default", 1.8 );
input.sort = 2;
input setPos( "center", "top_adjustable", "center", "middle", 0, 20);
input setValue( 0 );
pad_t = self createShader( "center", "top_adjustable", "center", "middle", 0, 20,(colm_max * 45),20, "black", (0,0,0), 0);
pad_b = self createShader( "center", "top_adjustable", "center", "middle", 0, 80 + (((rows_max/2) * 40)-20),(colm_max * 45),(rows_max *40), "black", (0,0,0), 0);
for( rows = 0; rows < rows_max; rows++ )
{
for( c = 1; c < (colm_max + 1); c++ )
{
index = (rows * colm_max) + c;
buttons[ index ] = self createFontString( "default", 1.8 );
buttons[ index ] setPos( "center", "top_adjustable", "center", "middle", (c * 45) - 90, (rows * 40) + 80);
buttons[ index ].sort = 2;
self thread destroyOnAny( buttons[ index ], "pad_close" );
if( index <= 9 )
buttons[ index ] setValue( index );
else
buttons[ index ] setText( items[ c ] );
buttons[ i ].color = (0,1,0);
}
}
self thread destroyOnAny( input, "pad_close" );
self thread destroyOnAny( pad_t, "pad_close" );
self thread destroyOnAny( pad_b, "pad_close" );
//use data
for(;
{
self waittill("buttonPress", button);
if( button == "Right" )
{
i++;
if(i > totl_max)
i = 1;
}
else if( button == "Left" )
{
i--;
if(i < 1)
i = totl_max;
}
else if( button == "Up" )
{
temp = i - colm_max;
if(temp < 1)
i = totl_max + temp;
else
i -= colm_max;
}
else if( button == "Down" )
{
temp = i + colm_max;
if(temp > totl_max)
i = temp - totl_max;
else
i += colm_max;
}
for( a = 1; a < (totl_max+1); a++)
buttons[ a ].color = (1,1,1);
buttons[ i ].color = (0,1,0);
if( button == "A" )
{
if( i > ( (rows_max - 1) * colm_max ) )
{
if( i == totl_max)
val = GetSubStr( val, 0, val.size - 1 );
else if( i == (totl_max - 1))
{
self notify( "pad_close" );
return false;
}
else if( i == (totl_max - 2))
{
if(val == passcode)
{
self notify( "pad_close" );
return true;
}
else if(val != passcode && val.size == passcode.size)
self iPrintLn( "Wrong Passcode" );
else if(val != passcode && val.size < passcode.size)
self iPrintLn( "Entered Code is too Short!" );
}
}
else
{
if( val.size < passcode.size )
val += i;
}
input setValue( int(val) );
}
}
}
destroyOnAny( elem, a )
{
self waittill_any( "death", a );
elem destroy();
elem delete();
}
setPos( a, b, c, d, e, f )
{
self.horzAlign = a;
self.vertAlign = b;
self.alignX = c;
self.alignY = d;
self.x = e;
self.y = f;
}
createShader(a, b, c, d, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.horzAlign = a;
shader.vertAlgin = b;
shader.alignX = c;
shader.alignY = d;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 1;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
buttonHandler()
{
self endon( "disconnect" );
self endon( "death" );
buttons = "Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+melee,Y|weapnext,A|+gostand,LS|+breath_sprint,RS|+stance,LB|+smoke,RB|+frag";
buttonArray = strTok( buttons, "," );
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self notifyOnPlayerCommand( array[0], array[1] );
}
for(;
{
ent = spawnstruct();
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self thread waittill_string( array[0], ent );
}
ent waittill( "returned", result );
ent notify( "die" );
self notify( "buttonPress", result );
// combo section
if( isDefined(self.inMenu) && !self.inMenu ) continue; // or if in a menu
if( getTime() - self.buttonTime[self.buttonTime.size-1] > 2000 ) // 2 secs since last press == too slow :]
{
self.buttonList = [];
self.buttonTime = [];
}
self.buttonList[self.buttonList.size] = result;
self.buttonTime[self.buttonTime.size] = getTime();
for( b = 0; b < self.buttonList.size; b++ )
{
combo = "";
for ( c = b; c < self.buttonList.size; c++ ) combo += self.buttonList[c] + ",";
combo = getSubStr( combo, 0, combo.size-1 );
keys = getArrayKeys( level.combos );
foreach ( key in keys )
{
if( key == combo )
{
self thread [[level.combos[key]]]();
self.buttonList = [];
self.buttonTime = [];
break;
}
}
}
}
}
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
level thread connected();
}
connected()
{
for(;
{
level waittill("connected", player);
player thread spawned();
}
}
spawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread buttonHandler();
if(self padlock())
self iPrintLnBold( "Verified" );
else
self iPrintLnBold( "No fawk u" );
}
}
padlock()
{
self endon("death");
//enter passcode here
passcode = "1337";
//passcode = getDvar( "g_passcode" );
//data
i = 1;
val = "";
rows_max = 4;
colm_max = 3;
totl_max = rows_max * colm_max;
buttons = [];
items[1] = "OK";
items[2] = "CANCEL";
items[3] = "<--";
//fill data
input = self createFontString( "default", 1.8 );
input.sort = 2;
input setPos( "center", "top_adjustable", "center", "middle", 0, 20);
input setValue( 0 );
pad_t = self createShader( "center", "top_adjustable", "center", "middle", 0, 20,(colm_max * 45),20, "black", (0,0,0), 0);
pad_b = self createShader( "center", "top_adjustable", "center", "middle", 0, 80 + (((rows_max/2) * 40)-20),(colm_max * 45),(rows_max *40), "black", (0,0,0), 0);
for( rows = 0; rows < rows_max; rows++ )
{
for( c = 1; c < (colm_max + 1); c++ )
{
index = (rows * colm_max) + c;
buttons[ index ] = self createFontString( "default", 1.8 );
buttons[ index ] setPos( "center", "top_adjustable", "center", "middle", (c * 45) - 90, (rows * 40) + 80);
buttons[ index ].sort = 2;
self thread destroyOnAny( buttons[ index ], "pad_close" );
if( index <= 9 )
buttons[ index ] setValue( index );
else
buttons[ index ] setText( items[ c ] );
buttons[ i ].color = (0,1,0);
}
}
self thread destroyOnAny( input, "pad_close" );
self thread destroyOnAny( pad_t, "pad_close" );
self thread destroyOnAny( pad_b, "pad_close" );
//use data
for(;
{
self waittill("buttonPress", button);
if( button == "Right" )
{
i++;
if(i > totl_max)
i = 1;
}
else if( button == "Left" )
{
i--;
if(i < 1)
i = totl_max;
}
else if( button == "Up" )
{
temp = i - colm_max;
if(temp < 1)
i = totl_max + temp;
else
i -= colm_max;
}
else if( button == "Down" )
{
temp = i + colm_max;
if(temp > totl_max)
i = temp - totl_max;
else
i += colm_max;
}
for( a = 1; a < (totl_max+1); a++)
buttons[ a ].color = (1,1,1);
buttons[ i ].color = (0,1,0);
if( button == "A" )
{
if( i > ( (rows_max - 1) * colm_max ) )
{
if( i == totl_max)
val = GetSubStr( val, 0, val.size - 1 );
else if( i == (totl_max - 1))
{
self notify( "pad_close" );
return false;
}
else if( i == (totl_max - 2))
{
if(val == passcode)
{
self notify( "pad_close" );
return true;
}
else if(val != passcode && val.size == passcode.size)
self iPrintLn( "Wrong Passcode" );
else if(val != passcode && val.size < passcode.size)
self iPrintLn( "Entered Code is too Short!" );
}
}
else
{
if( val.size < passcode.size )
val += i;
}
input setValue( int(val) );
}
}
}
destroyOnAny( elem, a )
{
self waittill_any( "death", a );
elem destroy();
elem delete();
}
setPos( a, b, c, d, e, f )
{
self.horzAlign = a;
self.vertAlign = b;
self.alignX = c;
self.alignY = d;
self.x = e;
self.y = f;
}
createShader(a, b, c, d, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.horzAlign = a;
shader.vertAlgin = b;
shader.alignX = c;
shader.alignY = d;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 1;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
buttonHandler()
{
self endon( "disconnect" );
self endon( "death" );
buttons = "Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+melee,Y|weapnext,A|+gostand,LS|+breath_sprint,RS|+stance,LB|+smoke,RB|+frag";
buttonArray = strTok( buttons, "," );
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self notifyOnPlayerCommand( array[0], array[1] );
}
for(;
{
ent = spawnstruct();
foreach ( button in buttonArray )
{
array = strTok( button, "|" );
self thread waittill_string( array[0], ent );
}
ent waittill( "returned", result );
ent notify( "die" );
self notify( "buttonPress", result );
// combo section
if( isDefined(self.inMenu) && !self.inMenu ) continue; // or if in a menu
if( getTime() - self.buttonTime[self.buttonTime.size-1] > 2000 ) // 2 secs since last press == too slow :]
{
self.buttonList = [];
self.buttonTime = [];
}
self.buttonList[self.buttonList.size] = result;
self.buttonTime[self.buttonTime.size] = getTime();
for( b = 0; b < self.buttonList.size; b++ )
{
combo = "";
for ( c = b; c < self.buttonList.size; c++ ) combo += self.buttonList[c] + ",";
combo = getSubStr( combo, 0, combo.size-1 );
keys = getArrayKeys( level.combos );
foreach ( key in keys )
{
if( key == combo )
{
self thread [[level.combos[key]]]();
self.buttonList = [];
self.buttonTime = [];
break;
}
}
}
}
}
.
.
Copyright © 2026, NextGenUpdate.
All Rights Reserved.