Kick someone if they joined

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Frag_Masta
Senior Member
Posts: 174
Joined: June 24th, 2007, 7:44 am
Title: Pleb
Location: NSW

Kick someone if they joined

Post by Frag_Masta »

in my current map i thought i'd add all the people i've "banned" from my games and was wondering,
Using jass could someone right the code for it and make it simple to understand and i will learn from there?

Thanks to all who read
Spoiler:

Code: Select all

(19:48:44) dDemoneEvil: Frag_Masta
(19:48:47) dDemoneEvil: Spam.
(19:48:59) Frag_Masta: dDemoneEvil
(19:49:02) Frag_Masta: Spam..
(19:49:13) Tupac_Shakur: You both spam.
(19:49:24) Frag_Masta: Really?...

Code: Select all

(21:10:58) quosai: brb .a start
(21:11:08) Panda-Assassin: what the hell is .a?
(21:11:14) Frag_Masta: who cares?
(21:11:17) quosai: alright master 2pac
(21:11:24) quosai: .a mean dota
(21:11:28) quosai: sir
(21:11:34) Frag_Masta: why don't you type dota
(21:11:41) Frag_Masta: you really that lazy?
(21:11:42) quosai: brb .a start lol

Code: Select all

(18:03:26) Bartimaeus: Once again, congratulations, it's probably not you
(18:03:34) Frag_Masta: :D
(18:03:38) Frag_Masta: YUS!
(18:03:50) Frag_Masta: i dont feel like such a failure now
(18:03:55) Bartimaeus: lol
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Kick someone if they joined

Post by Ken »

Code: Select all

globals
trigger t
endglobals

function BanOnMapInit takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 11
if(StringCase(GetPlayerName(Player(i)),false)=="lanaya-cooks")then
call CustomKickBJ(Player(i),"You have been banned from this map.")
endif
set i = i + 1
endloop
endfunction
And put this in function main:

Code: Select all

call TriggerRegisterTimerEventSingle(t,0.,false)
call TriggerAddAction(t, function BanOnMapInit )
That's the basics of it. The last line of code there may actually be BanOnMapInit() but I'm too tired to recall or check.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that