Coder Social home page Coder Social logo

altv-sit's Introduction

altv-sit

Features

This ressource adds the option to sit down on chairs, benches etc. Providing a configuration file, the script allows you to add custom props to interact with. Everything is synced and seats cannot be used by two people at the same time.

IMPORTANT NOTE: The offsets in the config file are not perfect and you might strugle with the player facing a prop, to fix this you need to change the verticalOffset, forwardOffset, leftOffset values to adjust the position of the player on a certian prop.

Install

To install this script, just download the latest release or download the repository

Usage

Press E near any bench, chair etc.

I hope you enjoy my small script

altv-sit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

altv-sit's Issues

'altv-sit:server:sit' is never used

The Server Side event 'altv-sit:server:sit' must be called in line 30 or somewhere else with the coordination parameter.

I fixed it for myself with this on line 30
image

In the server.ts you have to add the coordination parameter to the emit client.

Can't load resource

I downloaded the release and extracted all the content into a folder in the resource folder. Then I added the folder name in the server.cfg resource list. Now when I start the server it can't load the resource. (Adding a package.json file with content equals "{"type": "module" }" fixes the problem.) Server output:

[17:07:36] Loading resource sit
(node:6704) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(node:6704) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
D:\AltV\server\resources\sit\server\index.js:1
import * as alt from 'alt-server';
^^^^^^

SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at ModuleWrap. (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async embedder_main_2.js:30:16
[17:07:36][Error] Failed to load resource sit

Failure console

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/altv/server/resources/sit_01/server/index.js' imported from /home/altv/server/
    at finalizeResolution (internal/modules/esm/resolve.js:265:11)
    at moduleResolve (internal/modules/esm/resolve.js:699:10)
    at defaultResolve (internal/modules/esm/resolve.js:810:11)
    at resolve (embedder_main_5.js:22:16)
    at Loader.resolve (internal/modules/esm/loader.js:86:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:230:28)
    at Loader.import (internal/modules/esm/loader.js:165:28)
    at embedder_main_5.js:30:35
    at embedder_main_5.js:43:3 {
  code: 'ERR_MODULE_NOT_FOUND'

What the Modul for this plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.