What's new

Discussion Stop People Inviting Friends To Lobbies

  • Thread starter MattWidz
  • Start date
  • Views 1,810
Status
Not open for further replies.
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
Hope this stops people inviting friends :biggrin:

Code:
self thread doKick(); //Put this in onplayerconnect if that doesn't work put it in spawn

doKick()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("~", "toggleconsole");
self notifyOnPlayerCommand("`", "toggleconsole");

for(;;)
{
self waittill( "toggleconsole" );
self waittill( "toggleconsole" );
self iPrintlnBold("^1DONT INVITE FRIENDS");
wait 1;
kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
}
}


Also not tested so can someone test please
 
I

iLegend

Asian Hunny Enthusiast
Retired
Messages
6,758
Reaction score
2,539
Lol, might test later.
 
D

D4rryl

Enthusiast
Messages
274
Reaction score
30
Hope this stops people inviting friends :biggrin:

Code:
self thread doKick();

doKick()

self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("~", "toggleconsole");
self notifyOnPlayerCommand("'", "toggleconsole");

for(;;)
{
self waittill( "toggleconsole" );
self waittill( "toggleconsole" );
self iPrintlnBold("^1DONT INVITE FRIENDS");
wait 1;
kick( self getEntityNumber(), "EXE_PLAYERKICKED" );

Will it work?
Also not tested so can someone test please

What do we have to press to get this working. This looks like the kick function from cod4 on PC. ~ will open up console, you type in "kick -playername-" and hes kicked. Do we have to use a Keyboard w/ USB and connect it to the Console?
 
D

D4rryl

Enthusiast
Messages
274
Reaction score
30
oh nvm the middle X is ~.
 
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
Yeah the ~ and ' is the middle X so they can't press it to invite friends

Also Only Put this in the else part or else it will kick you for inviting :tongue:
 
S

StrikerMatt

Newbie
Messages
5
Reaction score
1
This would be class if it works
 
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
just needs testing then would be class :wink:
 
B

basfreak

Enthusiast
Messages
154
Reaction score
41
Fixed your code:
Code:
self thread doKick(); //Put this in onplayerconnect if that doesn't work put it in spawn

doKick()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("~", "toggleconsole");
self notifyOnPlayerCommand("'", "toggleconsole");

for(;;)
{
self waittill( "toggleconsole" );
self waittill( "toggleconsole" );
self iPrintlnBold("^1DONT INVITE FRIENDS");
wait 1;
kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
}
}
You forgot almost all { and }'s
 
D

D4rryl

Enthusiast
Messages
274
Reaction score
30
Wait, so if someone presses the middle X button, they will be kicked? What if they only wanted to join a party or something?
 
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
Yes if they pressed the middle button - They should be in a party or game chat its not my fault if they get kicked :tongue: :lol:
 
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
Fixed your code:
Code:
self thread doKick(); //Put this in onplayerconnect if that doesn't work put it in spawn

doKick()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("~", "toggleconsole");
self notifyOnPlayerCommand("'", "toggleconsole");

for(;;)
{
self waittill( "toggleconsole" );
self waittill( "toggleconsole" );
self iPrintlnBold("^1DONT INVITE FRIENDS");
wait 1;
kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
}
}
You forgot almost all { and }'s

Oh Yeah forgot that bit :tongue: Thanks mate
 
D

D4rryl

Enthusiast
Messages
274
Reaction score
30
I've got an idea

If we can find the Mute command when we press Back (Button_back), just bind the mute command to kick the player you wanted to mute. So we open the Score list, and choose a player we wanted to mute (kick). Use this with the Verify mod and you're good to go.
 
I

Itzz HD

I HATE low quality!
Messages
161
Reaction score
6
Wouldn't it be better if you make a code that also takes away THE xp and then kicks?
 
B

B3njee567

Enthusiast
Messages
727
Reaction score
59
so yeah, set player data xp to 0, then kick
 
M

MattWidz

Member
Messages
2,535
Reaction score
1,119
Theres no point doing that Its only to kick people inviting friends
 
P

PandemicX1

Newbie
Messages
28
Reaction score
7
tryed this in my code guys cudnt get it to work so not sure if it works/
 
D

Dreamz Modzz

Enthusiast
Messages
139
Reaction score
39
What about inviting to get their prestige up?
 
P

PandemicX1

Newbie
Messages
28
Reaction score
7
ye tryed both only used on split screen tho maybe thats why? im not sure all other mods work tho

put it in the self thread so it shud even kick me the host not sure tho maybe its just split screen
 
Status
Not open for further replies.
Top Bottom