Open MrRasmus opened 2 years ago
@MrRasmus this has been driving me bonkers for days and finally an error tripped client side that solved it.
if tonumber(modifications.bodyHealth) <= 0 then modifications.bodyHealth = 0 elseif tonumber(modifications.bodyHealth) >= 1001 then modifications.bodyHealth = 1000 end if tonumber(modifications.engineHealth) <= 0 then modifications.engineHealth = 0 elseif tonumber(modifications.engineHealth) >= 1001 then modifications.engineHealth = 1000 end
This example is a fix I put in for another issue, but this needs to be changed tonumber() before the compare as its grabbed as a string. Not sure if this is the best solution, but it worked perfect.
If this works for you also I'll do a PR
@MrRasmus this has been driving me bonkers for days and finally an error tripped client side that solved it.
if tonumber(modifications.bodyHealth) <= 0 then modifications.bodyHealth = 0 elseif tonumber(modifications.bodyHealth) >= 1001 then modifications.bodyHealth = 1000 end if tonumber(modifications.engineHealth) <= 0 then modifications.engineHealth = 0 elseif tonumber(modifications.engineHealth) >= 1001 then modifications.engineHealth = 1000 end
This example is a fix I put in for another issue, but this needs to be changed tonumber() before the compare as its grabbed as a string. Not sure if this is the best solution, but it worked perfect.
If this works for you also I'll do a PR
Okay, this sort of fixed it, until population went above 30 and it came back
Turns out, this mainly ended up being a database issue. For me, the table for the both the players and the cars where missing the fivem license identifier