play: refactor
Refactored play gamemode.
- Fixed memory leaks (timer/vehicle data never got cleared from table upon destroying).
- Optimised code.
- Disabled OOP (it's not worth to use it for some simple methods, considering that it affects script performance just by enabling it in meta).
- Improved readability.
- Logic has been separated per parts, so it will be easier to maintain/work on.
Tested briefly, hope that i didn't missed anything. Would be nice if someone could test it as well.
I think it's better to move datasets out, like dataset.lua with arrays.
Player array shouldn't be one liner.
Moved them to play_config.lua, and fixed one liner. Do you also need for playerSkins to not be one liner?
Do you also need for playerSkins to not be one liner?
yes
Done & waiting for further feedback.
@TheNormalnij, @jlillis updated, re-review please.
LGTM. We need test it before merge.
Thank you.