[Release][ES] Weapon Store [v1.1]

Weapons are always available even after death. How to cure it?

1 Like

Hey hello all, then voila for me everything works nickel however I would like that when we die the weapon is not returned to us, but if we deco and reco the it is returned. This is possible if yes what knows how to do?

thank you very much.

Ciao

EthanPwn

hey bonjour a tous, alors voila pour moi tout fonctionne nickel cependant j’aimerai que quand on meurt l’arme ne nous soit pas rendue, mais que si on dĂ©co et reco la elle soit rendue. c’ets possible si oui quelqun sait comment faire?

Merci beaucoup

My original script was in french. I translated in english before posting it here because the admins like that we do universal stuff. (Also to train people to at least open some lua files and see how everything works and maybe learn something from it)

To give weapons only when they connect, you should change this code :

AddEventHandler('playerSpawned', function(spawn)
if firstspawn == 0 then
	ShowWeashopBlips(true)
	firstspawn = 1
end
TriggerServerEvent("weaponshop:playerSpawned", spawn)
end)

into this :

AddEventHandler('playerSpawned', function(spawn)
if firstspawn == 0 then
	ShowWeashopBlips(true)
    TriggerServerEvent("weaponshop:playerSpawned", spawn)
	firstspawn = 1
end

end)

I understand that making scripts to please everyone’s needs is hard. So please try at least to do it on your own first.
If there are problems I can always help. But I will not make 20 versions of it just because 1 person don’t want rocket launchers in the store.

1 Like

Do you know how to put the arsenal back to zero after a death?

1 Like

Yes please after death, the weapon are always here and when people disconnect and reconnect, they don t have mag. Thanks

1 Like

Alors moi tout semble OK mais quand je me reconnecte je n’ai plus mes armes.
Dans la base de donnĂ©es rien ne s’enregistre.

All seems OK but when I reconnect I no longer have my weapons.
In the database nothing is saved.

Any solution?

Maybe the db settings. U have correctly insert your db info in the sv file ?

You’re right dude !!! That was the problem :wink:

1 Like

Hy I have a problem when I pay my gun and I deco reco money decent how I can block it?

That is because I added a cost to get weapons back. You can just change the cost to 0 if you want it to be free.
I made this with the idea of an RP server where nothing is free and players need to buy shark-cards in order to get their weapons back. (This is a joke for those who are still wondering after reading this :p)

1 Like

Thks ^^ now all its good!

1 Like

thanks a lot but why the markers inside the ammu-nation is in the air? and when I press enter to buy a weapon the camera go under the map but i can buy weapons

Here are the markers with the corrected z coordinate.

Thanyou my friend friend but when i replace buy these I didn’t see the ammu nations aren’t on the map 


A little help me too I am interested

if this not work [HELP]Magazine on Spwan

Thanks for your help :innocent: but both do not work revine weapons seen what are deleted from the database

Hello! Is there any way to edit the script so that if a player dies, their guns are lost ??
Thanks

I will work on this this weekend. I will make a new version that stores the weapons and only remove them when you are dead. (disconnecting will keep the weapons and give them back when you reconnect.)

4 Likes