There is some code where I check if it is the first time the player logs in. You can move the code to get weapons there. Then when he dies, no weapons are given
AddEventHandler('playerSpawned', function(spawn)
if firstspawn == 0 then
ShowWeashopBlips(true)
firstspawn = 1
end
TriggerServerEvent("weaponshop:playerSpawned", spawn)
end)
Into
AddEventHandler('playerSpawned', function(spawn)
if firstspawn == 0 then
ShowWeashopBlips(true)
firstspawn = 1
TriggerServerEvent("weaponshop:playerSpawned", spawn)
end
end)
Thanks again for sharing the script. I added it to my server, the database stuff works (I have the weapon when I join the serv), but I can buy the gun in shops. Have you any lead?
There is a limit to the number of weapons. This is for RP purpose. @Ryload Disabling the weapon storage is possible, but if you want to keep the max number of weapons, you need to store it in the player.lua.
I can post code for that, but it will be with very limited support.
Okay Iāve followed the Instructions to the letter and the area you use to buy weapons is not there in the weapons shops. I see you dont need the changes in the player.lua file anymore. Iāve seen this working in other servers and have been at the same shops. So not even sure what to ask for assistance at this point.
Yes the changes in player.lua is only if you donāt use the database (Like on my server)
Just make sure the database is correct and do you see any errors when running the server ?
Okay so I donāt need that then I am using a DB server. I confirmed the the login info as correct.(Got the simple banking mod working and compared the info with that as well.) I see the message from Roberto āYour weapons have been returnedā when logging in. I donāt see the info when the server is starting up as Iām not hosting the server locally,using a VPS. No error messages in the console in game either.