Hey I’m trying to make a BAC limiter so the players BAC is set over 0.8 it will just say “positive” but lua comparing is not wanting to work for me. Help would be very nice!
if args[1] == "/bactest" then
CancelEvent()
if args[2] ~= nil then
if (tonumber(args[2]) ~= nil) then
if bac[tonumber(args[2])] > 0.8 then
TriggerClientEvent('showNotification', -1,"~b~BAC: ~g~Positive")
else
TriggerClientEvent('showNotification', -1,"~b~BAC: ~r~NEG")
end
Error I get in the console is “attempt to compare number with string” so how should I do it instead?