
Does anyone still has the "Cheater Widget" which displays two or three GUI buttons to activate cheat/nocost? I think it got lost when unknown files got lost...
Moderator: Moderators
Code: Select all
function widget:GetInfo()
return {
name = "Cheat",
desc = "Cheats",
author = "Google Frog",
date = "Dec 30, 2008",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true -- loaded by default?
}
end
function widget:GameOver()
local frame = Spring.GetGameFrame()
local plist = Spring.GetPlayerList()
if (#plist == 1) and (frame < 100) then
Spring.SendCommands{"cheat"}
Spring.SendCommands{"spectator"}
Spring.SendCommands{"godmode"}
end
widgetHandler:RemoveWidget()
end
The reason for game over is so that it doesn't autocheat when playing missions as bots don't count as players.very_bad_soldier wrote:@google:
Shouldnt the "GameOver" callin be replaced by something like "GameStart"?