Weapons are always available even after death. How to cure it?
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.
Do you know how to put the arsenal back to zero after a death?
Yes please after death, the weapon are always here and when people disconnect and reconnect, they don t have mag. Thanks
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
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)
Thks ^^ now all its good!
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
Thanks for your help 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.)