qb-core icon indicating copy to clipboard operation
qb-core copied to clipboard

update: weapon names / category & some functions

Open Spudgun opened this issue 2 years ago • 1 comments

Describe Pull request Created some extra functions for the client and also added an extra value to the weapons.lua for defining weapon category and also updated some weapon names to their correct name.

client/functions.lua QBCore.Functions.SpawnNetworkedVehicle(model, CB, coords, heading, teleportInto) - Used for spawning vehicles on the server, allows persitancy of vehicles QBCore.Functions.GetVehicleLabel(vehicle) - Returns a vehicles label string QBCore.Functions.GetStreetNameAtCoords(coords) - Returns the current Streetnames as a table QBCore.Functions.GetZoneAtCoords(coords) - Gets the zone at the given coordinates QBCore.Functions.GetCardinalDirecton(entity) -Returns the current cardinal direction of an entity QBCore.Functions.GetCurrentTime() - Returns the current game time QBCore.Functions.GetGroundZCoord(coords) -Returns the current z coord for the ground if it can be found

shared/main.lua QBCore.Functions.DumpTable() - Used for quickly dumping tables into a readable format.

server/events.lua QBCore:Server:SpawnNetworkedVehicle - Event for spawning vehicles server-side. This will allow the server to own the vehicles if no player is within scope.

shared/weapons.lua Added in a key-value for defining the weapon's weapontype. This should be useful for menu's/any other scripts that require knowing the type of weapon.

I've also updated the label value of some weapons. They were incorrectly named.

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qb-core project and checked all its functionality? Yes
  • Does your code fit the style guidelines? Yes
  • Does your PR fit the contribution guidelines? Yes

Spudgun avatar Apr 25 '22 08:04 Spudgun

Has conflicts

GhzGarage avatar Jun 16 '22 01:06 GhzGarage

Have closed this PR and opened a new Pull Request

Spudgun avatar Aug 20 '22 09:08 Spudgun