[ESX] [FREE] esx_ammosystem

Welcome everyone! Today I release another one of my scripts.
I made ammo system which was inspired by some random servers. I asked them for the script but they didn’t give it to me :slightly_frowning_face: so I decided to create my own version of it which I want to share with you!

not many but some.

Features:
-Separated ammo types for different types of guns!
-Easy to change and add things script!
-I always offer my help below!

Dependencies:

es_extended(obviously). Im using limit system just so you know

And that’s all!

I won’t post any pictures or anything. because It just removes ammo when you shoot a gun. I also tried to make it use as little resources as It could. It shouldn’t crash server or anything(I think…). So yeah. Enjoy!

And I will add that I will be updating later or if someone gives me an idea what could be better! (and yes I will be adding configs. and maybe some translations later on)

Download

Update 1.0
-Changed a little bit how the setting ammo works(on GetHashKey and if you are holding a gun, not every server event there is)
-Slightly reduced the event overflow(if someone would ever get this)

My other work:

[Release] free Simple AI doctor - FiveM Resource Development & Modding / Releases - Cfx.re Community
[Release]esx_autorepairshop - FiveM Resource Development & Modding / Releases - Cfx.re Community

6 Likes

so true big boom!! :anguished: :anger: :boom:

I will add that I tested this script on more than just localhost. And server wasn’t doomed. And it only triggers when you are holding weapon. Its needed because well, I don’t know any other method for counting how many bullets you have in your inventory. And also Citizen.Wait(100) is because as I said to use as little resources as possible. I will be adding something like GetHashKey for it to be just triggering server event when you are holding one weapon and not all of them.

Edit: I updated script. Its using less server events and If you are holding a type of gun that is defined in setammo. Server is not going to crash. Just don’t touch any Citizen.Wait(100). or else you can get event overflow. Change them to higher values if you want tho!

I would post same reply like I posted above but forum does not let me. Read it if you can. Thanks!

Don’t use script then. If 100 players have guns then well. You have good community there :joy:(I know its example, but still. Kinda shitty one.) You can change these numbers if you want. Bigger server can get other script or make it themselfs. Or just don’t use it. And it’s better if you have 10 events per second than 1000. Don’t you think? And you can add something like IfIsPedShooting after every if weapon==[…] so yeah. And if you have better solution then be my guest and tell me or just send here example of how would you solve it

And another one guy that thinks if he says “trash” he will be cool. No. You are still not cool. Go back to roblox.

1 Like

ông ơi ! tôi dùng epic connect steam kiểu gì vậy ?


lỗi này xử lí như thế nào vậy a

4 Likes

ông fix được chưa ạ?

em xin vao thanh pho ạ

1 Like

anh oi cho em vao sever voi anh

bro oi cho toi xin vao server

sao vo sv ko dc vay connection failed

Rocket where are fxmanifest ?

This resource actually contains two separate resources.

when i giving item the weapon do not shooting but when i giving it typing +1 ammo


as you can see @rocket5115

One thing that comes with scripts back few years is that they don’t really work on newer implementations of frameworks.

This script has been made for at most ESX V1 Final, where scripts were lacking.
I suggest you look at newer implementations of ammo system, or check out OX.

Sorry that I can’t help you. Most probably you have a resource/s that are blocking native functions(or overriding their result) which is common in post 2022 framework releases.

1 Like