#How to create user

1 messages · Page 1 of 1 (latest)

snow vale
#

How to create user???

night merlin
#

use the createracinguser command, there is an explanation in the readme file

snow vale
#

everyone have permission

alpine needle
#

Are you on the latest version? Released yesterday?

snow vale
#

yes

alpine needle
#

Did you check if it was successfull or just look at the error and assume it wasnt?

snow vale
#

version '3.4.4'

#

no errors

#

i cant use the command but i create user from the npc

alpine needle
#

You posted only part of the error message so it's impossible to know

snow vale
#

i fix it thank so much but i have another error

alpine needle
#

How did you fix it?

snow vale
#

when i start a race with money it gives me this error and dont start

snow vale
alpine needle
#

Ox lib was causing an issue for the command?

snow vale
#

yes it was false in the config

alpine needle
#

No idea how that would fix the command tbh 😅

#

but it if it works it works shrug

alpine needle
snow vale
#

i change cash with money

#

i replace cash with money in all the script

alpine needle
#

ah ok

#

Well, I don't really know how to fix it. I don't run an ESX server so can't really test my way to this

#

if you know ESX then please help out with the esx bridge

snow vale
#

ok i will try to fix it

#

done

#

function canPay(src, moneyType, cost)
local xPlayer = ESX.GetPlayerFromId(src)

if xPlayer then
    local account = xPlayer.getAccount(moneyType)
    if account and account.money >= cost then
        return true
    else
        return false
    end
else
    print("Player not found for source: " .. tostring(src))
    return false
end

end

alpine needle
#

Wont it always return false now?

snow vale
#

change the function from line 15 to 22

#

no i test it in game it work fine

#

even if you dont have the money is gives you a nonfiction that you dont have enough money

#

just change "moneytype" with cash or money

alpine needle
#

Huh

#

I dont understand how that can fix a nil indexing

#

hahaha

#

Logically, you'd end up with just an error saying "player not found for source" now