• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] bj_isSinglePlayer

Status
Not open for further replies.

NEL

NEL

Level 6
Joined
Mar 6, 2017
Messages
113
How does bj_isSinglePlayer works?

  • Map Protection
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: if bj_isSinglePlayer then
      • Game - Display to (All players) the text: Singleplayer Mode?
      • Custom script: else
      • Game - Display to (All players) the text: Lan Mode?
      • Custom script: endif
 

NEL

NEL

Level 6
Joined
Mar 6, 2017
Messages
113
would it matter for you if player plays solo in LAN?
I want to kick him once he played Singleplayer Mode. That's why i'm trying to use bj_isSinglePlayer, but it didn't work.

ReloadGameCachesFromDisk() will return true if the game is played offline, false if LAN or over Battle.net.
JASS:
function InitTrig_Map_Protection takes nothing returns nothing
    if ReloadGameCachesFromDisk() then
        call EndGame( true )
    endif
endfunction

Good, Thanks.

+rep
 
Status
Not open for further replies.
Top