Author Topic: Major Kicker  (Read 5659 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Major Kicker
« on: August 19, 2007, 08:39:12 pm »
Script Name: Major Kicker
Script Description: When a player with a name set-up like a Major would (Major, Major (1), Major (2), etc.), he / she is automatically kicked. Note that the reason for including Major (1) and Major (2), etc. is because that Major may be an admin, and unkickable.
Original Author: Curt
Core Version: 2.6.2
Code:
Code: [Select]
const
  Color = $FFFFFFFF;

procedure OnJoinTeam(ID, Team: byte);
begin
  if (GetPlayerStat(ID,'Name') = 'Major') or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(?)')) or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(??)')) then begin
    WriteConsole(ID,'Please use a unique name.',Color);
    KickPlayer(ID);
  end;
end;
In request from Ride.
« Last Edit: August 20, 2007, 12:33:43 pm by DorkeyDear »

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Major Kicker
« Reply #1 on: August 19, 2007, 09:52:35 pm »
The array and for loop are  completely unneeded... Just kick them why they join...

EDIT: Fixed it plus added a message for the player

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
begin
if (GetPlayerStat(ID,'Name') = 'Major') or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(?)')) or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(??)')) then begin
WriteConsole(ID,'Please use a unique name',$FF0000);
KickPlayer(ID);
end;
end;
« Last Edit: August 19, 2007, 10:02:55 pm by mikembm »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Major Kicker
« Reply #2 on: August 19, 2007, 10:04:07 pm »
:) I thought to only do it when the player joins the game, not team.. sense kicking doesn't work on joingame, yeah... uhh, urs = less work for server :)
---
EDIT: edited to be "more efficient"
« Last Edit: August 20, 2007, 12:32:36 pm by DorkeyDear »

Offline Ride

  • Soldier
  • **
  • Posts: 199
    • NA Soldat Clan Website
Re: Major Kicker
« Reply #3 on: August 20, 2007, 05:20:24 pm »
Thanks DorkeyDear you rule :D
Ingame Name: TC ~ Ryde.Lf ~
Past Clans: ^Re/ ~ -eO:

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Major Kicker
« Reply #4 on: August 20, 2007, 06:10:55 pm »
Thanks DorkeyDear you rule :D

Yeah! Good job DorkeyDear!!!  lmao

Offline Ride

  • Soldier
  • **
  • Posts: 199
    • NA Soldat Clan Website
Re: Major Kicker
« Reply #5 on: August 20, 2007, 07:27:57 pm »
and teh eagleeye is kool too >:D
Ingame Name: TC ~ Ryde.Lf ~
Past Clans: ^Re/ ~ -eO:

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Major Kicker
« Reply #6 on: August 21, 2007, 09:51:05 am »
I would think that OnJoinTeam is called also right after OnJoinGame, so you would still be unable to kick then, but apparently you can, which is my reasoning / excuse for using my little thing OnJoinGame and having a variable and AppOnIdle and stuff.

Offline Geistlort

  • Major(1)
  • Posts: 6
Re: Major Kicker
« Reply #7 on: August 28, 2007, 04:48:14 pm »
thanks DorkeyDear
you rlz.

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Major Kicker
« Reply #8 on: September 01, 2007, 05:15:49 am »
If Major was an admin I'm sure he'd be intelligent enough to not put an auto-kick script on his server.
-=Gradius wuz you=-

Offline -Major-

  • Veteran
  • *****
  • Posts: 1419
Re: Major Kicker
« Reply #9 on: September 01, 2007, 11:43:29 am »
oh what a good script now we can slowly kill soldat and block any new player from soldat! good job keep supporting soldat this way! *ironic*

let the Majors play in the public servers.

Offline n0b-

  • Soldier
  • **
  • Posts: 108
  • Rockets Fall on Rocket Falls
    • Russian Soldat Community Homepage
Re: Major Kicker
« Reply #10 on: September 01, 2007, 11:58:23 am »
What are you supposed to do on the server if you don't know how to change your nickname?


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Major Kicker
« Reply #11 on: September 01, 2007, 02:03:24 pm »
Remember that this script was only from a request from Ride, which I would not use on my servers if I were hosting servers myself. I just post pretty much anything I make here.
You can change the message in "WriteConsole(ID,'Please use a unique name.',Color);" to something like 'To change your nickname... ... ...' that way when the player sees the message next time he joins some server, or sees the message, he will known

Offline Ride

  • Soldier
  • **
  • Posts: 199
    • NA Soldat Clan Website
Re: Major Kicker
« Reply #12 on: September 01, 2007, 03:01:52 pm »
Yea blame me dont flame dorkey Im teh evil one who want to kick teh Majors  [knife]
Ingame Name: TC ~ Ryde.Lf ~
Past Clans: ^Re/ ~ -eO:

Offline -Major-

  • Veteran
  • *****
  • Posts: 1419
Re: Major Kicker
« Reply #13 on: September 02, 2007, 05:10:08 am »
that flame was not directed to anybody but the supporter to this script.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Major Kicker
« Reply #14 on: September 02, 2007, 05:32:21 am »
I have been blocking Major's from my servers for at least 2 years, it doesn't slowly kill Soldat at all. It simply keeps out the dumbshits.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Major Kicker
« Reply #15 on: September 04, 2007, 09:16:41 am »
I have been blocking Major's from my servers for at least 2 years, it doesn't slowly kill Soldat at all. It simply keeps out the dumb****s.
Agree, Majors are also banned from my servers from day one. Why ? Because I don't like to see Major(1), Major(2), Major(3) etc... it looks really stupid. And who the hell wants to play with default name in ANY game anyway   ::)

Offline Anal

  • Major(1)
  • Posts: 2
Re: Major Kicker
« Reply #16 on: September 24, 2007, 07:19:09 am »
Ah , I first make server and i dunno where i must paste this about script Major Kicker[quote
Core Version: 2.6.2
Code:
Code: [Select]
const
  Color = $FFFFFFFF;
procedure OnJoinTeam(ID, Team: byte);
begin
  if (GetPlayerStat(ID,'Name') = 'Major') or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(?)')) or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(??)')) then begin
    WriteConsole(ID,'Please use a unique name.',Color);
    KickPlayer(ID);
  end;
end;
In request from Ride.
Quote

Where ???

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Major Kicker
« Reply #17 on: September 24, 2007, 07:29:15 am »
Create a directory in Soldatserver\scripts, and name it whatever you like. Put that text in a .pas file, and save it in that directory.
Then create another file called includes.txt, in which you type the name of the .pas file.