wc3edit.net
https://forum.wc3edit.net/

please help about blacklist players
http://forum.wc3edit.net/deprotection-cheating-f64/please-help-about-blacklist-players-t30044.html
Page 1 of 1

Author:  edwin211 [ May 13th, 2015, 2:42 am ]
Post subject:  please help about blacklist players

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 :(

Author:  haxorico [ May 13th, 2015, 7:48 pm ]
Post subject:  Re: please help about blacklist players

Under endglobals
Code:
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:
call blackListPlayer("PLAYER NAME")

If you want to ban several people, just repeat the line.
Like:
Code:
call blackListPlayer("Player 1")
call blackListPlayer("Player 2")

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/