Page 1 of 1

please help about blacklist players

Posted: May 13th, 2015, 2:42 am
by edwin211
I want to add a blacklist player into a map, can give me trigger? trigger so that when it enters the game player will kicked after loading screen..

please someone help me :(

Re: please help about blacklist players

Posted: May 13th, 2015, 7:48 pm
by haxorico
Under endglobals

Code: Select all

function blackListPlayer takes string banName returns nothing
local integer i=0
set banName=StringCase(banName,false)
loop
exitwhen i>11
if (StringCase(GetPlayerName(Player(i)),false)==banName) then
call CustomDefeatBJ(Player(i),"BANNED")
endif
set i=i+1
endloop
endfunction
Under the locals of function main

Code: Select all

call blackListPlayer("PLAYER NAME")
If you want to ban several people, just repeat the line.
Like:

Code: Select all

call blackListPlayer("Player 1")
call blackListPlayer("Player 2")