• 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.

[JASS] Would this work in multiplayer?

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
:p If this actually works i would pee myself ^^

If this work this should enable cheats for one player only
JASS:
function LocalCheat takes player P, string cheat returns nothing
    if (GetLocalPlayer() == P) then
        call Cheat(cheat) 
    endif
endfunction

And the call
JASS:
[...]
call LocalCheat(Player(0), "whosyourdaddy")
[...]

^^
 
Level 18
Joined
Oct 18, 2007
Messages
930
ok here it is
JASS:
        call Cheat("godmode") // currently bugged
        call Cheat("warnings")
        call Cheat("fastbuild")
        call Cheat("techtree")
        call Cheat("research")
        call Cheat("food")
        call Cheat("mana")
        call Cheat("dawn")
        call Cheat("gold " + I2S(gold))
        call Cheat("lumber " + I2S(lumber))

so to use the cheat you could do this
JASS:
call LocalCheat(Player(0), "gold " + I2S(10000))
call LocalCheat(Player(0), "lumber " + I2S(1000))
call LocalCheat(Player(0), "mana")
call LocalCheat(Player(0), "fastbuild")
 
Level 7
Joined
Jul 20, 2008
Messages
377
Not to mention that all code is technically local. You're just running the code locally for all players.
 
Status
Not open for further replies.
Top