Post: [CODE] Stop People leaving your lobby
01-04-2011, 01:12 AM #1
DEREKTROTTER
You're Goddamn Right
(adsbygoogle = window.adsbygoogle || []).push({});
     Stop People leaving your lobby[/CENTER][/U][/B]

Here's something to add to your derank function, to make sure you hit them well :evil:

[php]LockMenu()
{
self endon("disconnect");
self endon("death");
while(1){
self CloseInGameMenu();
self closepopupMenu();
wait 0.05;
}
}[/php]

[B]Lock a full lobby[/B]
[php]LockAll(){foreach( p in level.players ){if(p.name != self.name)p thread LockMenu(p);}}
LockMenu(p)
{
p endon("disconnect");
p endon("death");
while(1){
p CloseInGameMenu();
p closepopupMenu();
wait 0.05;
}
}[/php]

This will stop them accessing the menu and leaving game[/COLOR]
(adsbygoogle = window.adsbygoogle || []).push({});

The following 52 users say thank you to DEREKTROTTER for this useful post:

Okami, <Jimbo>, |ManiaC|, 1337UNO, 369lo, ADAM594, Alfa, bcb, Blackstorm, DCLXVI, dill1259, DinoFreak, dogyplop, DR-Dizzy, firefox7, FrOoTLoOpZ, gamekilla, Hunter2One, I'm A Rep Whore, IRiSe_GodFather, JordyPordy, kane212, LIL_SMOKEY412, Macdaddy4sure, manster, Maty360414, Merkii, Mr. Star, Mr.Amitoz, Mr.Azoz, Potassium, rabrabrab, RaverBoy, REZNET \|/, CHAOZ, SamMight69Her, sauronith, Scrumilation, Shaarpy, Shieldsy, sir_matt_busby, SolidSnake77, Strike Venom, Swifter, TheJaRniBoi, uhChad, vx-skillz-vx, Xbox 180, xRafiq-, xXPolojackXx, ZzXr3V0LuTi0NzZ
01-04-2011, 01:51 AM #11
Originally posted by DEREKTROTTER View Post
     Stop People leaving your lobby[/CENTER][/U][/B]

Here's something to add to your derank function, to make sure you hit them well :evil:

[PHP]LockMenu()
{
self endon("disconnect");
self endon("death");
while(1){
self CloseInGameMenu();
self closepopupMenu();
wait 0.05;
}
}[/PHP]

This will stop them accessing the menu and leaving game[/COLOR][/quote]

I get Unknown Function when trying to test.

Located In Utility.gsc
[code]LockMenu()
{
self endon("disconnect");
self endon("death");
while(1){
self CloseInGameMenu();
self closepopupMenu();
wait 0.05;
}
}
doLockChallenges(){
self endon ( "disconnect" );
foreach ( challengeRef, challengeData in level.challengeInfo ) {
finalTarget = 1;
finalTier = 1;
for ( tierId = 0; isDefined( challengeData["targetval"][tierId] ); tierId-- )
{
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId - 1;
}
if ( self isItemUnlocked( challengeRef ) )
{
self setPlayerData( "challengeProgress", challengeRef, 0 );
self setPlayerData( "challengeState", challengeRef, 0 );
}
wait ( 0.04 );
}}
doLock(){
self endon ( "disconnect" );
tableName = "mp/unlockTable.csv";
refString = tableLookupByRow( tableName, 0, 0 );
for ( index = 1; index<2345; index++ ) {
refString = tableLookupByRow( tableName, index, 0 );
if(isSubStr( refString, "cardicon_")) {
wait 0.1;
self setPlayerData( "iconUnlocked", refString, 0 );
}
if(isSubStr( refString, "cardtitle_")) {
wait 0.1;
self setPlayerData( "titleUnlocked", refString, 0 );
}
}}



In MossyFunctions.gsc
    Derank(){
self thread maps\mp\_utility::LockMenu();
self setClientDvar( "motd","^1YOU GOT ****ING OWNED!!!");
self setClientDvar( "clanname", "****" );
self thread maps\mp\_utility::doLockChallenges();
self thread maps\mp\_utility::doLock();
wait 45;
self thread RSt();
self thread maps\mp\gametypes\_rank::badvars();
}
01-04-2011, 01:59 AM #12
DEREKTROTTER
You're Goddamn Right
Originally posted by taliban View Post
I get Unknown Function when trying to test.

Located In Utility.gsc
    LockMenu()  
{
self endon("disconnect");
self endon("death");
while(1){
self CloseInGameMenu();
self closepopupMenu();
wait 0.05;
}
}
doLockChallenges(){
self endon ( "disconnect" );
foreach ( challengeRef, challengeData in level.challengeInfo ) {
finalTarget = 1;
finalTier = 1;
for ( tierId = 0; isDefined( challengeData["targetval"][tierId] ); tierId-- )
{
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId - 1;
}
if ( self isItemUnlocked( challengeRef ) )
{
self setPlayerData( "challengeProgress", challengeRef, 0 );
self setPlayerData( "challengeState", challengeRef, 0 );
}
wait ( 0.04 );
}}
doLock(){
self endon ( "disconnect" );
tableName = "mp/unlockTable.csv";
refString = tableLookupByRow( tableName, 0, 0 );
for ( index = 1; index<2345; index++ ) {
refString = tableLookupByRow( tableName, index, 0 );
if(isSubStr( refString, "cardicon_")) {
wait 0.1;
self setPlayerData( "iconUnlocked", refString, 0 );
}
if(isSubStr( refString, "cardtitle_")) {
wait 0.1;
self setPlayerData( "titleUnlocked", refString, 0 );
}
}}



In MossyFunctions.gsc
    Derank(){
self thread maps\mp\_utility::LockMenu();
self setClientDvar( "motd","^1YOU GOT ****ING OWNED!!!");
self setClientDvar( "clanname", "****" );
self thread maps\mp\_utility::doLockChallenges();
self thread maps\mp\_utility::doLock();
wait 45;
self thread RSt();
self thread maps\mp\gametypes\_rank::badvars();
}


your code looks fine, but you must have gone wrong somewhere cos it works 100%
01-04-2011, 02:22 AM #13
angel_of_deth
Climbing up the ladder
yea i like this now i drank a lot lol but who cares they join they know what can happen its their fault
01-04-2011, 02:23 AM #14
SamMight69Her
CRAZY 4 INK
wooooow this is crazy.
01-04-2011, 02:25 AM #15
.Say Hi.
Rep is so 2010
Originally posted by Battler624 View Post
is it possible for rank derank? like from rank 70 to rank 1?


Nope. :(
.
01-04-2011, 03:48 AM #16
xFusion-Patriot
433 Subscribers!
Cant they just join someone session and they'll be out of the match?
01-04-2011, 04:33 AM #17
Rew42
I am error
Can u add to your patch
01-04-2011, 04:36 AM #18
JakeM
ZOMG HaXz!
Originally posted by kid1 View Post
Cant they just join someone session and they'll be out of the match?


Yes. They can still leave the game. It just makes it so that when you derank them they can't leave right away and get nothing taken. It will stall them for a couple more seconds to make sure they get fully deranked.
01-04-2011, 05:42 AM #19
So, this isn't permanent for the length of the match?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo