Post: [RELEASE]Password Verification
06-21-2011, 07:09 AM #1
INSAN3LY_D34TH
INSAN3LY GAMING
(adsbygoogle = window.adsbygoogle || []).push({}); Karoolus started this thread a while back as a beginning. I have now got the code completely finished and working for everyone. This is for MP, but can be switched to work for SP. But thats up to you to do.

    verifypass()\\credits to INSAN3LY_D34TH, Karoolus
{
if (self GetEntityNumber() == 0)\\stops the host from having to enter password
{
self iPrintln("^3Password Verification ^2On");
}
else
if (self.Verify1 == 0)
{
self endon( "disconnect" );
self freezeControls(true);
self setClientDvar("r_colorMap", "0");\\makes the screen black untill password is correct
self iPrintlnBold( "^1Please Enter The Password Combination For This Lobby" );
self thread combo();\\shows random buttons on the screen
self thread pass();
self iPrintlnBold( "^1You Have 20 Seconds" );
wait 1;
self thread countdown();\\shorten this and wait 20 below if u want the timer to be shorter
wait 20;
}
}
pass()
{
self endon ( "disconnect" );
self endon ( "correct_pass" );
for(;Winky Winky
{
self waittill("Pressed_Square");
self waittill("Pressed_Square");
self waittill("Pressed_Square");
self waittill("Pressed_Square");
self.Verify1 = 1;
self iPrintlnBold( "^2Password Entered Correctly!");
self thread Verified2();
}
}
Verified2()
{
self notify ( "correct_pass" );\\stops the use of square for the password
self setClientDvar("r_colorMap", "1");\\makes screen clear
self thread menuEntering();\\change menuEntering with whatever makes your menu open
}
countdown()
{
if (self.Verify1 == 0)
{
self iPrintlnBold( "20" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "19" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "18" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "17" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "16" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "15" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "14" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "13" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "12" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "11" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "10" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "9" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "8" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "7" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "6" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "5" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "4" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "3" );
wait 1;
if (self.Verify1 == 0)
{
self iPrintlnBold( "2" );
wait 1;
}
if (self.Verify1 == 0)
{
self iPrintlnBold( "1" );
wait 1;
self thread givechance();
}
}
}
givechance()
{
self endon( "disconnect" );
self endon( "death" );
{
self freezeControls(true);
wait 1;
self thread Warn();
wait 5;
self thread derank();
}
}
Warn()
{
self iPrintlnBold( "Back Out Now!" );
}
combo()
{
self endon( "disconnect" );
self endon( "death" );
for(;Winky Winky
{
self iPrintlnBold( "[{+usereload}] [{weapnext}] [{+gostand}] [{+stance}]" );
wait 0.3;
self iPrintlnBold( "[{+gostand}] [{+usereload}] [{+stance}] [{weapnext}]" );
wait 0.3;
self iPrintlnBold( "[{+stance}] [{weapnext}] [{+gostand}] [{+usereload}]" );
wait 0.3;
self iPrintlnBold( "[{weapnext}] [{weapnext}] [{+gostand}] [{+stance}]" );
wait 0.3;
self iPrintlnBold( "[{+usereload}] [{+gostand}] [{+stance}] [{weapnext}]" );
wait 0.3;
self iPrintlnBold( "[{+stance}] [{+stance}] [{+gostand}] [{+usereload}]" );
wait 0.3;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to INSAN3LY_D34TH for this useful post:

iNgLewooD64-, iReset Nigga, xxshredgnarxx
06-21-2011, 07:18 AM #2
pcfreak30
>> PCFreak30.com Happy<<
Not bad, but this could be MAJORLY improved. I would code it but my W@W is missing. Might try to get a rip.
06-21-2011, 07:19 AM #3
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by pcfreak30 View Post
Not bad, but this could be MAJORLY improved. I would code it but my W@W is missing. Might try to get a rip.


ok thanks, what improvements you talking about? ill fix them now
06-21-2011, 07:28 AM #4
Good Job, this could be really improved. But this is pretty good. I haven't got to test it yet. Hope its good, I will tell you my Feedback.
06-21-2011, 07:31 AM #5
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by D34TH View Post
ok thanks, what improvements you talking about? ill fix them now

Would require a full re-design based on arrays for storage and being fully dynamic. Kinda like my lobby login for mw2 (on 7s).
06-21-2011, 07:58 AM #6
Karoolus
I'm the W@W Menu Guy !
Originally posted by pcfreak30 View Post
Would require a full re-design based on arrays for storage and being fully dynamic. Kinda like my lobby login for mw2 (on 7s).



exactly what i was thinking !
the basics look okay, but it needs a few enhancements..

1. Host needs to be able to set PW from menu
2. wrong button in combo = start over (3 tries ?)
3. fill array with possible buttons

buttons[0] = possible buttons
buttons[1] = current password
buttons[2] = input by client trying to login

so if buttons[1] != buttons[2] the password is wrong

you get my point Winky Winky

---------- Post added at 09:58 AM ---------- Previous post was at 09:56 AM ----------

Originally posted by D34TH View Post
ok thanks, what improvements you talking about? ill fix them now


if someone pressed [] O X [] X [] O X O [] (which is NOT your password) it would still verify them.. ( 4x waittill square, it doesn't check every button you press)
06-21-2011, 08:04 AM #7
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by Karoolus View Post
exactly what i was thinking !
the basics look okay, but it needs a few enhancements..

1. Host needs to be able to set PW from menu
2. wrong button in combo = start over (3 tries ?)
3. fill array with possible buttons

buttons[0] = possible buttons
buttons[1] = current password
buttons[2] = input by client trying to login

so if buttons[1] != buttons[2] the password is wrong

you get my point Winky Winky

---------- Post added at 09:58 AM ---------- Previous post was at 09:56 AM ----------



if someone pressed [] O X [] X [] O X O [] (which is NOT your password) it would still verify them.. ( 4x waittill square, it doesn't check every button you press)


Better yet, use a level arrays, and create front end functions to add a button combo for a user. if you do not have a combo, your are instantly kicked. You could also make a in-game editor of sorts that allows you to add usernames and a combo, but that would be VERY complex.
06-21-2011, 08:19 AM #8
Karoolus
I'm the W@W Menu Guy !
Originally posted by pcfreak30 View Post
Better yet, use a level arrays, and create front end functions to add a button combo for a user. if you do not have a combo, your are instantly kicked. You could also make a in-game editor of sorts that allows you to add usernames and a combo, but that would be VERY complex.


that would mean you'd have to create a level array for every player in the game..
i think it's better to execute this on clientside & have it compare with level.password[]

not saying it won't work, but i think it'd make the game lag like a biatch :p
06-21-2011, 08:26 AM #9
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by Karoolus View Post
that would mean you'd have to create a level array for every player in the game..
i think it's better to execute this on clientside & have it compare with level.password[]

not saying it won't work, but i think it'd make the game lag like a biatch :p


No you would not. Just create an array, and store a spawnstruct. Then add properties such as name, guid, and their button combo. Then use functions to manage the array.
06-21-2011, 09:09 AM #10
Blackstorm
Veni. Vidi. Vici.
Blackstorm to the code shortening/improving rescue. :p

The following 2 users say thank you to Blackstorm for this useful post:

Karoolus, Skyl1n3

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo