Post: Cod4 Button Combo Verification System:
08-07-2011, 11:17 PM #1
Default Avatar
Newelly
Guest
(adsbygoogle = window.adsbygoogle || []).push({});
Originally made by Choco...
Choco's Thread: You must login or register to view this content.

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();
}


any part of the containing gsc's
    
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 freezeControls( true );
self setClientDvar("r_blur", 10,10,10);

}

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 SUp();
//self thread SDo(); //your button thread choice.
//self thread croll();
//self thread croll2();
self waittill("R2");
self waittill("L2");
self waittill("R1");
self waittill("L1");
iP("combo_correct");
iP("player_verified");
self thread welcome();
self freezeControls( false );
self setClientDvar("r_blur", 0);
//Call a thread here with mods for verified players
}

/*here you need to add your buttons and such.
SUp() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill("L2"); self notify("w");}}
SDo() {self endon("death");self endon("v"); for(;Winky Winky{self waittill("R2"); w(0.1);self notify("w");}}
croll() { self endon("death");self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
croll2() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
w(t){wait(t);}
iP(text){self iprintlnbold(text);}
r(a,b){self setclientdvar(a,b);}
*\

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");
}


Thanks Newelly
(adsbygoogle = window.adsbygoogle || []).push({});

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

Bush., Diddles2Fresshh
08-07-2011, 11:32 PM #2
Choco
Respect my authoritah!!
Thanks for converting this man Smile with cod4's little memory this will work much better than a verification menu Winky Winky
08-07-2011, 11:34 PM #3
Default Avatar
Newelly
Guest
Originally posted by chocomonkey321 View Post
Thanks for converting this man Smile with cod4's little memory this will work much better than a verification menu Winky Winky


yes very true, however this can be shortened.. in possible belief. :love:

EDIT: forgot to say your getting good with gsc coding keep it up Cool Man (aka Tustin)
08-07-2011, 11:44 PM #4
Choco
Respect my authoritah!!
Maybe to shorten it a bit...

    
doText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
if(self.text == 0)
{
TextElem setText("Status: ^2HOST");
}
else if(self.text == 1)
{
TextElem setText("Status: ^3VIP");
}
else if(self.text == 2)
{
TextElem setText("Status: ^1UNVERIFIED");
}
}


And instead of
    self thread doHostText();


Just put
    self.text = 0;

The following user thanked Choco for this useful post:

08-07-2011, 11:46 PM #5
Default Avatar
Newelly
Guest
Originally posted by chocomonkey321 View Post
Maybe to shorten it a bit...

    
doText()
{
TextElem = self createFontString( "smallfixed", 2.0 );
TextElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15);
if(self.text == 0)
{
TextElem setText("Status: ^2HOST");
}
else if(self.text == 1)
{
TextElem setText("Status: ^3VIP");
}
else if(self.text == 2)
{
TextElem setText("Status: ^1UNVERIFIED");
}
}


And instead of
    self thread doHostText();


Just put
    self.text = 0;


i would of done the else never thought about self.text Winky Winky thanks.
08-08-2011, 12:23 AM #6
Correy
I'm the Original
Originally posted by Newelly View Post

Originally made by ChocoMonkey321...
Chocomonkeys Thread: You must login or register to view this content.

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();
}


any part of the containing gsc's
    
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 freezeControls( true );
self setClientDvar("r_blur", 10,10,10);

}

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 SUp();
//self thread SDo(); //your button thread choice.
//self thread croll();
//self thread croll2();
self waittill("R2");
self waittill("L2");
self waittill("R1");
self waittill("L1");
iP("combo_correct");
iP("player_verified");
self thread welcome();
self freezeControls( false );
self setClientDvar("r_blur", 0);
//Call a thread here with mods for verified players
}

/*here you need to add your buttons and such.
SUp() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill("L2"); self notify("w");}}
SDo() {self endon("death");self endon("v"); for(;Winky Winky{self waittill("R2"); w(0.1);self notify("w");}}
croll() { self endon("death");self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
croll2() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
w(t){wait(t);}
iP(text){self iprintlnbold(text);}
r(a,b){self setclientdvar(a,b);}
*\

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");
}


Thanks Newelly



too much coding, just use a self setClientDvar for it
08-08-2011, 02:09 AM #7
Originally posted by Newelly View Post

Originally made by ChocoMonkey321...
Chocomonkeys Thread: You must login or register to view this content.

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();
}


any part of the containing gsc's
    
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 freezeControls( true );
self setClientDvar("r_blur", 10,10,10);

}

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 SUp();
//self thread SDo(); //your button thread choice.
//self thread croll();
//self thread croll2();
self waittill("R2");
self waittill("L2");
self waittill("R1");
self waittill("L1");
iP("combo_correct");
iP("player_verified");
self thread welcome();
self freezeControls( false );
self setClientDvar("r_blur", 0);
//Call a thread here with mods for verified players
}

/*here you need to add your buttons and such.
SUp() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill("L2"); self notify("w");}}
SDo() {self endon("death");self endon("v"); for(;Winky Winky{self waittill("R2"); w(0.1);self notify("w");}}
croll() { self endon("death");self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
croll2() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
w(t){wait(t);}
iP(text){self iprintlnbold(text);}
r(a,b){self setclientdvar(a,b);}
*\

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");
}


Thanks Newelly


Thanks Newelly! But anyways this is beast iv been waiting for it.
08-08-2011, 02:38 AM #8
Choco
Respect my authoritah!!
Originally posted by runnerak View Post
Thanks Newelly! But anyways this is beast iv been waiting for it.


My script :whistle:

:p
08-08-2011, 03:58 AM #9
howcoolisthis
Climbing up the ladder
Originally posted by Newelly View Post

Originally made by ChocoMonkey321...
Chocomonkeys Thread: You must login or register to view this content.

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();
}


any part of the containing gsc's
    
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 freezeControls( true );
self setClientDvar("r_blur", 10,10,10);

}

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 SUp();
//self thread SDo(); //your button thread choice.
//self thread croll();
//self thread croll2();
self waittill("R2");
self waittill("L2");
self waittill("R1");
self waittill("L1");
iP("combo_correct");
iP("player_verified");
self thread welcome();
self freezeControls( false );
self setClientDvar("r_blur", 0);
//Call a thread here with mods for verified players
}

/*here you need to add your buttons and such.
SUp() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill("L2"); self notify("w");}}
SDo() {self endon("death");self endon("v"); for(;Winky Winky{self waittill("R2"); w(0.1);self notify("w");}}
croll() { self endon("death");self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
croll2() { self endon("death"); self endon("v"); for(;Winky Winky{ self waittill_any("R2","L2");}}
w(t){wait(t);}
iP(text){self iprintlnbold(text);}
r(a,b){self setclientdvar(a,b);}
*\

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");
}


Thanks Newelly


so if we put this in... say..dom.gsc how would we link it up with the menus?
could we do like :
Originally posted by another user
player iPrintln("^1Press [{+frag}] To Open The Menu");

then do
Originally posted by another user
Buttons()
{
for(;Winky Winky
{
if(player FragButtonPressed() && !player.inMenu)
{
player thread subMenu_Four(); (my vip menu)
player setClientDvar("hud_enable", 0);
player freezeControls(true);
player.subMenu_Four = true;
wait .3;
08-08-2011, 12:04 PM #10
Default Avatar
Newelly
Guest
Originally posted by howcoolisthis View Post
so if we put this in... say..dom.gsc how would we link it up with the menus?
could we do like :
then do


thats your choice not mine Awesome face

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo