Posted: Sat Nov 18, 2017 4:01 pm
We're not close to the end! MMClone has recent work, as well as mm2hook. Two projects that me and others work on.
mm2hook allows Lua and C++ mods to Midtown Madness 2, and here are some example codes that ACTUALLY WORK with it as it stands now
Not too much is possible yet, but hopefully that will change in the future! It's still actively being worked on, and you can see the progress here: https://github.com/Fireboyd78/mm2hook/commits/master
mm2hook allows Lua and C++ mods to Midtown Madness 2, and here are some example codes that ACTUALLY WORK with it as it stands now
Code: Select all
function bobTheBuilder()
local car = vehCar(true)
car:Init("vpford", 0, 0, false, true)
car:InitAudio("vpford", 0)
car:getCarSim():SetResetPos(Vector3(0, 0, 0))
car:getCarSim():Reset()
writeLog("yo")
end
function enableRegen()
local player = mmGameManager:Instance():getGame():getPlayer()
player:EnableRegen(true)
end
function disableRegen()
local player = mmGameManager:Instance():getGame():getPlayer()
player:EnableRegen(false)
end
function swapCar(basename)
basename = basename or "vpmoonrover"
local player = mmGameManager:Instance():getGame():getPlayer()
player:ReInit(basename)
end
function resetDamage()
local player = mmGameManager:Instance():getGame():getPlayer()
player:ResetDamage()
end
function setResetPos(x, y, z, resetNow)
x = x or 0
y = y or 0
z = z or 0
resetNow = resetNow or false
local player = mmGameManager:Instance():getGame():getPlayer()
local car = player:getCar()
local sim = car:getCarSim()
sim:SetResetPos(Vector3(x,y,z))
if resetNow then sim:Reset() end
end
function teleportTo(x, y, z)
setResetPos(x, y, z, true)
end
function setResetPosToCurrent()
local car = mmGameManager:Instance():getGame():getPlayer():getCar()
local sim = car:getCarSim()
local mdl = car:getModel()
local newPos = mdl:GetPosition()
sim:SetResetPos(Vector3(newPos.x, newPos.y, newPos.z))
end