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

Same for me, money is well removed but I have nothing in the wheel of weapons ! Any way to fix it ?

Thank you for the release !

j’ai les meme soucis enfaite l’arme ne spawn pas :confused:

I have the same worries enfaitite the weapon does not spawn: /

EN : Hi, i have the same problem in the Weapon Store, so the weapon doesn’t spawn in the wheel of weapons but it take my money, and i have also encounter the same problem, in the Vehshop, if people can help us, because I can see that a lot of people have the same problem, so if someone have a solution, can you share with us ?

FR : Bonjour, j’ai le mĂȘme probleme avec votre script, en effet les armes ne veulent apparaitre dans la roue de selection, mais il prend tout de mĂȘme mon argent, j’ai rencontrĂ© le mĂȘme problĂšme dans le script VehShop, si quelqu’un peut nous aider, parce que je vois un bon nombre de personne ayant le mĂȘme problĂšme, donc si quelqu’un Ă  une solution, peut-il la partager avec nous ?

Thank’s for the release ! :wink:

Hey everyone,

I’m not the creator of the script, but I’m just participating to it in my way ! Thanks to @hoegarden31 for the script (who need an update cause weapons don’t spawn) and @KonScyence for all the blips position (that i corrected for the weapon shops)
So here’s all the correct position of the weapon shops :

local fakeWeapon = ''
local weashop_locations = {
{entering = {1693.609,3757.787,34.705}, inside = {1697.609,3752.787,34.705}, outside = {1693.609,3757.787,34.705}},
{entering = {251.904,-48.181,69.941}, inside = {247.904,-53.181,69.941}, outside = {251.904,-48.181,69.941}},
{entering = {843.853,-1032.534,28.194}, inside = {847.853,-1037.534,28.194}, outside = {843.853,-1032.534,28.194}},
{entering = {-330.360,6081.626,31.454}, inside = {-325.360,6076.626,31.454}, outside = {-330.360,6081.626,31.454}},
{entering = {-663.601,-936.476,21.829}, inside = {-658.601,-941.476,21.829}, outside = {-663.601,-936.476,21.829}},
{entering = {-1306.230,-392.696,36.695}, inside = {-1302.230,-397.696,36.695}, outside = {-1306.230,-392.696,36.695}},
{entering = {-1118.014,2696.657,18.554}, inside = {-1113.014,2691.657,18.554}, outside = {-1118.014,2696.657,18.554}},
{entering = {2569.424,294.712,108.734}, inside = {2574.424,289.712,108.734}, outside = {2569.424294.712,108.734}},
{entering = {-3171.910,1085.927,20.838}, inside = {-3166.910,1080.927,20.838}, outside = {-3171.910,1085.927,20.838}},
}

All the positions are the stores, right in front of the desk :slight_smile: Say thank you to the one who created the script :smiley:

10 Likes

Hey you, thank’s for the sharing, but can you help with this ?

Thank’s !

Il y a un probleme au moment ou l’on achete l’arme/le vehicule, l’argent nous est retirer et l’arme/vehicule spawn.
Car que se soit pour le es_vehshop ou le es_weashop moi l’argent est retirĂ© mais le vehicule ou l’arme ne spawn pas

There is a problem with the purchase of the weapon / vehicle, the money is withdrawn and the weapon / vehicle spawn

Because either for es_vehshop or es_weashop me the money is withdrawn but the vehicle or the weapon does not spawn

2 Likes

can we get an english version? if not I guess I will start to convert it, but still dont know french

I edited the code too and placing the shop in the Ammu-Nation stores if you want it, you can replace the weashop.lua by this code: https://github.com/Tospik/tospik_fivem_server/blob/master/weapshop

2 Likes

I just did the positions of the stores, i’m not into that script. I’m trying to fix my owns before adding them to the community :slight_smile: I’ll let the owner the right to correct it :wink:

Pour le vehicule shop c’est rĂ©glĂ© mais pour le weapon toujours pas de solutions


For the vehshop try this, but for the weapon shop part i’m waiting to have help like us


Fabulous ! Thank you Hoegarden31 :slight_smile:

thanks, I see you didnt change the language tho.
Also any help getting this working with essentialmode please lmk.

Not sure if this will help in fixing the bug about the weapon and car shop, but I run es_freeroam on my server with the essentialmode. Also make sure that the settings are correct. If you have both mods not working, then maybe the essentialmode is not working correctly. I will update this evening the github code into english version and French.
Also make a version that saves the weapons in the database.

Also for those who have problems with getting weapons in the inventory, try the loadout mod if you can. That mod has the same giveweapon command. So I don’t know what is happening.

1 Like

I use es_freeroam too. Vehicle shop works. I’m already using the loadouts as well. I’ve been trying for hours, I really want this to work. However patience is a virtue I do have. Getting this working would be well worth the wait.

1 Like

Il suffit de lire l’erreur.
dans sv_weashop.lua remplacer
user:setNbWeapons(nb_weapon) par user:nb_weapons(nb_weapon) a la ligne 16
puis
user:setNbWeapons(0) par user:nb_weapons(0) a la fin du fichier.

et enfin dans le fichier essentialmode/server/classes/player.lua
ajouter nb_weapons a la fin de la ligne 12
example : __call = function(self, source, permission_level, money, identifier, group, nb_weapons)

Normalement ça devrais fonctionner :slight_smile:
########################################################
Just read the error.
In sv_weashop.lua replace
user: setNbWeapons (nb_weapon) by user: nb_weapons (nb_weapon) in line 16
then
user: setNbWeapons (0) by user: nb_weapons (0) at the end of the file.

And finally in the file essentialmode/server/classes/player.lua
Add nb_weapons to the end of line 12
example : __call = function (self, source, permission_level, money, identify, group, nb_weapons)

Normally it should work :slight_smile:

1 Like

Sorry everyone, I forgot to mention that you need to add these functions in the player.lua file :

-- Getting number of weapons
function Player:getNbWeapons()
	return self.nb_weapons
end

-- Getting number of weapons
function Player:setNbWeapons(p)
	self.nb_weapons = p
end

These wil update the number of weapons.

Hope it will work now :slight_smile:

Hi, you should not modify the _call = function(self, source, permissionlevel, money, identifier, group, nb_weapons)
It will mess up the login script

What I forgot is to post the get and set function that needs to be added in the player.lua file.

Ok good, it also works the way I have indicated, but it was tinkering ^^
THX

:slight_smile:

1 Like

I know, but I try to keep the code clean. Maybe starting to make some global functions for the es_freeroam
 lot’s of menus uses the same code


BINGO! this really your first release? you hit a home run with this one. greatly appreciated :smiley:

@Tospik you forgot the ammunation on adams apple blvd. {20.558198928833,-1106.60925292969,29.7970275878906},

3 Likes