• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Ban System

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
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


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:
it's picked player not matching player

this might work too
  • Kick Player
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set PlayerGroup = (All players matching ((String((Name of (Triggering player))) as Lower case) Equal to (String(BanString[(Integer A)]) as Lower case)))
          • Player Group - Pick every player in PlayerGroup and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Kicked
              • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Picked player)) + was kicked.)
and this works for sure
  • Exit Warcraft
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set PlayerGroup = (All players matching ((String((Name of (Triggering player))) as Lower case) Equal to (String(BanString[(Integer A)]) as Lower case)))
          • Player Group - Pick every player in PlayerGroup and do (Actions)
            • Loop - Actions
              • Custom script: call ExitWarcraft( GetEnumPlayer() )
              • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Picked player)) + was kicked.)
JASS:
function ExitWarcraft takes player p returns nothing
    if GetLocalPlayer() == p then
        call ExecuteFunc("Exit Warcraft")
    endif
endfunction
 

Attachments

  • kicktest.w3x
    17.1 KB · Views: 83
Level 10
Joined
Feb 20, 2008
Messages
448
Did you test it ? cuz when i test its crash o_O


this 1 work but its glitch can u help me


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:
Level 10
Joined
Feb 20, 2008
Messages
448
Poeple ban from my game will play fake hacked jj cheat packed!!My last map got so much hack and cheated, i don't want that happen in my new map!!!i dont want crash all poeple in game, i just want make the guy unable to play for good reason as hacked, hsot fake map, released private beta version you know the bizz, but well its work, i think ill deal with lol
 
Level 10
Joined
Feb 20, 2008
Messages
448
see vegetas system and think of how it will kick all players
it checks all players 16 times and kicks integer A player not picked player
I dont want all player to be kick @_@ i only want the user gets kick, The jass system i found work very good, i just hope i could have it in jass for my friend ^^!!but i think its not makable in gui

first of all, just protect the map... and if your banning a player name it doesnt take much to create a new account...

You are true but some poeple have so much friend in friend list some wont bother to create new account & player that use banlist will be able to know if its him or not by viweing IP ^^


well the system work for me now

we can close this topics :D
 
Level 7
Joined
Mar 8, 2009
Messages
360
And they can just edit your map if you don't protect it and remove your ban trigger. Just protect it with vexorians map optimizer and they will have a hard time restoring opening it.

(What do you actually mean with hack? opening your map or using gamehacks to change numbers in game?)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Like I stated before, such a system is pointless and a waste of time. Creating a new account takes 5 seconds and with spoofing in bot hosted games you do not even need to. Thus do not waste your time putting such a system in your map.

EvilNico, this thread was solved months ago, please do not necro post (revive threads solved months ago).

Thread Closed...
 
Status
Not open for further replies.
Top