Git Product home page Git Product logo

qb-smallresources's Introduction

qb-smallresources

Base scripts 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

Features

  • Consumeable foods/beverages/drinks/drugs (sandwich, water_bottle, tosti, beer, vodka etc.)
  • Removal of GTA's default weapons drops
  • Drug effects
  • Removal of GTA's default vehicle spawns (planes, helicopters, emergency vehicles etc.)
  • Removal of GTA's default emergency service npcs
  • Removal of GTA's default wanted system
  • Useable binoculars
  • Weapon draw animations (normal/holster)
  • Ability to add teleport markers (from a place to another place)
  • Taking hostage
  • Pointing animation with finger (by pressing "B")
  • Seatbelt and cruise control
  • Useable parachute
  • Useable armor
  • Weapon recoil (specific to each weapon)
  • Tackle
  • Calm AI (adjusting npc/gang npc aggresiveness)
  • Race Harness
  • /id to see the id
  • Adjusting npc/vehicle/parked vehicle spawn rates
  • Infinite ammo for fire extinguisher and petrol can
  • Removal of GTA's default huds (weapon wheel, cash etc.)
  • Fireworks
  • Automatically engine on after entering vehicle
  • Discord rich presence
  • Crouch and prone

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-smallresources

Configuration

Each feature has a different file name correlative with its function. You can configure each one by its own.

qb-smallresources's People

Contributors

anishbplayz avatar aveeux avatar berkiebb avatar christianbdev avatar darknight2590 avatar demo4889 avatar developer-bear avatar evanillaa avatar ghzgarage avatar gutsoo avatar iboss21 avatar idrisdose avatar ihyajb avatar izmystic avatar kamuikody avatar liamdormon avatar macky4546 avatar mafewtm avatar newtonzz avatar nilpadisha avatar nzkfc avatar r0adra93 avatar regalonefour avatar s33g avatar sharkiiie avatar themilkman1770 avatar tom-osborne avatar youremeh avatar z3rio 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  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar

qb-smallresources's Issues

spam armor

When you wear armor, you can repeat wearing armor again
Spam must be stopped
When the armor is complete you can wear another one
Condition must be checked

Suggestion - Teleports limited to jobs/gangs/anyone

I'm not advanced enough to figure this out and push it, I figured it would be a good idea for the community.

But be able to set the teleports we set up to be used with a job, a gang, or available to everyone... I think it would be very utilized!

For example: The lost would use this to teleport into the clubhouse interior, and also be able to teleport their vehicles in there as there is a garage entrance to it. Only members of The Lost would be able to use it... etc...

Thanks :)

Seatbelt -> HUD Error

When a player has its seatbelt on and got thrown out from a car crash, the next time the player goes inside a vehicle,

  1. The player's seatbelt is automatically turned on but the HUD says not yet on seatbelt and HUD is not lit.
  2. If the player rides a bike/motorcycle, player can no longer get out and needs to reconnect in order to continue.
  3. When you use the item "Harness" and you get out of the car, you have to press seatbelt again to get out as putting harness on will trigger seatbelt but getting it off won't turn off seatbelt.

Thank you!
By the way, where can I donate/support for QBCore?

push vehicle

push vehicle arent working, doesnt mather what value i put in config minimum dammage.
no errors

Harness issue

When you use the harness, once you remove it you get stuck in the car untill you fasten the normal seatbelt and remove it, and the icon will bug, as you will remove it but it will show you that you are using the seatbelt.

Getting Errors

[script:qb-smallresou] SCRIPT ERROR: @qb-smallresources/server/entities.lua:6: attempt to index a nil value (global 'Config')
[script:qb-smallresou] > handler (@qb-smallresources/server/entities.lua:6)

Entities:
-- Blacklisting entities can just be handled entirely server side with onesync events
-- No need to run coroutines to supress or delete these when we can simply delete them before they spawn
AddEventHandler("entityCreating", function(handle)
local entityModel = GetEntityModel(handle)

if Config.BlacklistedVehs[entityModel] or Config.BlacklistedPeds[entityModel] then
    CancelEvent()
end

end)

error in console

i always get this error

[script:qb-smallresou] SCRIPT ERROR: @qb-smallresources/server/main.lua:29: attempt to perform arithmetic on a nil value (field 'uses')

Lockpicking

Found that when lockpicking one vehicle successfully you don't need to hotwire plus you don't need to lockpick other cars, you can just go right in them without lockpicking or hotwiring

how to disable auto engine start please

here is all that is said I want to deactivate the auto start when the plyer gets into a vehicle.
I searched in all the files but I can't find it can you tell me where to find this function :) thank you in advance

Singleplayer music

After less than a minute of flying the polmav I start hearing a mission music from the singleplayer

Seatbelt Fix to those who are having issues

So basically, by default, the seatbelt icon on qb-hud lights up green when it is on and turns red when off however, if you get thrown out with seatbelt on, the next time you ride a vehicle, the seatbelt icon is still lit but player is not on seatbelt.

I removed the seatbelt icon from qb-hud and changed this on qb-smallresources seatbelt.lua.

What it does, player won't have to rely on the seatbelt icon instead, they hear a ding dong every 5 seconds when seatbelt is off.

function ToggleSeatbelt()
    if seatbeltOn then
        seatbeltOn = false
        TriggerEvent("seatbelt:client:ToggleSeatbelt")
        TriggerServerEvent("InteractSound_SV:PlayOnSource", "carunbuckle", 0.5)
    else
        seatbeltOn = true
        TriggerEvent("seatbelt:client:ToggleSeatbelt")
        TriggerServerEvent("InteractSound_SV:PlayOnSource", "carbuckle", 0.5)
		QBCore.Functions.Notify("Great! Seatbelt is on.","success")
    end
end
function ToggleHarness()
    if harnessOn then
        harnessOn = false
    else
        harnessOn = true
        ToggleSeatbelt()
    end
end
function ResetHandBrake()
    if handbrake > 0 then
        handbrake = handbrake - 1
    end
end
-- Export
function HasHarness()
    return harnessOn
end
-- Main Thread
--TriggerServerEvent("InteractSound_SV:PlayOnSource", "doorbell", 0.25)
CreateThread(function()
    while true do
	local class = GetVehicleClass(GetVehiclePedIsUsing(PlayerPedId()))
        sleep = 1000
        if IsPedInAnyVehicle(PlayerPedId()) then
            sleep = 10
            if seatbeltOn or harnessOn then
                DisableControlAction(0, 75, true)
                DisableControlAction(27, 75, true)
			elseif class ~= 8 and class ~= 13 and class ~= 14 then
			sleep = 5000
			QBCore.Functions.Notify("Seatbelt is OFF!","error")
			TriggerServerEvent("InteractSound_SV:PlayOnSource", "doorbell", 0.5)
            end
        else
            seatbeltOn = false
            harnessOn = false
        end
        Wait(sleep)
    end
end

qb-hud/html/index.html

 <!--div class="ui-car-seatbelt">
                        <q-circular-progress show-value :value="seatbelt" size="30px" :thickness="0" color="white" track-color="grey-9" center-color="grey-8" :min="0" :max="1"><q-icon name="fas fa-user-slash" size="11px" :style="{color: seatbeltColor}"/>
</div-->

Here's a short clip: https://www.youtube.com/watch?v=AN611LpnpgE

How do I disable the disabling of police?

I tried messing with the config, but I still don't get the police when I hit someone, I'm using the QBCore template on txAdmin.

I want people to get police when they murder people.

Remove harness

With the seatbelt fix, we lost the hability to remove the harness when pressing B key to remove the seatbelt, instead we need to do it by pressing the harness hotkey, but if the harness broke on the last usage you can't remove it.

Disable Vehicle Rewards and Weapon Pickup

CreateThread(function()
while true do
Wait(8)
DisablePlayerVehicleRewards(PlayerId())
RemoveVehiclesFromGeneratorsInArea(441.8465 - 500.0, -987.99 - 500.0, 30.68 -500.0, 441.8465 + 500.0, -987.99 + 500.0, 30.68 + 500.0)
end
end)

CreateThread(function()
while true do
Wait(1)
local pickupList = {PICKUP_AMMO_BULLET_MP,PICKUP_AMMO_FIREWORK,PICKUP_AMMO_FLAREGUN,PICKUP_AMMO_GRENADELAUNCHER,PICKUP_AMMO_GRENADELAUNCHER_MP,PICKUP_AMMO_HOMINGLAUNCHER,PICKUP_AMMO_MG,PICKUP_AMMO_MINIGUN,PICKUP_AMMO_MISSILE_MP,PICKUP_AMMO_PISTOL,PICKUP_AMMO_RIFLE,PICKUP_AMMO_RPG,PICKUP_AMMO_SHOTGUN,PICKUP_AMMO_SMG,PICKUP_AMMO_SNIPER,PICKUP_ARMOUR_STANDARD,PICKUP_CAMERA,PICKUP_CUSTOM_SCRIPT,PICKUP_GANG_ATTACK_MONEY,PICKUP_HEALTH_SNACK,PICKUP_HEALTH_STANDARD,PICKUP_MONEY_CASE,PICKUP_MONEY_DEP_BAG,PICKUP_MONEY_MED_BAG,PICKUP_MONEY_PAPER_BAG,PICKUP_MONEY_PURSE,PICKUP_MONEY_SECURITY_CASE,PICKUP_MONEY_VARIABLE,PICKUP_MONEY_WALLET,PICKUP_PARACHUTE,PICKUP_PORTABLE_CRATE_FIXED_INCAR,PICKUP_PORTABLE_CRATE_UNFIXED,PICKUP_PORTABLE_CRATE_UNFIXED_INCAR,PICKUP_PORTABLE_CRATE_UNFIXED_INCAR_SMALL,PICKUP_PORTABLE_CRATE_UNFIXED_LOW_GLOW,PICKUP_PORTABLE_DLC_VEHICLE_PACKAGE,PICKUP_PORTABLE_PACKAGE,PICKUP_SUBMARINE,PICKUP_VEHICLE_ARMOUR_STANDARD,PICKUP_VEHICLE_CUSTOM_SCRIPT,PICKUP_VEHICLE_CUSTOM_SCRIPT_LOW_GLOW,PICKUP_VEHICLE_HEALTH_STANDARD,PICKUP_VEHICLE_HEALTH_STANDARD_LOW_GLOW,PICKUP_VEHICLE_MONEY_VARIABLE,PICKUP_VEHICLE_WEAPON_APPISTOL,PICKUP_VEHICLE_WEAPON_ASSAULTSMG,PICKUP_VEHICLE_WEAPON_COMBATPISTOL,PICKUP_VEHICLE_WEAPON_GRENADE,PICKUP_VEHICLE_WEAPON_MICROSMG,PICKUP_VEHICLE_WEAPON_MOLOTOV,PICKUP_VEHICLE_WEAPON_PISTOL,PICKUP_VEHICLE_WEAPON_PISTOL50,PICKUP_VEHICLE_WEAPON_SAWNOFF,PICKUP_VEHICLE_WEAPON_SMG,PICKUP_VEHICLE_WEAPON_SMOKEGRENADE,PICKUP_VEHICLE_WEAPON_STICKYBOMB,PICKUP_WEAPON_ADVANCEDRIFLE,PICKUP_WEAPON_APPISTOL,PICKUP_WEAPON_ASSAULTRIFLE,PICKUP_WEAPON_ASSAULTSHOTGUN,PICKUP_WEAPON_ASSAULTSMG,PICKUP_WEAPON_AUTOSHOTGUN,PICKUP_WEAPON_BAT,PICKUP_WEAPON_BATTLEAXE,PICKUP_WEAPON_BOTTLE,PICKUP_WEAPON_BULLPUPRIFLE,PICKUP_WEAPON_BULLPUPSHOTGUN,PICKUP_WEAPON_CARBINERIFLE,PICKUP_WEAPON_COMBATMG,PICKUP_WEAPON_COMBATPDW,PICKUP_WEAPON_COMBATPISTOL,PICKUP_WEAPON_COMPACTLAUNCHER,PICKUP_WEAPON_COMPACTRIFLE,PICKUP_WEAPON_CROWBAR,PICKUP_WEAPON_DAGGER,PICKUP_WEAPON_DBSHOTGUN,PICKUP_WEAPON_FIREWORK,PICKUP_WEAPON_FLAREGUN,PICKUP_WEAPON_FLASHLIGHT,PICKUP_WEAPON_GRENADE,PICKUP_WEAPON_GRENADELAUNCHER,PICKUP_WEAPON_GUSENBERG,PICKUP_WEAPON_GOLFCLUB,PICKUP_WEAPON_HAMMER,PICKUP_WEAPON_HATCHET,PICKUP_WEAPON_HEAVYPISTOL,PICKUP_WEAPON_HEAVYSHOTGUN,PICKUP_WEAPON_HEAVYSNIPER,PICKUP_WEAPON_HOMINGLAUNCHER,PICKUP_WEAPON_KNIFE,PICKUP_WEAPON_KNUCKLE,PICKUP_WEAPON_MACHETE,PICKUP_WEAPON_MACHINEPISTOL,PICKUP_WEAPON_MARKSMANPISTOL,PICKUP_WEAPON_MARKSMANRIFLE,PICKUP_WEAPON_MG,PICKUP_WEAPON_MICROSMG,PICKUP_WEAPON_MINIGUN,PICKUP_WEAPON_MINISMG,PICKUP_WEAPON_MOLOTOV,PICKUP_WEAPON_MUSKET,PICKUP_WEAPON_NIGHTSTICK,PICKUP_WEAPON_PETROLCAN,PICKUP_WEAPON_PIPEBOMB,PICKUP_WEAPON_PISTOL,PICKUP_WEAPON_PISTOL50,PICKUP_WEAPON_POOLCUE,PICKUP_WEAPON_PROXMINE,PICKUP_WEAPON_PUMPSHOTGUN,PICKUP_WEAPON_RAILGUN,PICKUP_WEAPON_REVOLVER,PICKUP_WEAPON_RPG,PICKUP_WEAPON_SAWNOFFSHOTGUN,PICKUP_WEAPON_SMG,PICKUP_WEAPON_SMOKEGRENADE,PICKUP_WEAPON_SNIPERRIFLE,PICKUP_WEAPON_SNSPISTOL,PICKUP_WEAPON_SPECIALCARBINE,PICKUP_WEAPON_STICKYBOMB,PICKUP_WEAPON_STUNGUN,PICKUP_WEAPON_SWITCHBLADE,PICKUP_WEAPON_VINTAGEPISTOL,PICKUP_WEAPON_WRENCH}
local pedPos = GetEntityCoords(GetPlayerPed(-1), false)
for a = 1, #pickupList do
if IsPickupWithinRadius(pickupList[a], pedPos.x, pedPos.y, pedPos.z, 200.0) then
RemoveAllPickupsOfType(pickupList[a])
else
Wait(5)
end
end
Wait(3)
end
end)

Density Problems

local density = {
['parked'] = 1.0,
['vehicle'] = 0.0,
['multiplier'] = 1.0,
['peds'] = 1.0,
['scenario'] = 1.0,
}

When i use this all parked cars are disabled.

Cant get parked vehicle while i have vehicle = 0

Whe i have vehicle = 1 the booth are spawning

Hearing Radio of Wanted System / Seeing Blinking GPS

Picture Example: https://media.discordapp.net/attachments/854912490788880414/855802420898037820/unknown.png?width=981&height=676
After shooting while in vehicle or if you get out and shoot then get back in you will see the GPS flash red and blue, as well occasionally here the radio "beep" as if the Local AI are talking (though there is no talking and it's just the radio sound). This is with a fresh install of the latest qb-smallresources script.

Cruise controll exploit

there is a way to use the cruisecontroll to make the cars turn insanely fast. hart to explain, but i will provide 2 videos.
step 1 turn the car with a bit of oversteer.
step 2 activate cruise in the turn, and the car gets resett and gets a boost.
combined with nos this is extremely Overpowered.

this is how its seen live from someone abusing it. https://medal.tv/games/gta-v/clips/6IgfrKUSbU8GM/d1337MXJZ2fv?invite=cr-MSxwb3YsODc4MTc5Miw

this is us trying to recreate it https://medal.tv/games/gta-v/clips/6IjW0YvqtLBAF/d1337sbQHv3U?invite=cr-MSxES1YsODc4MTc5Miw

gang realtionship error

I have tried most of the projects
for esx and np and more etc
There is a lot of reality
Here it is different
It must be a gang relationship npc
With the players must be bad
You must be aggressive
It is unreasonable to attack gang npc and npc no response

pull for attach prop for eat and drink

im cant add pull
write pull here


attachedPropPerm = 0
function removeAttachedPropPerm()
	if DoesEntityExist(attachedPropPerm) then
		DeleteEntity(attachedPropPerm)
		attachedPropPerm = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop', 'error')
	end
end

RegisterNetEvent('destroyPropPerm')
AddEventHandler('destroyPropPerm', function()
	removeAttachedPropPerm()
end)

local APPbone = 0
local APPx = 0.0
local APPy = 0.0
local APPz = 0.0
local APPxR = 0.0
local APPyR = 0.0
local APPzR = 0.0

local holdingPackage = false

RegisterNetEvent('attachPropPerm')
AddEventHandler('attachPropPerm', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	print(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	if attachedPropPerm ~= 0 then
		removeAttachedPropPerm()
		return
	end
	TriggerEvent("DoLongHudText","Press 7 to drop or pickup the object.",37)
	
	holdingPackage = true
	attachModel = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	--local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
	RequestModel(attachModel)
	while not HasModelLoaded(attachModel) do
		Citizen.Wait(100)
	end
	attachedPropPerm = CreateObject(attachModel, 1.0, 1.0, 1.0, 1, 1, 0)

	AttachEntityToEntity(attachedPropPerm, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 1, 0, 0, 2, 1)

	APPbone = bone
	APPx = x
	APPy = y
	APPz = z
	APPxR = xR
	APPyR = yR
	APPzR = zR
	TriggerEvent("debug", 'Attached: Attached Prop', 'success')
end)

function loadAnimDict( dict )
    while ( not HasAnimDictLoaded( dict ) ) do
        RequestAnimDict( dict )
        Citizen.Wait( 5 )
    end
end

function randPickupAnim()
  	local randAnim = math.random(7)

    loadAnimDict('random@domestic')
    TaskPlayAnim(PlayerPedId(),'random@domestic', 'pickup_low',5.0, 1.0, 1.0, 48, 0.0, 0, 0, 0)
end

RegisterNetEvent('event:control:propAttach')
AddEventHandler('event:control:propAttach', function(useID)

	if attachedPropPerm ~= 0 then

		if (`WEAPON_UNARMED` ~= GetSelectedPedWeapon(PlayerPedId()) and holdingPackage) then

			if not holdingPackage then

				local dst = #(GetEntityCoords(attachedPropPerm) - GetEntityCoords(PlayerPedId()))

				if dst < 2 then
				--	TaskTurnPedToFaceEntity(PlayerPedId(), attachedPropPerm, 1.0)
					holdingPackage = not holdingPackage
					randPickupAnim()
					Citizen.Wait(1000)
					PropCarryAnim()
					ClearPedTasks(PlayerPedId())
					ClearPedSecondaryTask(PlayerPedId())
					AttachEntityToEntity(attachedPropPerm, PlayerPedId(), APPbone, APPx, APPy, APPz, APPxR, APPyR, APPzR, 1, 1, 0, 0, 2, 1)
				end

			else
				holdingPackage = not holdingPackage
				ClearPedTasks(PlayerPedId())
				ClearPedSecondaryTask(PlayerPedId())
				randPickupAnim()
				Citizen.Wait(500)
				DetachEntity(attachedPropPerm)
			end
		end
	end
end)

function PropCarryAnim()
	-- anims for specific carrying props.
end

attachedProp = 0
function removeAttachedProp()
	if DoesEntityExist(attachedProp) then
		DeleteEntity(attachedProp)
		attachedProp = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop', 'error')
	end
end

RegisterNetEvent('destroyProp')
AddEventHandler('destroyProp', function()
	removeAttachedProp()
end)

RegisterNetEvent('attachProp')
AddEventHandler('attachProp', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	print(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	removeAttachedProp()
	attachModel = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	RequestModel(attachModel)
	while not HasModelLoaded(attachModel) do
		Citizen.Wait(100)
	end
	attachedProp = CreateObject(attachModel, 1.0, 1.0, 1.0, 1, 1, 0)
	SetModelAsNoLongerNeeded(attachModel)
	AttachEntityToEntity(attachedProp, PlayerPedId(), bone, x, y, z, xR, yR, zR, true, true, false, true, 1, true)
	TriggerEvent("debug", 'Attached: Attached Prop', 'success')
end)

-- Phone
attachedPropPhone = 0
function removeAttachedPropPhone()
	if DoesEntityExist(attachedPropPhone) then
		DeleteEntity(attachedPropPhone)
		attachedPropPhone = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop (Phone)', 'error')
	end
end

RegisterNetEvent('destroyPropPhone')
AddEventHandler('destroyPropPhone', function()
	removeAttachedPropPhone()
end)

RegisterNetEvent('attachPropPhone')
AddEventHandler('attachPropPhone', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	removeAttachedPropPhone()
	attachModelPhone = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	--local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
	RequestModel(attachModelPhone)
	while not HasModelLoaded(attachModelPhone) do
		Citizen.Wait(100)
	end
	attachedPropPhone = CreateObject(attachModelPhone, 1.0, 1.0, 1.0, 1, 1, 0)
	AttachEntityToEntity(attachedPropPhone, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 0, 0, 0, 2, 1)
	TriggerEvent("debug", 'Attached: Attached Prop (Phone)', 'success')
end)

-- Radio
attachedPropRadio = 0
function removeAttachedPropRadio()
	if DoesEntityExist(attachedPropRadio) then
		DeleteEntity(attachedPropRadio)
		attachedPropRadio = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop (Radio)', 'error')
	end
end

RegisterNetEvent('destroyPropRadio')
AddEventHandler('destroyPropRadio', function()
	removeAttachedPropRadio()
end)

RegisterNetEvent('attachPropRadio')
AddEventHandler('attachPropRadio', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	removeAttachedPropRadio()
	attachModelRadio = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	--local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
	RequestModel(attachModelRadio)
	while not HasModelLoaded(attachModelRadio) do
		Citizen.Wait(100)
	end
	attachedPropRadio = CreateObject(attachModelRadio, 1.0, 1.0, 1.0, 1, 1, 0)
	AttachEntityToEntity(attachedPropRadio, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 0, 0, 0, 2, 1)
	TriggerEvent("debug", 'Attached: Attached Prop (Radio)', 'success')
end)

attachedProp69 = 0
function removeAttachedProp69()
	if DoesEntityExist(attachedProp69) then
		DeleteEntity(attachedProp69)
		attachedProp69 = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop (69)', 'error')
	end
end

RegisterNetEvent('destroyProp69')
AddEventHandler('destroyProp69', function()
	removeAttachedProp69()
end)

RegisterNetEvent('attachProp69')
AddEventHandler('attachProp69', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	removeAttachedProp69()
	attachModel69 = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	--local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
	RequestModel(attachModel69)
	while not HasModelLoaded(attachModel69) do
		Citizen.Wait(100)
	end
	attachedProp69 = CreateObject(attachModel69, 1.0, 1.0, 1.0, 1, 1, 0)
	AttachEntityToEntity(attachedProp69, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 0, 0, 0, 2, 1)
	TriggerEvent("debug", 'Attached: Attached Prop (69)', 'success')
end)

attachPropList = {
	["test"] = {
		["model"] = "prop_cs_brain_chunk", ["bone"] = 28422, ["x"] = 0.062,["y"] = 0.02,["z"] = 0.0,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["rose"] = {
		["model"] = "prop_single_rose", ["bone"] = 18905, ["x"] = 0.13,["y"] = 0.15,["z"] = 0.0,["xR"] = -100.0,["yR"] = 0.0, ["zR"] = -20.0
	},
	["cigar1"] = {
		["model"] = "prop_cigar_01", ["bone"] = 47419, ["x"] = 0.010,["y"] = 0.00,["z"] = 0.0,["xR"] = 50.0,["yR"] = -80.0, ["zR"] = 0.0
	},
	["cigar2"] = {
		["model"] = "prop_cigar_02", ["bone"] = 47419, ["x"] = 0.010,["y"] = 0.00,["z"] = 0.0,["xR"] = 50.0,["yR"] = -80.0, ["zR"] = 0.0
	},
	["cigar3"] = {
		["model"] = "prop_cigar_03", ["bone"] = 47419, ["x"] = 0.010,["y"] = 0.00,["z"] = 0.0,["xR"] = 50.0,["yR"] = -80.0, ["zR"] = 0.0
	},
	["cigarette"] = {
		["model"] = "prop_cs_ciggy_01", ["bone"] = 28422, ["x"] = -0.0,["y"] = 0.0,["z"] = 0.0,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["cig01"] = {
		["model"] = "prop_amb_ciggy_01", ["bone"] = 28422, ["x"] = -0.024,["y"] = 0.0,["z"] = 0.0,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["cig02"] = {
		["model"] = "prop_amb_ciggy_01", ["bone"] = 58867, ["x"] = 0.06,["y"] = 0.0,["z"] = -0.02,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 90.0
	},
	["cigmouth"] = {
		["model"] = "prop_amb_ciggy_01", ["bone"] = 47419, ["x"] = 0.010,["y"] = -0.009,["z"] = -0.003,["xR"] = 55.0,["yR"] = 0.0, ["zR"] = 110.0
	},
	["healthpack01"] = {
		["model"] = "prop_ld_health_pack", ["bone"] = 28422, ["x"] = 0.18,["y"] = 0.0,["z"] = 0.0,["xR"] = 135.0,["yR"] = -100.0, ["zR"] = 0.0
	},
	["briefcase01"] = {
		["model"] = "prop_ld_case_01", ["bone"] = 28422, ["x"] = 0.08,["y"] = 0.0,["z"] = 0.0,["xR"] = 315.0,["yR"] = 288.0, ["zR"] = 0.0
	},
	["cashcase01"] = {
		["model"] = "prop_cash_case_01", ["bone"] = 28422, ["x"] = 0.05,["y"] = 0.0,["z"] = 0.0,["xR"] = 135.0,["yR"] = -100.0, ["zR"] = 0.0
	},
	["cashbag01"] = {
		["model"] = "prop_cs_heist_bag_01", ["bone"] = 24816, ["x"] = 0.15,["y"] = -0.4,["z"] = -0.38,["xR"] = 90.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["wadofbills"] = {
		["model"] = "prop_anim_cash_pile_01", ["bone"] = 60309, ["x"] = 0.0,["y"] = 0.0,["z"] = 0.0, ["xR"] = 180.0,["yR"] = 0.0, ["zR"] = 70.0
	},
	["notepad01"] = {
		["model"] = "prop_notepad_01", ["bone"] = 60309, ["x"] = 0.0,["y"] = -0.0,["z"] = -0.0,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["phone01"] = {
		["model"] = "prop_player_phone_01", ["bone"] = 57005, ["x"] = 0.14,["y"] = 0.01,["z"] = -0.02,["xR"] = 110.0,["yR"] = 120.0, ["zR"] = -15.0
	},
	["radio01"] = {
		["model"] = "prop_cs_hand_radio", ["bone"] = 57005, ["x"] = 0.14,["y"] = 0.01,["z"] = -0.02,["xR"] = 110.0,["yR"] = 120.0, ["zR"] = -15.0
	},
	["clipboard01"] = {
		["model"] = "p_amb_clipboard_01", ["bone"] = 60309, ["x"] = -0.01,["y"] = -0.015,["z"] = 0.005,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = -10.0
	},
	["clipboard02"] = {
		["model"] = "p_amb_clipboard_01", ["bone"] = 60309, ["x"] = 0.1,["y"] = -0.01,["z"] = 0.005,["xR"] = -95.0,["yR"] = 20.0, ["zR"] = -20.0
	},
	["tablet01"] = {
		["model"] = "prop_cs_tablet", ["bone"] = 60309, ["x"] = 0.03,["y"] = 0.002,["z"] = -0.0,["xR"] = 10.0,["yR"] = 160.0, ["zR"] = 0.0
	},
	["pencil01"] = {
		["model"] = "prop_pencil_01", ["bone"] = 58870, ["x"] = 0.04,["y"] = 0.0225,["z"] = 0.08,["xR"] = 320.0,["yR"] = 0.0, ["zR"] = 220.0
	},
	["drugpackage01"] = {
		["model"] = "prop_meth_bag_01", ["bone"] = 28422, ["x"] = 0.1,["y"] = 0.0,["z"] = -0.01,["xR"] = 135.0,["yR"] = -100.0, ["zR"] = 40.0
	},
	["drugpackage02"] = {
		["model"] = "prop_weed_bottle", ["bone"] = 28422, ["x"] = 0.09,["y"] = 0.0,["z"] = -0.03,["xR"] = 135.0,["yR"] = -100.0, ["zR"] = 40.0
	},
	["drugtest01"] = {
		["model"] = "prop_cash_case_02", ["bone"] = 28422, ["x"] = -0.01,["y"] = -0.1,["z"] = -0.138,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["box01"] = {
		["model"] = "prop_cs_cardbox_01", ["bone"] = 28422, ["x"] = 0.01,["y"] = 0.01,["z"] = 0.0,["xR"] = -255.0,["yR"] = -180.0, ["zR"] = 40.0
	},
	["bomb01"] = {
		["model"] = "prop_ld_bomb", ["bone"] = 28422, ["x"] = 0.22,["y"] = -0.01,["z"] = 0.0,["xR"] = -25.0,["yR"] = -100.0, ["zR"] = 0.0
	},
	["money01"] = {
		["model"] = "prop_anim_cash_note", ["bone"] = 28422, ["x"] = 0.1,["y"] = 0.04,["z"] = 0.0,["xR"] = 25.0,["yR"] = 0.0, ["zR"] = 10.0
	},
	["armor01"] = {
		["model"] = "prop_armour_pickup", ["bone"] = 28422, ["x"] = 0.3,["y"] = 0.01,["z"] = 0.0,["xR"] = 255.0,["yR"] = -90.0, ["zR"] = 10.0
	},
	["terd01"] = {
		["model"] = "prop_big_shit_01", ["bone"] = 61839, ["x"] = 0.015,["y"] = 0.0,["z"] = -0.01,["xR"] = 3.0,["yR"] = -90.0, ["zR"] = 180.0
	},
	["blackduffelbag"] = {
		["model"] = "xm_prop_x17_bag_01a", ["bone"] = 28422, ["x"] = 0.37,["y"] = 0.0,["z"] = 0.0,["xR"] = -50.0,["yR"] = -90.0, ["zR"] = 0.0
	},
	["medicalBag"] = {
		["model"] = "xm_prop_x17_bag_med_01a", ["bone"] = 28422, ["x"] = 0.37,["y"] = 0.0,["z"] = 0.0,["xR"] = -50.0,["yR"] = -90.0, ["zR"] = 0.0
	},
	["securityCase"] = {
		["model"] = "prop_security_case_01", ["bone"] = 28422, ["x"] = 0.1,["y"] = 0.0,["z"] = 0.0,["xR"] = -50.0,["yR"] = -90.0, ["zR"] = 0.0
	},
	["toolbox"] = {
		["model"] = "prop_tool_box_04", ["bone"] = 28422, ["x"] = 0.37,["y"] = 0.0,["z"] = 0.0,["xR"] = -50.0,["yR"] = -90.0, ["zR"] = 0.0
	},
	["boombox01"] = {
		["model"] = "prop_boombox_01", ["bone"] = 28422, ["x"] = 0.2,["y"] = 0.0,["z"] = 0.0,["xR"] = -35.0,["yR"] = -100.0, ["zR"] = 0.0
	},
	["bowlball01"] = {
		["model"] = "prop_bowling_ball", ["bone"] = 28422, ["x"] = 0.12,["y"] = 0.0,["z"] = 0.0,["xR"] = 75.0,["yR"] = 280.0, ["zR"] = -80.0
	},
	["bowlpin01"] = {
		["model"] = "prop_bowling_pin", ["bone"] = 28422, ["x"] = 0.12,["y"] = 0.0,["z"] = 0.0,["xR"] = 75.0,["yR"] = 280.0, ["zR"] = -80.0
	},
	["crate01"] = {
		["model"] = "prop_cs_cardbox_01", ["bone"] = 28422, ["x"] = 0.0,["y"] = 0.0,["z"] = 0.0,["xR"] = 0.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["tvcamera01"] = {
		["model"] = "prop_v_cam_01", ["bone"] = 57005, ["x"] = 0.13,["y"] = 0.25,["z"] = -0.03,["xR"] = -85.0,["yR"] = 0.0, ["zR"] = -80.0
	},
	["boomMIKE01"] = {
		["model"] = "prop_v_bmike_01", ["bone"] = 57005, ["x"] = 0.1,["y"] = 0.0,["z"] = -0.03,["xR"] = 85.0,["yR"] = 0.0, ["zR"] = 96.0
	},
	["minigameThermite"] = {
		["model"] = "prop_oiltub_06", ["bone"] = 57005, ["x"] = 0.1,["y"] = 0.0,["z"] = -0.09,["xR"] = 145.0,["yR"] = 20.0, ["zR"] = 80.0
	},
	["minigameDrill"] = {
		["model"] = "hei_prop_heist_drill", ["bone"] = 57005, ["x"] = 0.15,["y"] = 0.0,["z"] = -0.05,["xR"] = 0.0,["yR"] = 90.0, ["zR"] = 90.0
	},
		-- 18905 left hand - 57005 right hand
	["tvmic01"] = {
		["model"] = "p_ing_microphonel_01", ["bone"] = 18905, ["x"] = 0.1,["y"] = 0.05,["z"] = 0.0,["xR"] = -85.0,["yR"] = -80.0, ["zR"] = -80.0
	},
	["newspaper01"] = {
		["model"] = "prop_cliff_paper", ["bone"] = 28422, ["x"] = -0.07,["y"] = 0.0,["z"] = 0.0,["xR"] = 90.0,["yR"] = 0.0, ["zR"] = 0.0
	},
	["golfbag01"] = {
		["model"] = "prop_golf_bag_01", ["bone"] = 24816, ["x"] = 0.12,["y"] = -0.3,["z"] = 0.0,["xR"] = -75.0,["yR"] = 190.0, ["zR"] = 92.0
	},
	["golfputter01"] = {
		["model"] = "prop_golf_putter_01", ["bone"] = 57005, ["x"] = 0.0,["y"] = -0.05,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfiron01"] = {
		["model"] = "prop_golf_iron_01", ["bone"] = 57005, ["x"] = 0.125,["y"] = 0.04,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfiron03"] = {
		["model"] = "prop_golf_iron_01", ["bone"] = 57005, ["x"] = 0.126,["y"] = 0.041,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfiron05"] = {
		["model"] = "prop_golf_iron_01", ["bone"] = 57005, ["x"] = 0.127,["y"] = 0.042,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfiron07"] = {
		["model"] = "prop_golf_iron_01", ["bone"] = 57005, ["x"] = 0.128,["y"] = 0.043,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfwedge01"] = {
		["model"] = "prop_golf_pitcher_01", ["bone"] = 57005, ["x"] = 0.17,["y"] = 0.04,["z"] = 0.0,["xR"] = 90.0,["yR"] = -118.0, ["zR"] = 44.0
	},
	["golfdriver01"] = {
		["model"] = "prop_golf_driver", ["bone"] = 57005, ["x"] = 0.14,["y"] = 0.00,["z"] = 0.0,["xR"] = 160.0,["yR"] = -60.0, ["zR"] = 10.0
	},
	["glowstickRight"] = {
		["model"] = "ba_prop_battle_glowstick_01", ["bone"] = 28422,
		["x"] = 0.0700,
		["y"] = 0.1400,
		["z"] = 0.0,
		["xR"] = -80.0,
		["yR"] = 20.0,
		["zR"] = 0.0
	},
	["glowstickLeft"] = {
		["model"] = "ba_prop_battle_glowstick_01",
		["bone"] = 60309,
		["x"] = 0.0700,
		["y"] = 0.0900,
		["z"] = 0.0,
		["xR"] = -120.0,
		["yR"] = 20.0,
		["zR"] = 0.0
	},
	["toyHorse"] = {
		["model"] = "ba_prop_battle_hobby_horse",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["cup"] = {
		["model"] = "prop_plastic_cup_02",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["hamburger"] = {
		["model"] = "prop_cs_burger_01",
		["bone"] = 18905,
		["x"] = 0.13,
		["y"] = 0.07,
		["z"] = 0.02,
		["xR"] = 120.0,
		["yR"] = 16.0,
		["zR"] = 60.0
	},
	["sandwich"] = {
		["model"] = "prop_sandwich_01",
		["bone"] = 18905,
		["x"] = 0.13,
		["y"] = 0.05,
		["z"] = 0.02,
		["xR"] = -50.0,
		["yR"] = 16.0,
		["zR"] = 60.0
	},
	["donut"] = {
		["model"] = "prop_amb_donut",
		["bone"] = 18905,
		["x"] = 0.13,
		["y"] = 0.05,
		["z"] = 0.02,
		["xR"] = -50.0,
		["yR"] = 16.0,
		["zR"] = 60.0
	},
	["water"] = {
		["model"] = "prop_ld_flow_bottle",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["sprunk"] = {
		["model"] = "prop_ld_can_01",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["ego"] = {
		["model"] = "prop_choc_ego",
		["bone"] = 60309,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["coffee"] = {
		["model"] = "p_amb_coffeecup_01",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["cola"] = {
		["model"] = "prop_ecola_can",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["glasswhiskey"] = {
		["model"] = "prop_drink_whisky",
		["bone"] = 28422,
		["x"] = 0.01,
		["y"] = -0.01,
		["z"] = -0.06,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["glasswine"] = {
		["model"] = "prop_drink_redwine",
		["bone"] = 28422,
		["x"] = 0.01,
		["y"] = -0.01,
		["z"] = -0.06,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["energydrink"] = {
		["model"] = "prop_energy_drink",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["beer"] = {
		["model"] = "prop_beer_bottle",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = -0.15,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["dusche"] = {
		["model"] = "prop_amb_beer_bottle",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["whiskey"] = {
		["model"] = "p_whiskey_bottle_s",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = 0.0,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["vodka"] = {
		["model"] = "prop_vodka_bottle",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = -0.15,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["tequila"] = {
		["model"] = "prop_tequila_bottle",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = -0.15,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["champagne"] = {
		["model"] = "prop_wine_white",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = -0.15,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["whitewine"] = {
		["model"] = "prop_wine_white",
		["bone"] = 28422,
		["x"] = 0.0,
		["y"] = 0.0,
		["z"] = -0.15,
		["xR"] = 0.0,
		["yR"] = 0.0,
		["zR"] = 0.0
	},
	["taco"] = {
		["model"] = "prop_taco_01",
		["bone"] = 18905,
		["x"] = 0.13,
		["y"] = 0.07,
		["z"] = 0.02,
		["xR"] = 160.0,
		["yR"] = 0.0,
		["zR"] = -50.0
	}
}

attachedProp = 0
function removeAttachedProp()
    DeleteEntity(attachedProp)
    attachedProp = 0
end

RegisterNetEvent('attachPropDrugsObjectnoanim')
AddEventHandler('attachPropDrugsObjectnoanim', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
    removeAttachedProp()

    attachModel = GetHashKey(attachModelSent)
    boneNumber = boneNumberSent
    SetCurrentPedWeapon(PlayerPedId(), 0xA2719263) 
    local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
    --local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
    RequestModel(attachModel)
    while not HasModelLoaded(attachModel) do
        Citizen.Wait(100)
    end
    attachedProp = CreateObject(attachModel, 1.0, 1.0, 1.0, 1, 1, 0)
    -- exports["isPed"]:GlobalObject(attachedProp)
    AttachEntityToEntity(attachedProp, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 1, 0, 0, 2, 1)
    Citizen.Wait(5000)
    removeAttachedProp()
end)

RegisterNetEvent('attachPropTest')
AddEventHandler('attachPropTest', function()
	--attachModelSent,boneNumberSent,x,y,z,xR,yR,zR
	--TriggerEvent("attachProp","prop_golf_iron_01", 57005, 0.085, 0.0, 0.0, 90.0, -118.0, 44.0)
	--TriggerEvent("attachProp","w_ar_advancedrifle", 57005, 0.14, 0.00, 0.0, 160.0, -60.0, 10.0)

	TriggerEvent("attachItemPerm","briefcase01")
	--prop_golf_putter_01
	--TaskStartScenarioInPlace(PlayerPedId(), "WORLD_HUMAN_GOLF_PLAYER", 0, false);
end)

RegisterNetEvent('attachItem69')
AddEventHandler('attachItem69', function(item)
	TriggerEvent("attachProp69",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attachItemPhone')
AddEventHandler('attachItemPhone', function(item)
	TriggerEvent("attachPropPhone",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attachItemRadio')
AddEventHandler('attachItemRadio', function(item)
	TriggerEvent("attachPropRadio",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attachItemClipboard')
AddEventHandler('attachItemClipboard', function(item)
	TriggerEvent("attachPropClipboard",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attachItem')
AddEventHandler('attachItem', function(item)
	TriggerEvent("attachProp",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attachItemPerm')
AddEventHandler('attachItemPerm', function(item)
	TriggerEvent("attachPropPerm",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attach:cigar')
AddEventHandler('attach:cigar', function()
	TriggerEvent("attachItemPerm","cigar01")
end)

RegisterNetEvent('attachItemObjectnoanim')
AddEventHandler('attachItemObjectnoanim', function(item)
    TriggerEvent("attachPropDrugsObjectnoanim",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
end)

RegisterNetEvent('attach:suitcase')
AddEventHandler('attach:suitcase', function()
	TriggerEvent("attachItemPerm","briefcase01")
end)

RegisterNetEvent('attach:boombox')
AddEventHandler('attach:boombox', function()
	TriggerEvent("attachItemPerm","boombox01")
end)

RegisterNetEvent('attach:box')
AddEventHandler('attach:box', function()
	TriggerEvent("animation:carry","box01")
end)

RegisterNetEvent('attach:blackDuffelBag')
AddEventHandler('attach:blackDuffelBag', function()
	TriggerEvent("attachItemPerm","blackduffelbag")
end)

RegisterNetEvent('attach:medicalBag')
AddEventHandler('attach:medicalBag', function()
	TriggerEvent("attachItemPerm","medicalBag")
end)

RegisterNetEvent('attach:securityCase')
AddEventHandler('attach:securityCase', function()
	TriggerEvent("attachItemPerm","securityCase")
end)

RegisterNetEvent('attach:toolbox')
AddEventHandler('attach:toolbox', function()
	TriggerEvent("attachItemPerm","toolbox")
end)

RegisterNetEvent('attach:test')
AddEventHandler('attach:test', function()
	TriggerEvent("attachItemPerm","test")
end)

RegisterNetEvent('attach:healthpack01')
AddEventHandler('attach:healthpack01', function()
	TriggerEvent("attachItemPerm","healthpack01")
end)

RegisterNetEvent('attach:removeall')
AddEventHandler('attach:removeall', function()
	TriggerEvent("disabledWeapons",false)
	TriggerEvent("destroyPropPerm")
	if(carryingObject) then
		TriggerEvent("attach:box")
	end
end)

function removeAttachedcarryObject()
	if DoesEntityExist(carryObject) then
		DeleteEntity(carryObject)
		carryObject = 0
		TriggerEvent("debug", 'Attached: Remove Attached Prop (Carry)', 'error')
	end
end

RegisterNetEvent('destroycarryObject')
AddEventHandler('destroycarryObject', function()
	removeAttachedcarryObject()
end)

RegisterNetEvent('attachcarryObject')
AddEventHandler('attachcarryObject', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	removeAttachedcarryObject()
	attachModel = GetHashKey(attachModelSent)
	boneNumber = boneNumberSent
	SetCurrentPedWeapon(PlayerPedId(), 0xA2719263)
	local bone = GetPedBoneIndex(PlayerPedId(), boneNumberSent)
	--local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
	RequestModel(attachModel)
	while not HasModelLoaded(attachModel) do
		Citizen.Wait(100)
	end
	carryObject = CreateObject(attachModel, 1.0, 1.0, 1.0, 1, 1, 0)
	AttachEntityToEntity(carryObject, PlayerPedId(), bone, x, y, z, xR, yR, zR, 1, 1, 0, 0, 2, 1)
	TriggerEvent("debug", 'Attached: Attached Prop (Carry)', 'success')
end)

carryingObject = false
carryObject = 0
objectType = 0

carryAnimType = 49

RegisterNetEvent('animation:carryshort');
AddEventHandler('animation:carryshort', function()
	carryAnimType = 16
	carryingObject = true
	Citizen.Wait(5000)
	carryingObject = false
	carryAnimType = 49
end)

RegisterNetEvent('animation:carryt');
AddEventHandler('animation:carryt', function()
	TriggerEvent("animation:carry","drugtest01")
end)

RegisterNetEvent('animation:carry');
AddEventHandler('animation:carry', function(item)
	if not carryingObject then
		if(item["model"] ~= nil) then
			RequestModel(item["model"])
			while not HasModelLoaded(item["model"]) do
				Citizen.Wait(1)
			end
		end
		carryAnimType = 49
		carryingObject = true
		objectType = objectPassed
		TriggerEvent("attachcarryObject",attachPropList[item]["model"], attachPropList[item]["bone"], attachPropList[item]["x"], attachPropList[item]["y"], attachPropList[item]["z"], attachPropList[item]["xR"], attachPropList[item]["yR"], attachPropList[item]["zR"])
	else
		removeAttachedcarryObject()
		carryingObject = false
		carryObject = 0
		objectType = 0
		carryAnimType = 49
	end
end)

local canceled = false
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1)
		if carryingObject then
			RequestAnimDict('anim@heists@box_carry@')
			while not HasAnimDictLoaded("anim@heists@box_carry@") do
				Citizen.Wait(0)
				ClearPedTasksImmediately(PlayerPedId())
			end
			if not IsEntityPlayingAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 3) then
				TaskPlayAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 8.0, -8, -1, carryAnimType, 0, 0, 0, 0)
				canceled = false
			end
		else
			if IsEntityPlayingAnim(PlayerPedId(), "anim@heists@box_carry@", "idle", 3) and not canceled then
				ClearPedTasksImmediately(PlayerPedId())
				canceled = true
			end
			Wait(1000)
		end
	end
end)

InjuryIndexList = {
	{ "Pelvis","4103","11816" },
	{ "Left Thigh","4103","58271" },
	{ "Left Calf","4103","63931" },
	{ "Left Foot","4103","14201" },
	{ "Left Knee","119","46078" },
	{ "Right Thigh","4103","51826" },
	{ "Right Calf","4103","36864" },
	{ "Right Foot","4103","52301" },
	{ "Right Knee","119","16335" },
	{ "Spine Lower","4103","23553" },
	{ "Spine Mid Lower","4103","24816" },
	{ "Spine Mid","4103","24817" },
	{ "Spine High","4103","24818" },
	{ "Left Clavicle","4103","64729" },
	{ "Left UpperArm","4103","45509" },
	{ "Left Forearm","4215","61163" },
	{ "Left Hand","4215","18905" },
	{ "Left Finger Pinky","4103","26610" },
	{ "Left Finger Index","4103","26611" },
	{ "Left Finger Middle","4103","26612" },
	{ "Left Finger Ring","4103","26613" },
	{ "Left Finger Thumb","4103","26614" },
	{ "Left Hand","119","60309" },
	{ "Left ForeArmRoll","7","61007" },
	{ "Left ArmRoll","7","5232" },
	{ "Left Elbow","119","22711" },
	{ "Right Clavicle","4103","10706" },
	{ "Right UpperArm","4103","40269" },
	{ "Right Forearm","4215","28252" },
	{ "Right Hand","4215","57005" },
	{ "Right Finger Pinky","4103","58866" },
	{ "Right Finger Index","4103","58867" },
	{ "Right Finger Middle","4103","58868" },
	{ "Right Finger Ring","4103","58869" },
	{ "Right Finger Thumb","4103","58870" },
	{ "Right Hand","119","28422" },
	{ "Right Hand","119","6286" },
	{ "Right ForeArmRoll","7","43810" },
	{ "Right ArmRoll","7","37119" },
	{ "Right Elbow","119","2992" },
	{ "Neck","4103","39317" },
	{ "Head","4103","31086" },
	{ "Head","119","12844" },
	{ "Face Left Brow_Out","1799","58331" },
	{ "Face Left Lid_Upper","1911","45750" },
	{ "Face Left Eye","1799","25260" },
	{ "Face Left CheekBone","1799","21550" },
	{ "Face Left Lip_Corner","1911","29868" },
	{ "Face Right Lid_Upper","1911","43536" },
	{ "Face Right Eye","1799","27474" },
	{ "Face Right CheekBone","1799","19336" },
	{ "Face Right Brow_Out","1799","1356" },
	{ "Face Right Lip_Corner","1911","11174" },
	{ "Face Brow_Centre","1799","37193" },
	{ "Face UpperLipRoot","5895","20178" },
	{ "Face UpperLip","6007","61839" },
	{ "Face Left Lip_Top","1911","20279" },
	{ "Face Right Lip_Top","1911","17719" },
	{ "Face Jaw","5895","46240" },
	{ "Face LowerLipRoot","5895","17188" },
	{ "Face LowerLip","6007","20623" },
	{ "Face Left Lip_Bot","1911","47419" },
	{ "Face Right Lip_Bot","1911","49979" },
	{ "Face Tongue","1911","47495" },
	{ "Neck","7","35731" }
}

Smoke weed female

As the joint emote in now, females are unable to do the animation for smoking.
The emote that works for females are WORLD_HUMAN_SMOKING_POT.

nice easy function handsup

Citizen.CreateThread(function()
local dict = "missminuteman_1ig_2"

RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
	Citizen.Wait(100)
end
local handsup = false
while true do
	Citizen.Wait(0)
	if IsControlJustPressed(1, 323) then 
        if not handsup then
            TaskPlayAnim(GetPlayerPed(-1), dict, "handsup_enter", 8.0, 8.0, -1, 50, 0, false, false, false)
            handsup = true
        else
            handsup = false
            ClearPedTasks(GetPlayerPed(-1))
        end
    end
end

end)

seatbelt.lua

So as im looking threw the seatbelt. lua folder i saw that there was suppose to have sound when clicking and engaging the seatbelt. there is no sound and supposedly there's a progress bar that was suppose to be active when u click E. that doesn't work

[BUG] Negating sideways momentum in a corner by using cruise control

By abusing the enabling of cruise control you can force your car to negate any sideways momentum and launch the car forward being able to take insanely unrealistic corners.

To Reproduce
Simply drive very fast in a straight line, with a hard handbrake turn rotate your car sideways, then while your car is essentially drifting sideways just enable the cruise control and your sideways momentum dissapears and you'll go at the speed of your speedometer in the direction that you are facing.

Expected behavior
While drifting sideways and enabling cruise control i expect cruise control to basically not work at all. as i am not driving forward

Screenshots
I have a video
https://cdn.discordapp.com/attachments/929226960951975986/944659277006635048/qbbug.mp4

Questions (please complete the following information):

  • When you last updated: About 2 weeks ago
  • Are you using custom resource? LJ-Hud and ofcourse the custom cars with custom handling (though it works on any car even standard gta v ones)
  • Have you renamed qb- to something custom? No

Additional context
While this is an exploit admins can easily identify and punish for. i think we should aim for these kind of things to not happen at all. If i can find a fix for this myself i'll report it in the qb discord but so far i haven't found a fix. And although it is easy to identify when chasing someone as a cop. when the getaway gets out of sight they could easily use this at a couple corners to gain just that extra little bit of advantage.

qbbug.mp4

Infinity Armor

I run out of armor and whenever I leave and enter the server, the armor is new

[Suggestion] Change prone and add config

So the prone is cool, but some people don't like it, so would be nice to have a config for turning the prone part off. Or if you can pop how to disable it into the readme. It's a frequent request in the support channels on Discord.

Changing seatbelt key isnt working

Hi, im trying to change the seatbelt key for qb-smallresources, i found in the client seatbelt.lua on line 33 the following text i changed it from B to G.
Line33:RegisterKeyMapping('toggleseatbelt', 'Toggle Seatbelt', 'keyboard', 'G')

Allready done a full restart and it doesnt change the key.

[Suggestion] Add a "Hands Up" button option that toggles with a keybind and command.

I have a handsup script already for this inside of my smallresources, but it's a bit janky on function (have to hold X to cancel it) so it may need to be re-written, however it's important for players to have a bind for this that isn't a F# key for RP sakes. Generally it's X (Which is also the dp-emote cancel too)

Here is my code if you want to add this and fix it to make it better:

`RegisterCommand('hu', function()
Citizen.Wait(100)
TriggerEvent('animations:client:EmoteCommandStart', {"handsup"})

end)

RegisterKeyMapping('hu', 'Put Hands Up', 'KEYBOARD', 'X')`

Native Error

A native error is showing up in console while using player hostage. But there is no issue with the script and it is working fine.
image

[Suggestion] More diverse teleport options

So while I was setting up the qb-ambulancejob script, I noticed Pillbox had a teleport function in there, however it doesn't match the nice style of qb-smallresources teleport.

I suggest re-writing the teleport function for smallresources to allow multiple configs for teleport location with the ability to set the DrawText text per one, instead of being stuck to [E] Use Elevator.

QB logs broken

Half the logs do not work correctly also in the inventory logs when ever you left click it will spam the logs with random data

Teleport locations not showing

I definitely had this working at one point, but it seems to have stopped completely now. I am using the pure vanilla script of here with no changes.

  1. Go to 909.49, -1589.22, 30.51, 92.24 for the coke entrance (I've been to all the pre-done locations and there are no TP's there)
  2. Note that it's missing

error on fresh install

[script:qb-smallresou] Error loading script @qb-core/import.lua in resource qb-smallresources: citizen:/scripting/lua/scheduler.lua:1155: No such export GetSharedObject in resource qb-core
[script:qb-smallresou] stack traceback:
[script:qb-smallresou] [C]: in function 'error'
[script:qb-smallresou] citizen:/scripting/lua/scheduler.lua:1155: in metamethod '__index'
[script:qb-smallresou] @qb-core/import.lua:9: in main chunk

Set day length

Is there a way to set the length of a day compared to IRL minutes or hours?

issues When jumping from a very tall building

When jumping from a very tall building
When jumping press ctrl More than once ,The player will stand on his feet, Will not die
This is a bug that needs to be fixed
The player must be prevented from press ctrl and any key
He must lose control

First Person Pointing is broken

If you point in first person, you can make things look really wacky

unknown

And by holding right click while in first person while pointing

image

And when crouching/pointing:
image

Prone
image

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.