if lastCheckPoint == nil then lastCheckPoint = 0 end function loadfromcheckpoint_init(e) end function loadfromcheckpoint_main(e) if GetTimer(e) > 100 then file = io.open("lastCheckpoint.dat") if file ~= nil then local lcp = tonumber(file:read("*l")) file:close() if lcp > 0 then Checkpoint(lcp) SetFreezePosition(g_Entity[lcp]['x'],g_Entity[lcp]['y'],g_Entity[lcp]['z']) TransportToFreezePosition() end end Destroy(e) end end