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

doesnt work in esx_vehicleshop or esx_advancedgarage also in esx_jobs #2

Open
xrtw opened this issue Jun 30, 2020 · 12 comments
Open

doesnt work in esx_vehicleshop or esx_advancedgarage also in esx_jobs #2

xrtw opened this issue Jun 30, 2020 · 12 comments

Comments

@xrtw
Copy link

xrtw commented Jun 30, 2020

doesnt work in esx_vehicleshop or esx_advancedgarage also in esx_jobs, using in client side.

@Shorty-Labs
Copy link
Owner

Not sure what you mean, using in client side

@xrtw
Copy link
Author

xrtw commented Jun 30, 2020

https://i.gyazo.com/7514f125dbd93752ce01b1bafe5c48e5.png and then i get xPlayer error..

@Shorty-Labs
Copy link
Owner

function AddVehicleKeys(vehicle, plate)
local localVehPlateTest = GetVehicleNumberPlateText(vehicle)
if localVehPlateTest ~= nil then
local PedServerID = GetPlayerServerId(playerPed)
TriggerServerEvent('shorty_slocks:transferOwner',localVehPlateTest, PedServerID)
end
end

Based on the code you sent in the Pic..

@xrtw
Copy link
Author

xrtw commented Jul 1, 2020

still getting this error SCRIPT ERROR: @svehiclelocks/server/main.lua:31: attempt to index a nil value (local 'xPlayer')

@xrtw
Copy link
Author

xrtw commented Jul 1, 2020

@Shorty-Labs
Copy link
Owner

Shorty-Labs commented Jul 1, 2020

PlayerPedId()

local PedServerID = GetPlayerServerId(PlayerPedId())
TriggerServerEvent('shorty_slocks:transferOwner',localVehPlateTest, PedServerID)

@xrtw
Copy link
Author

xrtw commented Jul 1, 2020

still get it in console, now its double SCRIPT ERROR: @svehiclelocks/server/main.lua:31: attempt to index a nil value (local 'xPlayer') SCRIPT ERROR: @svehiclelocks/server/main.lua:31: attempt to index a nil value (local 'xPlayer')

https://gyazo.com/9c3599cc5a778cb3b3e8a23afecf5722

@xrtw
Copy link
Author

xrtw commented Jul 1, 2020

also when i join into server, i get these errors, https://gyazo.com/1d1676b014fde33c0bad1dd96ead4a9e using extendedmode

@Shorty-Labs
Copy link
Owner

GetPlayerPed(-1)

try that instead, also the other issue im aware of once i have five mins ill fix, it doesn't effect the script

@xrtw
Copy link
Author

xrtw commented Jul 1, 2020

trying to make it without function only this TriggerServerEvent('shorty_slocks:transferOwner', plate, GetPlayerPed(-1)) but gettint same xPlayer error
https://gyazo.com/e5132c73997b7bf57ad12f40a9c31233

@Shorty-Labs
Copy link
Owner

You need to send the vehicle plate and the Server ID of the player your trying to set as the owner

@xrtw
Copy link
Author

xrtw commented Jul 2, 2020

tried 100 combinations, https://gyazo.com/c10ae18bb142aad17c5df815804b5fa8 still xPlayer error or Lua type error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants