Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on Awaiting Scripts #15

Open
zRennox opened this issue Apr 1, 2020 · 20 comments
Open

Stuck on Awaiting Scripts #15

zRennox opened this issue Apr 1, 2020 · 20 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zRennox
Copy link

zRennox commented Apr 1, 2020

Help ;D Did everything from the tutorial.

@adamshcao
Copy link

Help ;D Did everything from the tutorial.

Same, no errors, can't seem to find the problem.

@ScaredDonut
Copy link

Same issue, after replacing the code as stated on the readme the server hangs on awaiting scripts.

@Senlar
Copy link

Senlar commented Apr 4, 2020

Same

@Fantastic-Dave
Copy link

ive actually got an error

SCRIPT ERROR: @esx_kashacter/server/main.lua:102: attempt to index a nil value (field '?')

handler (@esx_kashacter/server/main.lua:38)

ill post back once ive fixed it

@gunsela92
Copy link

same here some people stuck some people doesnt

@RikoDEV RikoDEV added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Apr 13, 2020
@RikoDEV
Copy link

RikoDEV commented Apr 13, 2020

This looks like an error when getting the player's position from the database.

return json.decode(SpawnPos[1].position)

@gunsela92
Copy link

There is no errors on console or client. Just blurred screen. Do you have any fixes ?

@RikoDEV
Copy link

RikoDEV commented Apr 13, 2020

Currently no.

@Fantastic-Dave
Copy link

this fixed it for me
local SpawnPos = MySQLAsyncExecute("SELECT position FROM users WHERE identifier = '"..GetRockstarID(source).."'")

@RikoDEV
Copy link

RikoDEV commented Apr 14, 2020

Well, it shouldn't. Coordinates should be taken from the database based on the selected form. E.g. Char1, Chart2... In your case it works because you left the default code es_extended.

Our identifiers have license:/CharX: before.

@neoreturns
Copy link

Same issue, have followed everything, double checked.

Character select panels only appear after restarting resource
After selecting, the screen remains in the sky

Must be some issue directly after with spawning, looking into it also, thanks!

This was referenced Apr 22, 2020
@Raptoxx
Copy link

Raptoxx commented Jul 3, 2021

Hi guys, I fixed it by writing this:
RegisterServerEvent("kashactersS:CharacterChosen")
AddEventHandler('kashactersS:CharacterChosen', function(charid, ischar)
local src = source
local spawn = {}
SetLastCharacter(src, tonumber(charid))
SetCharToIdentifier(GetPlayerIdentifiers(src)[1], tonumber(charid))
if ischar == true then
spawn = GetSpawnPos(src)
else
TriggerClientEvent('skinchanger:loadDefaultModel', src, true, cb)
--spawn = { x = 195.55, y = -933.36, z = 29.90 } -- DEFAULT SPAWN POSITION
spawn = { x = -530.29, y = -219.24, z = 37.65 }
end
TriggerClientEvent("kashactersC:SpawnCharacter", src, spawn)
end)

function GetSpawnPos(source)
local SpawnPos = MySQLAsyncExecute("SELECT position FROM users WHERE identifier = '"..GetPlayerIdentifiers(source)[1].."'")
if SpawnPos[1] ~= nil and SpawnPos[1].position ~= nil and SpawnPos[1].position ~= '' then
return json.decode(SpawnPos[1].position)
else
spawn = { x = -530.29, y = -219.24, z = 37.65 }
return spawn
end
end

The code of the kashacters works for the characters already created, to those not created it gave "Awaiting Scripts"

@123455-sudo
Copy link

@Raptoxx i can use this on esx_property and es_extended

@Raptoxx
Copy link

Raptoxx commented Jul 13, 2021

@Raptoxx i can use this on esx_property and es_extended

Yes, but what version of es_extended are you using? For "Awaiting Scripts" you have to change some Trigger in client.lua for your es_extended version

@123455-sudo
Copy link

@Raptoxx
i have 1.3.0-final
image

@Raptoxx
Copy link

Raptoxx commented Jul 14, 2021

@Raptoxx
i have 1.3.0-final
image

I don't use 1.3.0-final, you have to do it yourself... I don't know

@LightningRoleplay
Copy link

What file should this be in? The client or server? I'm guessing the server.lua, but at wich line did you put it?

@Raptoxx
Copy link

Raptoxx commented Aug 12, 2021

What file should this be in? The client or server? I'm guessing the server.lua, but at wich line did you put it?

Yes it is server.lua line: 27 and 107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

12 participants