From 8e24b35c298b00d85cb0fad75c03736b448265b7 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:04:41 -0500 Subject: [PATCH] Add object moving script file --- scripts/client/object.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 scripts/client/object.js diff --git a/scripts/client/object.js b/scripts/client/object.js new file mode 100644 index 00000000..5614b84a --- /dev/null +++ b/scripts/client/object.js @@ -0,0 +1,39 @@ +// =========================================================================== +// Asshat Gaming Roleplay +// https://github.com/VortrexFTW/agrp_main +// (c) 2022 Asshat Gaming +// =========================================================================== +// FILE: object.js +// DESC: Provides object functions and processing +// TYPE: Client (JavaScript) +// =========================================================================== + +let movingObject = null; + +// =========================================================================== + +function startMovingObject(object) { + +} + +// =========================================================================== + +function stopMovingObject(object, save = true) { + if (save) { + sendNetworkEventToServer("agrp.objectSave", object.id, object.position, object.rotation); + } +} + +// =========================================================================== + +function isMovingObject() { + return movingObject != null; +} + +// =========================================================================== + +function getMovingObject() { + return movingObject; +} + +// ===========================================================================