[RELEASE] B1G Prop System / +27 Default Props / Full Costumizable / RP Improvement

I have i problem when i use it it dosent spawn the prop in my hand

use __resource instead of fxmanifest and it will work, dont ask me why

1 Like

is there any fix to getting this thing working in December? when we try to use it in my server it gives us no errors at all but none of the props spawn

great job !

is there an update for this to work w onesync?

1 Like

there is a missing bracket at the end of the props code thatā€™s why it doesnā€™t work. add that bracket and it will work

^^^^^^
attachPropList = {
at the end of the code add this bracket > }

at least on my end was a missing bracket

ok so i found out why the props donā€™t show, they only show if you are close to a garage, if you like in the middle of somewhere it does not show.
why the hell? this is so weird

Try using __resource instead of fxmanifest and check if it solves your problem.

still the same it seems it only shows in this area

resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"

game 'gta5'

name 'B1G'
author 'B1G - https://github.com/CarlosVergikosk'
version 'v1.0'

client_script {
	'prop.lua'
}


exports {
	'attach',
	'removeall'
}

i have also renamed the folder*

image

use this simple model and try

1 Like
resource_manifest_version "05cfa83c-a124-4cfa-a768-c24a5811d8f9

i place this
and still not showing the props.

so naquela area do mapa o que e estranho!!

You edited the script, the official version works fine.

only the names to english, the key and the message

local holdingPackage  = false
local dropkey 	= 303 -- Key to drop/get the props
local closestEntity = 0


-- Proplist, you can add as much as you want
attachPropList = {
	{["model"] = 'prop_roadcone02a',				["name"] = "cone", 		["bone"] = 28422, ["x"] = 0.6,	["y"] = -0.15,	["z"] = -0.1,	["xR"] = 315.0,	["yR"] = 288.0, ["zR"] = 0.0, 	["anim"] = 'pick' }, -- Done
    {["model"] = 'prop_cs_trolley_01',				["name"] = "trolley", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.6,	["z"] = -0.8,	["xR"] = -180.0,["yR"] = -165.0,["zR"] = 90.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_table_03',					["name"] = "mesa", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.8,	["z"] = -0.7,	["xR"] = -180.0,["yR"] = -165.0,["zR"] = 90.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_tool_box_04',				["name"] = "toolbox", 	["bone"] = 28422, ["x"] = 0.4,	["y"] = -0.1,	["z"] = -0.1,	["xR"] = 315.0,	["yR"] = 288.0, ["zR"] = 0.0, 	["anim"] = 'pick' }, -- Done
	{["model"] = "xm_prop_smug_crate_s_medical",			["name"] = "MedBox", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.1,	["z"] = -0.1,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = 'xm_prop_x17_bag_med_01a',				["name"] = "MedBag", 		["bone"] = 28422, ["x"] = 0.4,	["y"] = -0.1,	["z"] = -0.1,	["xR"] = 315.0,	["yR"] = 298.0, ["zR"] = 0.0, 	["anim"] = 'pick' }, -- Done
	{["model"] = "imp_prop_impexp_car_door_04a",			["name"] = "door", 		["bone"] = 28422, ["x"] = -0.5,	["y"] = -0.15,	["z"] = 0.4,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 90.0 , ["anim"] = 'hold' }, -- Done
	--{["model"] = "imp_prop_impexp_front_bars_01a",			["name"] = "...", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.25,	["z"] = -0.1,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = "imp_prop_impexp_bonnet_03a",			["name"] = "bonnet", 		["bone"] = 28422, ["x"] = 0.2,	["y"] = 0.2,	["z"] = -0.1,	["xR"] = -0.0,	["yR"] = 0.0, 	["zR"] = 180.0 ,["anim"] = 'hold' }, -- Done
	{["model"] = "imp_prop_impexp_front_bumper_02a",		["name"] = "bumper", 	["bone"] = 28422, ["x"] = 0.0,	["y"] = 0.1,	["z"] = 0.05,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = "prop_car_battery_01",				["name"] = "battery", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.1,	["z"] = -0.05,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = "prop_wheel_tyre",					["name"] = "tire", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.1,	["z"] = -0.05,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = "prop_table_03_chr",				["name"] = "chair", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.2,	["z"] = -0.6,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_engine_hoist',				["name"] = "enginehoist", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.5,	["z"] = -1.3,	["xR"] = -195.0,["yR"] = -180.0,["zR"] = 180.0, ["anim"] = 'hold' }, -- Done
	{["model"] = "ex_office_swag_guns03",				["name"] = "weapons", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = 0.0,	["z"] = -0.05,	["xR"] = 90.0,	["yR"] = 180.0, ["zR"] = 90.0 , ["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_cs_cardbox_01',				["name"] = "box", 		["bone"] = 28422, ["x"] = 0.01,	["y"] = 0.01,	["z"] = 0.0,	["xR"] = -255.0,["yR"] = -120.0,["zR"] = 40.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = "imp_prop_impexp_lappy_01a",			["name"] = "laptop", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = 0.0,	["z"] = -0.15,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = 'xm_prop_x17_bag_01a',				["name"] = "bag", 		["bone"] = 28422, ["x"] = 0.4,	["y"] = -0.1,	["z"] = -0.1,	["xR"] = 315.0,	["yR"] = 298.0, ["zR"] = 0.0, 	["anim"] = 'pick' }, -- Done
	{["model"] = "p_ld_soc_ball_01",				["name"] = "ball", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = 0.0,	["z"] = 0.0,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = "p_gcase_s",					["name"] = "weaponbag", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.25,	["z"] = -0.1,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_cleaning_trolly',				["name"] = "cleaningcar",	["bone"] = 28422, ["x"] = -0.2,	["y"] = -0.4,	["z"] = -1.2,	["xR"] = -188.0,["yR"] = -178.0,["zR"] = 180.0, ["anim"] = 'hold' }, -- Done
	{["model"] = "prop_mp_drug_package",				["name"] = "drugs", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.25,	["z"] = -0.05,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0 , 	["anim"] = 'hold' },
	{["model"] = 'prop_premier_fence_02',				["name"] = "ads",  	["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.6,	["z"] = -0.2,	["xR"] = -180.0,["yR"] = -165.0,["zR"] = 90.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_premier_fence_01',				["name"] = "fence", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.6,	["z"] = -0.8,	["xR"] = -180.0,["yR"] = -165.0,["zR"] = 90.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = 'prop_kino_light_02',				["name"] = "light", 		["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.6,	["z"] = -0.8,	["xR"] = -180.0,["yR"] = -165.0,["zR"] = 90.0, 	["anim"] = 'hold' }, -- Done
	{["model"] = "prop_cash_case_01",				["name"] = "moneybag", 	["bone"] = 28422, ["x"] = 0.0,	["y"] = -0.1,	["z"] = -0.1,	["xR"] = 0.0,	["yR"] = 0.0, 	["zR"] = 0.0, 	["anim"] = 'hold' }, -- Done
	
}

RegisterNetEvent('inrp_propsystem:attachProp')
AddEventHandler('inrp_propsystem:attachProp', function(attachModelSent,boneNumberSent,x,y,z,xR,yR,zR)
	notifi("~w~ Press ~r~U~w~ to drop or pickup                 ~w~Do ~r~/r~w~ to remove", true, false, 190)
    closestEntity = 0
    holdingPackage = true
    local attachModel = GetHashKey(attachModelSent)
    SetCurrentPedWeapon(GetPlayerPed(-1), 0xA2719263) 
    local bone = GetPedBoneIndex(GetPlayerPed(-1), boneNumberSent)
    RequestModel(attachModel)
    while not HasModelLoaded(attachModel) do
        Citizen.Wait(0)
    end
    closestEntity = CreateObject(attachModel, 1.0, 1.0, 1.0, 1, 1, 0)
	for i=1 ,#attachPropList , 1 do
		if (attachPropList[i].model == attachModelSent) and (attachPropList[i].anim == 'hold') then
			holdAnim()
		end
	end
	Citizen.Wait(200)
    AttachEntityToEntity(closestEntity, GetPlayerPed(-1), bone, x, y, z, xR, yR, zR, 1, 1, 0, true, 2, 1)
end)

function notifi(text)
	BeginTextCommandDisplayHelp("STRING")
	AddTextComponentSubstringPlayerName(text)
	EndTextCommandDisplayHelp(0, false, false, 3000)
end

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

function randPickupAnim()
  local randAnim = math.random(7)
    loadAnimDict('random@domestic')
    TaskPlayAnim(GetPlayerPed(-1),'random@domestic', 'pickup_low',5.0, 1.0, 1.0, 48, 0.0, 0, 0, 0)
end

function holdAnim()
    loadAnimDict( "anim@heists@box_carry@" )
	TaskPlayAnim((GetPlayerPed(-1)),"anim@heists@box_carry@","idle",4.0, 1.0, -1,49,0, 0, 0, 0)
end

Citizen.CreateThread( function()
    while true do 
		Citizen.Wait(10)		
		if IsPedOnFoot(GetPlayerPed(-1)) and not IsPedDeadOrDying(GetPlayerPed(-1)) then
			if IsControlJustReleased(0, dropkey) then
				local playerPed = PlayerPedId()
				local coords    = GetEntityCoords(playerPed)
				local closestDistance = -1
				closestEntity   = 0
				for i=1, #attachPropList, 1 do
					local object = GetClosestObjectOfType(coords, 1.5, GetHashKey(attachPropList[i].model), false, false, false)
					if DoesEntityExist(object) then
						local objCoords = GetEntityCoords(object)
						local distance  = GetDistanceBetweenCoords(coords, objCoords, true)
						if closestDistance == -1 or closestDistance > distance then
							closestDistance = distance
							closestEntity   = object
							if not holdingPackage then
								local dst = GetDistanceBetweenCoords(GetEntityCoords(closestEntity) ,GetEntityCoords(GetPlayerPed(-1)),true)                 
								if dst < 2 then
									holdingPackage = true
									if attachPropList[i].anim == 'pick' then
										randPickupAnim()
									elseif attachPropList[i].anim == 'hold' then
										holdAnim()
									end
									Citizen.Wait(550)
									NetworkRequestControlOfEntity(closestEntity)
									while not NetworkHasControlOfEntity(closestEntity) do
										Wait(0)
									end
									SetEntityAsMissionEntity(closestEntity, true, true)
									while not IsEntityAMissionEntity(closestEntity) do
										Wait(0)
									end
									SetEntityHasGravity(closestEntity, true)
									AttachEntityToEntity(closestEntity, GetPlayerPed(-1),GetPedBoneIndex(GetPlayerPed(-1), attachPropList[i].bone), attachPropList[i].x, attachPropList[i].y, attachPropList[i].z, attachPropList[i].xR, attachPropList[i].yR, attachPropList[i].zR, 1, 1, 0, true, 2, 1)
								end
							else
								holdingPackage = false
								if attachPropList[i].anim == 'pick' then
									randPickupAnim()
								end
								Citizen.Wait(350)
								DetachEntity(closestEntity)
								ClearPedTasks(GetPlayerPed(-1))
								ClearPedSecondaryTask(GetPlayerPed(-1))
							end
						end
						break
					end
				end
			end
		else
			Citizen.Wait(500)
		end
	end
end)

function removeAttachedProp()
    if DoesEntityExist(closestEntity) then
        DeleteEntity(closestEntity)
    end
end

function attach(prop)
    TriggerEvent("inrp_propsystem:attachItem",prop)
end

function removeall()
    TriggerEvent("RemoveItems",false)
	ClearPedTasks(GetPlayerPed(-1))
	ClearPedSecondaryTask(GetPlayerPed(-1))
end

RegisterNetEvent('inrp_propsystem:attachItem')
AddEventHandler('inrp_propsystem:attachItem', function(item)
	for i=1 ,#attachPropList , 1 do
		if (attachPropList[i].model == item) then
			TriggerEvent("inrp_propsystem:attachProp",attachPropList[i].model, attachPropList[i].bone, attachPropList[i].x, attachPropList[i].y, attachPropList[i].z, attachPropList[i].xR, attachPropList[i].yR, attachPropList[i].zR)
		end
	end
end)

RegisterNetEvent("RemoveItems")
AddEventHandler("RemoveItems", function(sentinfo)
    SetCurrentPedWeapon(GetPlayerPed(-1), GetHashKey("weapon_unarmed"), 1)
	removeAttachedProp()
	holdingPackage = false
end)


Citizen.CreateThread( function()
	RegisterCommand("r", function()
		removeall()
	end, false)
			
	for i=1, #attachPropList, 1 do
		RegisterCommand(attachPropList[i].name, function(source, args, raw)
			local arg = args[1]

			if arg == nil then
				attach(attachPropList[i].model)
			end
			
		end, false)
	end
	
end)


Citizen.CreateThread(function() while true do Citizen.Wait(30000) collectgarbage() end end) -- Prevents RAM LEAKS :)

you can see above other players having the same problems.

Just downloaded and tested on my localhost and it works fine, its a problem with your server or your edits.

I have also tested your code and it works fine on my localhost, so its not a problem with the code but yes with the server or your server artifacts :wink:

1 Like

I didnā€™t say it was the code, I simply find it weird why it works in some parts and not others so I came for help,
of course, itā€™s probably servers sidesā€¦
I just updated my artifacts, and still the sameā€¦
there must be a reason why only works in that area very strange.

When i type one of the commands i canā€™t see the props

same any fixes?

Can someone post their working prop manifest

How i can delete props?