Hey all. I was thinking of implementing a cheat or 2 into some maps, but i dont like to use them myself (the cheats). What line can I slap into the jass to say, If player "X" is playing, then disable all the cheats?
This way, the peeps can enjoy all the cheats they want, but when I play, I get to enjoy the fairness.
cheats disabled if "player x" is playing???
Moderator: Cheaters
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: cheats disabled if "player x" is playing???
Hmm not sure how to do that (probably have to do with GetPlayerName)
But I know how to make it so if you say "-disable" cheats don't work... =/
For instances in areo's/Dekar's/mine
it would go like:
if SubString(s,0,8)=="-disable"then
call DisableTrigger(CHEATS)
But I know how to make it so if you say "-disable" cheats don't work... =/
For instances in areo's/Dekar's/mine
it would go like:
if SubString(s,0,8)=="-disable"then
call DisableTrigger(CHEATS)
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
-
- Senior Member
- Posts: 101
- Joined: June 1st, 2007, 9:05 pm
Re: cheats disabled if "player x" is playing???
Something like this.
And you could run that function, if it retruns true, then you disable the cheat triggers.
Code: Select all
function AreYouInTheGamelawl takes nothing returns boolean
local integer i=0
loop
exitwhen i>12
if GetPlayerName(Player(i))=="Vegas" then
return true
endif
set i=i+1
endloop
return false
endfunction
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: cheats disabled if "player x" is playing???
Should be...
exitwhen i>11 (Who is Player(12) ? )
And, it's better like this imo
To use, simply do
'call AreYouInTheGamelawl()' in Map Initialization or whenever it's to be checked.
exitwhen i>11 (Who is Player(12) ? )
And, it's better like this imo
Code: Select all
function AreYouInTheGamelawl takes nothing returns nothing
local integer i=0
loop
exitwhen i>11
if GetPlayerName(Player(i))=="Vegas" then
call DisableTrigger(....CheatTriggerHere)
return
endif
set i=i+1
endloop
endfunction
'call AreYouInTheGamelawl()' in Map Initialization or whenever it's to be checked.
-
- Shopping Maul USA Creator
- Posts: 1797
- Joined: January 18th, 2007, 11:07 am
- Title: No Comment
- Location: Calgary Canada
- Has thanked: 88 times
- Been thanked: 8 times
Re: cheats disabled if "player x" is playing???
Ah, thanks guys. will give it a try then for one of my upcoming maps.