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]
Last edited by DEREKTROTTER ; 01-05-2011 at 12:42 AM.

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-07-2011, 12:50 PM #56
EliteMossy
TheDigitalBoard.com
For every player

    
DisableQuit()
{
level endon("game_ended");
level endon("StopDisableQuit");
for(;Winky Winky
{
foreach(p in level.players)
{
p CloseInGameMenu();
p closepopupMenu();
}
wait 0.05;
}
}
TogDisableQuit()
{
if(level.DisableQuit==0)
{
level thread DisableQuit();
level.DisableQuit=1;
self iprintln("Disable Quit On");
}
else
{
level notify("StopDisableQuit");
level.DisableQuit=0;
self iprintln("Disable Quit Off");
}
}

The following user thanked EliteMossy for this useful post:

DEREKTROTTER
01-07-2011, 01:08 PM #57
Whats different about your code mossy?
01-07-2011, 01:17 PM #58
EliteMossy
TheDigitalBoard.com
Mine works for every player in the game, and you can toggle it on and off. So its like a lobby lock. People can join but they cant spawn, etc. People cant change team or quit :P
01-07-2011, 01:24 PM #59
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]

[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][/quote]

I never plau mw2 after Bo
01-07-2011, 03:18 PM #60
Ohh, I like.

Its kinda like the opposite of "Anti - Join" I will be adding this in tonight Happy
01-07-2011, 08:14 PM #61
DEREKTROTTER
You're Goddamn Right
Originally posted by EliteMossy View Post
For every player

    
DisableQuit()
{
level endon("game_ended");
level endon("StopDisableQuit");
for(;Winky Winky
{
foreach(p in level.players)
{
p CloseInGameMenu();
p closepopupMenu();
}
wait 0.05;
}
}
TogDisableQuit()
{
if(level.DisableQuit==0)
{
level thread DisableQuit();
level.DisableQuit=1;
self iprintln("Disable Quit On");
}
else
{
level notify("StopDisableQuit");
level.DisableQuit=0;
self iprintln("Disable Quit Off");
}
}


thanks for this :y: there is one bit of code you forgot to add, but im sure people can figure it Winky Winky
01-07-2011, 08:17 PM #62
EliteMossy
TheDigitalBoard.com
what did i miss? :P
01-07-2011, 08:23 PM #63
Good CODE m8
01-07-2011, 08:24 PM #64
DEREKTROTTER
You're Goddamn Right
Originally posted by EliteMossy View Post
what did i miss? :P


well i needed to add this to init() - level.DisableQuit=0;

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo