Git Product home page Git Product logo

qb-spawn's Introduction

qb-spawn

Spawn Selector for QB-Core Framework ๐Ÿฆ…

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

Dependencies

Screenshots

Spawn selector

Features

  • Ability to select spawn after selecting the character

Installation

Manual

  • Download the script and put it in the [qb] directory.
  • Add the following code to your server.cfg/resouces.cfg
ensure qb-core
ensure qb-spawn
ensure qb-apartments
ensure qb-garages

Configuration

An example to add spawn option

QB.Spawns = {
    ["spawn1"] = { -- Needs to be unique
        coords = vector4(1.1, -1.1, 1.1, 180.0), -- Coords player will be spawned
        location = "spawn1", -- Needs to be unique
        label = "Spawn 1 Name", -- This is the label which will show up in selection menu.
    },
    ["spawn2"] = { -- Needs to be unique
        coords = vector4(1.1, -1.1, 1.1, 180.0), -- Coords player will be spawned
        location = "spawn2", -- Needs to be unique
        label = "Spawn 2 Name", -- This is the label which will show up in selection menu.
    },
}

qb-spawn's People

Contributors

12lettermeme avatar azutake avatar d4isdavid avatar duboiss avatar duckodas avatar eupedrocecel avatar evanillaa avatar ghzgarage avatar hazzer278 avatar holidayy95 avatar ihyajb avatar irishstevie avatar jay-fivem avatar jeann2013 avatar jorn08 avatar keepitlokitho avatar newtonzz avatar pride1922 avatar s33g avatar suelthedev avatar tastyfish avatar theilleniumstudios avatar tom-osborne avatar z3rio avatar zdenda142 avatar zfbx avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-spawn's Issues

[BUG] qb-spawn error

Describe the bug
Currently, experiencing loss of location selection of selecting a character. Just get a spinning wheel of loading death with a black screen. Although, oddly enough if I press keys like "L" or wait a while I still get a paycheck or it will tell me I dont have keys for this vehicle.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any custom MLO
  2. Go inside and then stop the mlo in resources
  3. Client will crash but character will not exit the game
  4. Use admin account to kick user
  5. Then F8 quit and reload
  6. Select the character used
  7. TADA spinning wheel of death

Things I noticed will looking into this issue.

  1. My qb-spawn is unedited I even reinstalled from the most recent github same issue always line #39 as seen in the included image.
  2. the MySQL database keeps updating the location for my character to the same coords
    {"x":-812.5977783203125,"y":182.14944458007813,"z":75.920166015625}

Expected behavior
The ability to restart the server and select last login.

Screenshots
image

Questions (please complete the following information):

  • When you last updated: qb-spawn like I said I reinstalled it tonight
  • Are you using custom resource? which ones?
  • Have you renamed qb- to something custom? no

Additional context
Add any other context about the problem here.

[BUG]

Describe the bug
I have an issue where no matter what spawn i select including last location i always spawn legion square.

To Reproduce
Steps to reproduce the behavior:

  1. Go in Game.
  2. Click on any of the locations in the list.
  3. Select areas to spawn, defaults to legion square, even removed it from the list.
  4. happens every single time.

Expected behavior
To spawn on the selected area of my choosing.

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • Most Recent Build from TX install.
  • Are you using custom resource? Just QB-Spawn
  • Have you renamed qb- to something custom? No.

Additional context
Add any other context about the problem here.

[SUGGESTION] qb-spawn based on jobs

Describe the feature you'd like
you could spawn based on jobs like when your job is police you could see the police department thingy to spawn but if you are unemployed you cant see the police department to spawn and you could also manage it on config.lua i think it would be a nice touch to it

["policedp"] = {
    coords = vector4(428.23, -984.28, 29.76, 3.5),
    location = "policedp",
    label = "Police Department",
    job = "police",
},

qb-communityservice breaks qb-spawn

          i had the same issue.

fixed by disabling qb-community-service or you can fix the code or replace it with another one

Originally posted by @alirezagood in #74 (comment)

With qb-communityservice in resources, qb spawn will not work to send you anywhere except legion.

Owned houses

Owned houses don't show up in the spawn menu. (the code is there)

[BUG] Spawn selection options

Describe the bug
Upon creating a character you then are giving the option to spawn, There is an option there for last location (Which should not be there) as its a new character creation. You will spawn in as a default ped and not be given the option to create your character.

To Reproduce
Steps to reproduce the behavior:
Video preview : https://streamable.com/xodwsg

Expected behavior
To be forced to choose an apartment rather than click last location.
Screenshots
Refer to video above.

Questions (please complete the following information):

  • When you last updated: Fresh new build today 01/09/22 OR 09/01/22
  • Are you using custom resource? which ones? [e.g. zdiscord, qb-target] All default
  • Have you renamed qb- to something custom? [e.g. yes/no] No

Additional context
Nothing

[SUGGESTION] We Need Vue Source Code

Is your feature request related to a problem? Please describe.
Yes, There Is No Zoom When WE Choose Apartment Or When WE Try To Choose Last Spawn I Think You Forget To Make The Fetch Request To Move The Cam

Describe the feature you'd like
Just The Vue Source Code For The HTML, Css, Js

Describe alternatives you've considered
Fix The Zoom Issue

Additional context
...

Support Request

Hi, I'm asking for help. I've been trying to solve it for several hours so that if someone already has a character, they don't have to be selected from the menu if it's not in the last position.
I would like instructions on where and what value I need to transfer.

Thank you for taking the time to read my letter in advance and I look forward to your kind reply

Issue Report - Help

I am trying to create a new spawn for Mount Zonah hospital, but when I load into the server the spawn select is broken. What else do I need to change for this to work? What does it mean by the name must be unique for the spawn? Kinda confused.

This part confuses me the most -

["spawn1"] = { -- Needs to be unique
location = "spawn1", -- Needs to be unique

How do I fix this?

["mountzh"] = {
coords = vector4(-463.03, -338.82, 34.5, 82.23),
location = "mountzh"
label = "Mount Zonah",
},
}

bug spawning at appatment if you leave while in appartment

so this is very intresting but whenever you leave a server while inside your appartment it create something thats messed up because if you load back in again and choose "last loaction" (that is inside your appartement) it breaks everythin inside you cannot see text drw anymore, and you cannot enter you inventory chest neother can you leave your appartment

spawn

where can i set the players to always spawn in the last position? in prison you can log out, log back in and spawn at legion square...
thank you for your help!

[SUGGESTION]

Please make it to be every time Last Location
I removed the locations in config and now every new player cant make a skin

[SUGGESTION] Spawn at Apartment Script

Hello, I am currently setting up my own server. With the base script, players are able to spawn at their houses locations and last location. What I am looking for is an edited script in the Client Lua, around lines 42-68 that allows a player to ALSO select the apartment they got when creating their character.

I am somewhat new to developing, but have a general idea on how to make the script. I have tried, but haven't been able to make it functional yet.

I am not sure where to post this for help, so I am using the request tab to do so. If anyone can whip this script up in a timely manner (considering it's not that many changes to the base script) I will pay for it.

For any questions or comments feel free to reach out on discord JustKryptic#4307

[SUGGESTION]Can we have the vue files?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the feature you'd like
A clear and concise description of what you want to happen. and with as much detail as possible how it would function in your opinion. Please try to keep it unique.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered for people to have in mind just in case the main idea isn't liked but a derivative is.

Additional context
Add any other context or screenshots about the feature request here.
Just want to edit vue.js

[SUGGESTION] Force spawn last location when in prison

Is your feature request related to a problem? Please describe.
When someone is in prison and they log in and out they can choose somewhere else to spawn and it doesnt put them back into prison


Describe the feature you'd like
When the player loads back into the server it should spawn them back in prison and make them finish the rest of there time.


Describe alternatives you've considered
I think its a good idea as it stops players combat logging to get out of prison and when people accidentally spawn somewhere else and then lose there items


Additional context
Im pretty sure someone else has already suggested this and imnot sure if its been added or not but any way im just gonna make another suggestion for it just incase. also i am not sure if some of the things ive said have been fixed / added so please forgive me if its already been done!

How to add more spawn locations

I wanted to add some more spawn locations round the map i have tried bit it shows in the login screen when I click it nothing happens.

[SUGGESTION] Spawn in owned apartment

I am unable to spawn on the apartment in which i have been given in game, it just shows the standard of police department, paleto, motels and legion im also not receiving any errors with this

Request

Is possible Spawn last coordinates?

[SUGGESTION]

how to make a spawn selector, if you leave the city after 1 hour out of the city it lands at the airport?

Support Request

Hi, I'm asking for help. I've been trying to solve it for several hours so that if someone already has a character, they don't have to be selected from the menu if it's not in the last position.
I would like instructions on where and what value I need to transfer.

Thank you for taking the time to read my letter in advance and I look forward to your kind reply

Skip Spawn Location

It would be really helpful if there was an option (like in config) to skip completely the spawning location selection menu and spawn automatically to last location. It would be good for RP servers.

Suggestion in prison

When a player enters the server, he carries a value injail
That disappears the list of areas that will spawn
And only spawn gets him in prison only and hidden other
hide this
["legion"] =
["policedp"] =
["paleto"] =
["motel"] =
and show this only
["prison"] =

SPAWN FOREVER LOADING

When joining the server everything seems normal, no errors in consoles etc. When creating a character on qb-multicharacter
and then press continue the qb-spawn forever loads with a black screen and spinning circle in bottom right and never passes, even when relogging or restarting the server. Not sure what is causing this issue but only has started when ive recently upgraded to the newer versions of QB.

error during NUI callback chooseAppa: @qb-spawn/client.lua:136: attempt to index a nil value (global 'Apartments')

Describe the bug
error during NUI callback chooseAppa: @qb-spawn/client.lua:136: attempt to index a nil value (global 'Apartments')

To Reproduce
Steps to reproduce the behavior:

  1. Go to loading screen '...'
  2. Click on character '....'
    3 see black screen error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: [e.g. last week]
  • Are you using custom resource? which ones? [e.g. zdiscord, qb-target]
  • Have you renamed qb- to something custom? [e.g. yes/no]

Additional context
Stuck in black screen replaced qb-spawn , multi-character,

[SUGGESTION] Force spawn last location when in prison

Is your feature request related to a problem? Please describe.
The only problem occurs when someone is in prison, and relogs

Describe the feature you'd like
When the player loads, and is still set as in jail, then make them only able to respawn at last location.
Otherwise they can respawn elsewhere and the prison script thinks they escaped.

Describe alternatives you've considered
I think that this is a good idea, as it prevents combat logging, and also stops people accidentally loading in the wrong place and losing their items..

Additional context
Add any other context or screenshots about the feature request here.

QB-SPAWN.SQL

Where is the qb-spawn.sql? This is probably causing my black screen issue.

[SUGGESTION] im try using 3d map for spawn

Is your feature request related to a problem? Please describe.
Is it possible to help convert traditional spawning to spawning through the three-dimensional map?

Describe the feature you'd like
im try using 3d map with cutscence animation

Additional context
Add any other context or screenshots about the feature request here.
https://svirtus.cdnvideo.ru/LxOd0HnRZ0GOb0pugktSB0f_V4A=/0x0:1200x675/1024x576/filters:quality(100)/https://hb.bizmrg.com/cybersportru-media/93/932d1c71c19e4c19e7e80ff5808a5391.png

[BUG] Stuck in clouds after pressing "confirm"

Describe the bug

Seems like there is a problem with someone in my server attempting to post to the Nui. It seems he can press the buttons, and this error shows up. After pressing confirm the gets stuck in the clouds with the menu gone.

To Reproduce
Steps to reproduce the behavior:

  1. connect to the server
  2. choose your character
  3. press one of the spawn locations to get the error
  4. press confirm for the menu to disappear and for yourself to be stuck in the clouds

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):
When you last updated: [e.g. last week]

  • yesterday
    Are you using custom resource? which ones? [e.g. zdiscord, qb-target]
  • clean qbcore
    Have you renamed qb- to something custom? [e.g. yes/no]
  • no

Issue with spawning in! Client.lua line 201

Greetings,

This issue was after I created a character already in the previous day or so.

After installing this resource, I was not able to fully spawn in. I only saw a black screen while the loading bar at the bottom right was spinning. I checked the log and it mentioned that line 201 in client.lua had an invalid key: h

After playing around with the code, I finally found a workaround. So instead of:

SetEntityHeading (ped, pos.h)

I did this instead and it worked:
SetEntityHeading (ped, 195.17, -933.77, 29.7, 144.5)

I just threw in the Legions Squares coordinates and I was able to spawn in!

I even tried selecting a different spawn point to see if it would push me back to Legions Square, but it spawned me in the location I selected.

[SUGGESTION] Force last location spawn

Is your feature request related to a problem? Please describe.
Nope, just a suggestion for an enchancment.

Describe the feature you'd like
An ability to be able to deny players to select a spawn location when they spawn back in and force them to the last location

Describe alternatives you've considered
I know we can comment out the locations in the config, but it would be really nice to be able to for example set it in the config so they automaticly spawns at their last location...

Additional context

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.