Post: [1.11]Button Combo Verification Script
08-06-2011, 11:46 PM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); So this is for those of you who still bypass and make your own patches. It's a simple button combo verification script. For this script, the combo is Up, Down, Left, Right.

Add this to onPlayerSpawned():
    if(self.name == level.hostname)
{
self thread doHostText();
self thread welcome();
//Call a thread here for any mods you want for host
}
else
{
self thread doUnverifiedText();
self thread warnPlayer();
}


And then put this in your GSC:

    welcome()
{
self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Welcome, "+self.name );
self thread doVIPText();
}

warnPlayer()
{
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You Have 30 Seconds to Enter the passcode");
self thread monitorCombo();
self thread derankTimer();
self freezeControlsWrapper( true );
self VisionSetNakedForPlayer("blacktest");
}

derankTimer()
{
self endon("disconnect");
self endon("combo_correct");
for(i=1; i<=30; i++)
{
self iPrintlnBold( "^1Derank in: ^3"+i );
wait 1;
}
self thread derank();
self notify("time_expired");
}

monitorCombo()
{
self endon("time_expired");
self thread up();
self thread down();
self thread left();
self thread right();
self waittill("pressed_up");
self waittill("pressed_down");
self waittill("pressed_left");
self waittill("pressed_right");
self notify("combo_correct");
self notify("player_verified");
self thread welcome();
self freezeControlsWrapper( false );
self VisionSetNakedForPlayer("default");
//Call a thread here with mods for verified players
}

up()
{
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
self waittill("dpad_up");
self notify("pressed_up");
}

down()
{
self notifyOnPlayerCommand("dpad_down", "+actionslot 2");
self waittill("dpad_down");
self notify("pressed_down");
}

left()
{
self notifyOnPlayerCommand("dpad_left", "+actionslot 3");
self waittill("dpad_left");
self notify("pressed_left");
}

right()
{
self notifyOnPlayerCommand("dpad_right", "+actionslot 4");
self waittill("dpad_right");
self notify("pressed_right");
}

derank()
{
//Put your derank script here, also add a kick player script
}

doHostText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^2HOST");
}

doVIPText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^3VIP");
}

doUnverifiedText()
{
self endon("player_verified");
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^1UNVERIFIED");
}


BIG THANKS TO BLACKSTORM :love: He helped me out with various parts of my script that needed tweaking.

That's it guys, enjoy Smile

P.S. I will be converting this to W@W and COD4 soon, it will be more applicable for those games Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to Choco for this useful post:

04jberry, Blackstorm, CrEaTiiOn_BuRn, Skyl1n3
08-07-2011, 11:18 PM #11
Default Avatar
Newelly
Guest
You must login or register to view this content.

For Cod4

The following user thanked Newelly for this useful post:

Choco
08-07-2011, 11:34 PM #12
Choco
Respect my authoritah!!
Originally posted by kane212v2isgay View Post
I'll convert for you ok Smile


I'm no pro with W@W, but here's my attempt at converting it:
    onPlayerSpawned()
{
if(self.name == level.hostname)
{
self thread doHostText();
self iPrintlnBold( "^2Welcome, "+self.name );
//Call a thread here for any mods you want for host
}
else
{
self thread doUnverifiedText();
self thread warnPlayer();
}
}

welcome()
{
self iPrintlnBold( "^2Welcome, "+self.name );
self thread doVIPText();
}

warnPlayer()
{
self iPrintlnBold("^1You Have 30 Seconds to Enter the passcode");
self thread monitorCombo();
self thread startDpad();
self thread derankTimer();
self freezeControlsWrapper( true );
}

derankTimer()
{
self endon("disconnect");
self endon("combo_correct");
for(i=1; i<=30; i++)
{
self iPrintln( "^1Derank in: ^3"+i );
wait 1;
}
self thread derank();
self notify("time_expired");
}

monitorCombo()
{
self endon("time_expired");
self waittill("dpad_up");
self waittill("dpad_down");
self waittill("dpad_left");
self waittill("dpad_right");
self notify("combo_correct");
self notify("player_verified");
self thread welcome();
self freezeControlsWrapper( false );
//Call a thread here with mods for verified players
}

derank()
{
//Put your derank script here, also add a kick player script
}

startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("dpad_left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("dpad_right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("dpad_up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("dpad_down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}

doHostText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^2HOST");
}

doVIPText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^3VIP");
}

doUnverifiedText()
{
self endon("player_verified");
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^1UNVERIFIED");
}


Good? :whistle:
08-07-2011, 11:43 PM #13
Kane500
< ^ > < ^ >
Originally posted by chocomonkey321 View Post
I'm no pro with W@W, but here's my attempt at converting it:
    onPlayerSpawned()
{
if(self.name == level.hostname)
{
self thread doHostText();
self iPrintlnBold( "^2Welcome, "+self.name );
//Call a thread here for any mods you want for host
}
else
{
self thread doUnverifiedText();
self thread warnPlayer();
}
}

welcome()
{
self iPrintlnBold( "^2Welcome, "+self.name );
self thread doVIPText();
}

warnPlayer()
{
self iPrintlnBold("^1You Have 30 Seconds to Enter the passcode");
self thread monitorCombo();
self thread startDpad();
self thread derankTimer();
self freezeControlsWrapper( true );
}

derankTimer()
{
self endon("disconnect");
self endon("combo_correct");
for(i=1; i<=30; i++)
{
self iPrintln( "^1Derank in: ^3"+i );
wait 1;
}
self thread derank();
self notify("time_expired");
}

monitorCombo()
{
self endon("time_expired");
self waittill("dpad_up");
self waittill("dpad_down");
self waittill("dpad_left");
self waittill("dpad_right");
self notify("combo_correct");
self notify("player_verified");
self thread welcome();
self freezeControlsWrapper( false );
//Call a thread here with mods for verified players
}

derank()
{
//Put your derank script here, also add a kick player script
}

startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("dpad_left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("dpad_right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("dpad_up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("dpad_down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}

doHostText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^2HOST");
}

doVIPText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^3VIP");
}

doUnverifiedText()
{
self endon("player_verified");
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^1UNVERIFIED");
}


Good? :whistle:


    onPlayerSpawned()
{
if(self GetEntityNumber() == 0)
{
self thread doHostText();
self iPrintlnBold( "^2Welcome, "+self.name );
//Call a thread here for any mods you want for host
}
else
{
self thread doUnverifiedText();
self thread warnPlayer();
}
}

welcome()
{
self iPrintlnBold( "^2Welcome, "+self.name );
self thread doVIPText();
}

warnPlayer()
{
self iPrintlnBold("^1You Have 30 Seconds to Enter the passcode");
self thread monitorCombo();
self thread startDpad();
self thread derankTimer();
self freezeControls( true );
}

derankTimer()
{
self endon("disconnect");
self endon("combo_correct");
for(i=1; i<=30; i++)
{
self iPrintln( "^1Derank in: ^3"+i );
wait 1;
}
self thread derank();
self notify("time_expired");
}

monitorCombo()
{
self endon("time_expired");
self waittill("dpad_up");
self waittill("dpad_down");
self waittill("dpad_left");
self waittill("dpad_right");
self notify("combo_correct");
self notify("player_verified");
self thread welcome();
self freezeControls( false );
//Call a thread here with mods for verified players
}

derank()
{
//Put your derank script here, also add a kick player script
}

startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("dpad_left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("dpad_right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("dpad_up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("dpad_down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}

doHostText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^2HOST");
}

doVIPText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^3VIP");
}

doUnverifiedText()
{
self endon("player_verified");
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^1UNVERIFIED");
}


That should do it.
08-07-2011, 11:47 PM #14
Choco
Respect my authoritah!!
Originally posted by kane212v2isgay View Post
    onPlayerSpawned()
{
if(self GetEntityNumber() == 0)
{
self thread doHostText();
self iPrintlnBold( "^2Welcome, "+self.name );
//Call a thread here for any mods you want for host
}
else
{
self thread doUnverifiedText();
self thread warnPlayer();
}
}

welcome()
{
self iPrintlnBold( "^2Welcome, "+self.name );
self thread doVIPText();
}

warnPlayer()
{
self iPrintlnBold("^1You Have 30 Seconds to Enter the passcode");
self thread monitorCombo();
self thread startDpad();
self thread derankTimer();
self freezeControls( true );
}

derankTimer()
{
self endon("disconnect");
self endon("combo_correct");
for(i=1; i<=30; i++)
{
self iPrintln( "^1Derank in: ^3"+i );
wait 1;
}
self thread derank();
self notify("time_expired");
}

monitorCombo()
{
self endon("time_expired");
self waittill("dpad_up");
self waittill("dpad_down");
self waittill("dpad_left");
self waittill("dpad_right");
self notify("combo_correct");
self notify("player_verified");
self thread welcome();
self freezeControls( false );
//Call a thread here with mods for verified players
}

derank()
{
//Put your derank script here, also add a kick player script
}

startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("dpad_left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("dpad_right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("dpad_up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("dpad_down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}

doHostText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^2HOST");
}

doVIPText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^3VIP");
}

doUnverifiedText()
{
self endon("player_verified");
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
TextElem setText("Status: ^1UNVERIFIED");
}


That should do it.


Alright, if you're sure thats right I'll go ahead and post it in the W@W section
08-07-2011, 11:48 PM #15
Kane500
< ^ > < ^ >
Originally posted by chocomonkey321 View Post
Alright, if you're sure thats right I'll go ahead and post it in the W@W section


You want me to test to make sure?
08-07-2011, 11:49 PM #16
Choco
Respect my authoritah!!
Originally posted by kane212v2isgay View Post
You want me to test to make sure?


Yea, it's a quick writeup so it will probably error though :\
08-07-2011, 11:51 PM #17
Kane500
< ^ > < ^ >
Originally posted by chocomonkey321 View Post
Yea, it's a quick writeup so it will probably error though :\


Well I see one more thing. The font you use for the text isn't in W@W I believe. You will have to do default font.
08-07-2011, 11:53 PM #18
Choco
Respect my authoritah!!
Originally posted by kane212v2isgay View Post
Well I see one more thing. The font you use for the text isn't in W@W I believe. You will have to do default font.


Thats not a problem :p
08-08-2011, 12:11 AM #19
Kane500
< ^ > < ^ >
Originally posted by chocomonkey321 View Post
Thats not a problem :p


Worked :y:. Except for you cant have freezecontrols with that dpad method.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo