Alright thanks for that answer
There seems to be a gamebreaking issue regarding the comas. I was in a coma, my client crashed and now everytime I log into the game I canāt access the menu. The following errors are thrown:
I have tried killing myself, as soon as I die I get a message on the bottom left side of the screen saying that Iāve committed suicide and that I will respawn in 2 minutes. I donāt even get the grey screen.Within seconds of killing myself I just respawn inside the starting building (where I can get licenses, etc.).
Any idea what could be causing this?
Question on your intent in one of your client scripts:
the spawnGarageVehicle function in client\basic_garage.lua
Why is that initial if statement there? Why delete the vehicle at all? The notify informing the user that they already have a vehicle should be enough, right?
I ask because I prefer not to make any core vrp modifications.
The car is deleted if invalid before spawning another one (broken or if the entity ownership is lost). vRP manage cars by storing the entity, but in GTA 5 entities seem to be invalid at some point, may have something to do with the netcode. By the way, if someone has a solution about that, Iām interested.
HI @Imagic I just want to know if is still only possible to put one recipe per item transformer or thereās a way to put more than one recipe??
And in my server Iām having an issue where after a couple minutes that ppl using their cars or theyāre out of the car, the server just forget that they own that car so they canāt unlock the car anymore to enter and drive, do u have any idea why this could be happening?
Sorry about these silly questions, Iām new with lua script and FiveM servers so Iām still trying to figure everything out, thank you for ur work
Itās been over 2 weeks since I am trying to get EasyAdmin queue system to work with VRP framework, but basically the base.lua file on resources/vrp overrides the playeConnecting variable on the queuesystem. I tested the queuesystem standalone and it works, but when I start my VRP resources on my fully functional server, the queue system gets ignored. Do you have any ideia how can I solve this? Although I am not the best coder any clue would be extremelly helpfull! Thanks for your time!
PS: Here is the queuesytem server script
if useQueue == "true" then
RegisterServerEvent('EasyAdmin:playerActivated')
AddEventHandler('EasyAdmin:playerActivated', function() -- stole this from hardcap so we can handle the "hardcap" ourselves
if not users[source] then
playerCount = playerCount + 1
users[source] = true
end
end)
AddEventHandler('playerDropped', function() -- stole this from hardcap so we can handle the "hardcap" ourselves
if users[source] then
playerCount = playerCount - 1
users[source] = nil
end
end)
StopResource("hardcap") -- stop hardcap, we will handle it from here
Citizen.CreateThread(function()
AddEventHandler('playerConnecting', function(name, setCallback, deferrals)
local numIds = GetPlayerIdentifiers(source)
deferrals.defer()
deferrals.update(strings.checkforslot)
local s = source
local n = name
local greenlight = false
local deferrals = deferrals
local isAdmin = false
local isBanned = false
Wait(100)
for bi,blacklisted in ipairs(blacklist) do
for i,theId in ipairs(numIds) do
if blacklisted == theId then -- make sure Queue isn't used as otherwise they will conflict
deferrals.done(string.format( strings.bannedjoin, blacklist.reasons[bi] ))
print("Connection Refused, Blacklisted for "..blacklist.reasons[bi].."!\n")
isBanned = true
return
end
end
end
for i,admin in ipairs(admins) do
for i,theId in ipairs(numIds) do
if admin == theId then -- is the player an admin and do we have free slots?
isAdmin = true
end
end
end
if isBanned then
return
end
if isAdmin then -- if our player is an admin, move him to the front of the queue.
table.insert(queuedUsers, 1, {name = name, tries = 0})
else -- otherwise, TO THE BACK WITH YOU, PEASANT
table.insert(queuedUsers, {name = name, tries = 0})
end
local foundme = false
while true do
foundme = false
maxPlayers = GetConvarInt("sv_maxclients", 30)
greenlight = false
for i,theKey in ipairs(queuedUsers) do
if theKey.name == n then
foundme = true
if playerCount >= maxPlayers then
if queuedUsers[i].tries == maxTries then
deferrals.done(strings.serverfulldenied)
table.remove(queuedUsers,i)
break
end
deferrals.update(string.format(strings.serverfulltrying, i, maxTries-queuedUsers[i].tries ))
queuedUsers[i].tries = queuedUsers[i].tries+1
else
deferrals.update(string.format(strings.posinqueue, i))
if i == 1 and playerCount < maxPlayers then
table.remove(queuedUsers,i)
deferrals.done()
break
end
end
end
end
if not foundme then
deferrals.done(strings.lostqueuepos)
break
end
Wait(1000)
end
end)
end)
Citizen.CreateThread(function()
AddEventHandler('playerDropped', function(reason)
local s = source
local n = GetPlayerName(source)
local caught = false
for i,theKey in ipairs(queuedUsers) do
if theKey.name == n then
table.remove(queuedUsers,i)
caught = true
end
end
end)
end)
end
@Fabio_Loureiro Read the doc. Also I wrote about the issue you experienced just above your message, and use GitHub to check if the issue is already submitted.
@Joao_Seara No idea how multiple deferrals are handled by FiveM.
@Imagic ok Iāll check for the car issues and about the item_transformers I got it ty, I just need one more help, I created a group for a faction and then a mission for this groups but it seems that they donāt receive any mission when in the group ā
Mission.lua: https://pastebin.com/7GTffPxE
groups.lua: https://pastebin.com/r1pYaV2X
I tried to ask help in the discord but one person from the support didnāt found anything that could explain the player not receiving the mission, so I just these two files that I need to use to create a mission for a specific group or thereās another script that I need to look into?
Do you have any ideia how could I manage to do a work around about this?
nvm, I got it working now
so It is possible to create a garage without showing any blips in-game?? I created a garagem for a faction system and I donāt want to everyone to see the blips, I want this garage to be secret for the faction only and not having any blips in-game , just the marker in the location.
I tried to create a garage without blips but when I do this, in-game I get this destination things https://prntscr.com/i62gt3, so it is possible to do what I want?
Just off the top of my head here @Imagic - but what if instead of checking entity ID for ownership on the vRP side you check against the vehicle_plate?
Eg: GetVehicleNumberPlateText(GetVehiclePedIsIn(GetPlayerPed(-1), false))
Returns the string value of whatever vehicle you happen to be in - compare that to the reg on the player to verify ownership?
Of course - can you post a code sample of the garage cfg entry for this faction garage?
["Garagem Mafia Italiana"] = {
_config = {vtype="car",permissions={"factionmi.vehicle"}},
["s550"] = {"Mercedes-Benz S550",40000, ""},
["baller3"] = {"Toyota Land Cruiser 200",60000, ""}
},
This is a total hack approach, but try setting to a blip not defined in any of your scripts.
Eg: _config = {vtype=ācarā,blipid=473,blipcolor=4,permissions={āfactionmi.vehicleā}},
@TRP_RedM didnāt work =/
now shows like this: http://prntscr.com/i67cjl
I donāt want to have it in the blips list in-game
Iām asking because there isnāt any clarification it:
Am I able to utilize
--- onstart(player,recipe): optional callback
to do a check?