Skip to content

Commit 1a8531b

Browse files
Migration doc
1 parent 4f6d776 commit 1a8531b

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

newmodels_red/MIGRATION.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ Migrating from newmodels v3 is now possible, as the system has now evolved with
1616

1717
This resource no longer uses and relies on the **MTA Element Data system** (`setElementData`) to sync the models to all clients! Instead, newmodels makes use of Lua tables and MTA events. This major change was made to **improve performance** and control the sync of models more efficiently.
1818

19-
### Method
20-
21-
todo
19+
### Guide
20+
21+
The following is a guide (best effort basis) on how to update your existing scripts made for newmodels v3 to work with newmodels v6.
22+
23+
- The `newmodels_engine` resource no longer exists, all exports are in `newmodels_red`
24+
- Remove all `setElementData` and `getElementData` calls related to newmodels
25+
- Functions `getDataNameFromType` and `getBaseModelDataName` no longer exist since we don't use element data anymore
26+
- Functions like `isDefaultID` still exist (exported)
27+
- Other useful functions were renamed
28+
- Replace `sampobj_reloaded` with `sampobj_red`
29+
- Use the new exported functions or use the loadstring method
30+
- Exported functions to add/remove new models have been rewritten, see the documentation for more details
31+
- See the `test_vehicles` resource for example usage

0 commit comments

Comments
 (0)