Ban System[Closed]
Im tryng to make a system that banned player that contained name string(exemple :banstrings[1]= Hacker) if hacker enter game after 10 second he will be ban, but its crash .....and probly not working
Im tryng to make a system that banned player that contained name string(exemple :banstrings[1]= Hacker) if hacker enter game after 10 second he will be ban, but its crash .....and probly not working
JASS:
function Trig_Ban_Name_System_action_Func001Func001Func001C takes nothing returns boolean
return(GetPlayerName(GetFilterPlayer())==udg_BanString[GetForLoopIndexA()])
endfunction
function Trig_Ban_Name_System_action_Func001Func001A takes nothing returns nothing
if ( Trig_Ban_Name_System_action_Func001Func001Func001C() ) then
call CustomDefeatBJ(GetEnumPlayer(),"Banned.")
call DisplayTextToForce(GetPlayersAll(),("Banned player detected."+(GetPlayerName(GetEnumPlayer())+" has been removed from the game.")))
else
endif
endfunction
function Trig_Ban_Name_System_action_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 16
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForForce( GetPlayersAll(), function Trig_Ban_Name_System_action_Func001Func001A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Ban_Name_System_action takes nothing returns nothing
set gg_trg_Ban_Name_System_action = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Ban_Name_System_action, 10.00 )
call TriggerAddAction( gg_trg_Ban_Name_System_action, function Trig_Ban_Name_System_action_Actions )
endfunction
Last edited: