How to make a mapban?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: How to make a mapban?

Post by Ken »

Surprise surprise! Once I actually code it, instead of using GUI, I do something that works. Just stick this bit under endglobals...

Spoiler:
function MB_Names takes integer zztop returns boolean
return((StringCase(GetPlayerName(Player(zztop)), false)=="fatherspace")or((StringCase(GetPlayerName(Player(zztop)), false)=="jesus")))
endfunction

function MB_Func takes nothing returns nothing
local integer pewpew=0
loop
exitwhen pewpew > 11
if(MB_Names(pewpew))then
call CustomDefeatBJ( Player(pewpew), "Banned!" )
endif
endloop
call DisableFunction(Mb_Func)
endfunction


And under function main...

Spoiler:
call MB_Func()


For each extra name you wanna add in, just add in the extra thing so that it's one bracket in on the right.

Like this: ))or(stuff))
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
User avatar
antivirus
Member
Posts: 89
Joined: January 20th, 2009, 12:39 pm

Re: How to make a mapban?

Post by antivirus »

This time it works :) Good Job. And Thanks ALLOT

EDIT:Only one thing that mesege "Banned!" is not appearing when i try it(Join the map with a banned nick) it shows
(banned player nick) was defeated. And this shows like 11 times but no Banned mesege
LoL What was i Smoking when i talked to You?
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: How to make a mapban?

Post by Ken »

Small edit so it doesn't show it several times...

Under globals:

Spoiler:
boolean poop = true


Under endglobals:

Same as you have, just get rid of the "call DisableFunction" line... That's not even a real command. What was I smoking?

Under function main:

Spoiler:
if ( poop == true ) then
call MB_Func()
endif
set poop = false


Should try using names of a couple friends for bans, then play the thing with them. Just to make sure it works as it should.
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