What's new

Discussion Stop People Inviting Friends To Lobbies

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

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
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
 
iLegend

iLegend

Asian Hunny Enthusiast
Retired
Experienced Veteran MotM Hardened Veteran
Messages
6,756
Reaction score
2,539
Points
755
Sin$
0
Lol, might test later.
 
D4rryl

D4rryl

Enthusiast
Messages
274
Reaction score
30
Points
85
Sin$
7
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?
 
MattWidz

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
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:
 
MattWidz

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
just needs testing then would be class :wink:
 
basfreak

basfreak

Enthusiast
Messages
154
Reaction score
41
Points
85
Sin$
7
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
 
D4rryl

D4rryl

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

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
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:
 
MattWidz

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
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
 
D4rryl

D4rryl

Enthusiast
Messages
274
Reaction score
30
Points
85
Sin$
7
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.
 
Itzz HD

Itzz HD

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

B3njee567

Enthusiast
Messages
727
Reaction score
59
Points
95
Sin$
0
so yeah, set player data xp to 0, then kick
 
MattWidz

MattWidz

Member
Programmer Forum Addict
Messages
2,535
Reaction score
1,119
Points
510
Sin$
0
Theres no point doing that Its only to kick people inviting friends
 
P

PandemicX1

Newbie
Messages
28
Reaction score
7
Points
45
Sin$
0
tryed this in my code guys cudnt get it to work so not sure if it works/
 
Dreamz Modzz

Dreamz Modzz

Enthusiast
Messages
139
Reaction score
39
Points
85
Sin$
0
What about inviting to get their prestige up?
 
P

PandemicX1

Newbie
Messages
28
Reaction score
7
Points
45
Sin$
0
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
Login
Register