[Release] Weapons Resource

, ,

doesnt seem to be working

That doesn’t help anyone. What doesn’t work? Do you get any errors? Did you configure it correctly?

1 Like

:point_up:

Could you elaborate?

1 Like

only thing i changed in config is what guns are full auto and which ones arent semi. the resource starts and all but it doesnt seem to work

only thing i changed in config is what guns are full auto and which ones arent semi. the resource starts and all but it doesnt seem to work

Can you show a screenshot of your config, as well as check your consoles for errors.

I’d like to implement stadus_skills to reduce reload time after multiple times of reload simulating a growing trend in reloading. However after i tried to implement either from FiveM Native (IsPedReloading) or below.

					if IsDisabledControlJustPressed(1, 45) and not FireMode.Reloading then
						FireMode.Reloading = true
						FireMode.ShootingDisable = true
						if IsPlayerFreeAiming(PlayerId) then SetPlayerForcedAim(PlayerId, true) end
						Citizen.Wait(400)
						MakePedReload(PlayerPed)
						Citizen.Wait(300)
						SetPlayerForcedAim(PlayerId, false)
						FireMode.ShootingDisable = false
						FireMode.Reloading = false
						TriggerEvent('stadus_skills:reload')
					-- If they is only one bullet left in the magazine
					-- Or if the firemode is burst, and out of ammo

The script would break and cause the player to reload rapidly. Is there anyway to implement my idea or it’s not possible at this stage. Thankyou in advanced.

I’m not sure how that resource works, but you’d need to edit the Citizen.Wait()s in order to change the reload time.

Here is a video of what exactly happened after adding

TriggerEvent('stadus_skills:reload')

The first two shots were without any modification of your script which shows it works perfectly fine. However it will force to reload after adding the event. Would you have any idea why it is causing this? The skill scripts basically sends a notification and updating sql database.

I’m confused as to what you’ve changed in the script to make you reload faster, unless the external resource is trying to handle reloads at the same time?

I haven’t implement the reduction in reload delay yet. This problem was encountered when I attempt to increase skill level after reload. As shown as the video. I cannot continue unless the forced reload bug can be resolved.

Let me briefly explain in how to reduce reload delay. The event stadus_skills:reload will register the increased skills to database. The reduction will require a server callback to retrieve the level and after a formula to transform the level (1-100) into ms and minus the current default delay 300.

The issue is that this ‘bug’ has been introduced by your modification, so you’ll need to find the conflict in order to continue.

Is there a line or way to potentially increase the rate of fire for handguns to bring the speed up a smidge more between shots?

The resource does not affect the fire rate of any weapons, it just blocks shooting according to the fire mode. Handguns, for example, are stopped after a single bullet, but once you release the trigger and press it again, any delay after that is base game I’m afraid.

https://github.com/inferno-collection/Weapons/blob/5fb4a5e994fb95a7775e452e30ec3d185a5d2521/[inferno-collection]/inferno-weapons/client.lua#L338-L345

Oohh. That’s good to know! I really appreciate the response to the message. Thank you! :slight_smile:

Version 1.3 Beta now available on Github.


Added:

  • Delay to flashlight button check to stop spamming, which caused networking issues.
  • A check on the server to see if there are any changes to the flashlights.
    • This means instead of spamming the client with updates, it only sends them as needed.
  • .gitignore, finally
  • Jump-label for the active weapon loops

Changed:

  • Move some DisableControlActions() outside of the master loop in an attempt to stop an issue where the stock GTA 5 flashlight came on when you pressed E.
  • Default firemode change key from 26 to 319.
    • It’s still C, just not bound to anything on controller.
  • Networking on the server side to fix an issue where flashlights would not update on the client properly.
  • Client now stores it lasted use weapon with flashlight, meaning it only has to send one request to the server when it changes weapon, instead of spamming it every single tick.
  • 's back to " - I can’t make my mind up /shrug
  • Contracted a lot of nested if statements
  • General code clean-up
  • Small change to the way the limp animation set is requested
  • Contracted the Javascript in the NUI file

Removed:

  • Checking if a client event needed to be triggered, inside of a loop, that only triggered when a variable was set, that was only set inside two other events… I know, and I very sorry for this abomination, please forgive me.

Anyway I can make it so it only takes the persistent flashlight and manual reload from this script?

seems to delay combat pistol fire rate and with onesync speed it up

where do I remove the reticle.

The resource doesn’t really affect the fire rate per se, just disables shooting to simulate fire modes. I don’t see how OneSync would change anything.

Only weapons in the Config.Weapons.Reticle list will have a reticle, it is automatically removed for the rest.