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

Native GetVehiclePedIsIn seems to doesn't work correct on GameBuild 3258 #2690

Closed
Zjarany-Ksiezyc opened this issue Aug 3, 2024 · 5 comments

Comments

@Zjarany-Ksiezyc
Copy link

Zjarany-Ksiezyc commented Aug 3, 2024

What happened?

regardless of the situation, GetVehiclePedIsIn on the server side always returns 0

Expected result

it should return the vehicle ID if it is present in one

Reproduction steps

just put it in server side lua file

RegisterCommand('getvehicle', function(src)
    print('current vehicle',  GetVehiclePedIsIn(GetPlayerPed(src), false))
end, false)

Importancy

Crash

Area(s)

Natives

Specific version(s)

Fivem 9164/beta, Server b8780 Windows Server 2022

Additional information

in "lastVehicle mode" it seems to return always 0 as well

@Zjarany-Ksiezyc Zjarany-Ksiezyc added bug triage Needs a preliminary assessment to determine the urgency and required action labels Aug 3, 2024
@github-actions github-actions bot added the crash label Aug 3, 2024
@ahcenezdh
Copy link
Contributor

Works fine for me on FXServer-master SERVER v1.0.0.8903 win32

@ahcenezdh
Copy link
Contributor

RegisterCommand("test", function(source, args)
    local playerPed = GetPlayerPed(source)
    if not DoesEntityExist(playerPed) then return end

    local veh = GetVehiclePedIsIn(playerPed, false)
    print(veh, DoesEntityExist(veh))
end, false)

@ahcenezdh
Copy link
Contributor

ahcenezdh commented Aug 5, 2024

And the lastVehicle argument is working for me, check if your ped exist before doing anything

@Zjarany-Ksiezyc
Copy link
Author

I tested it now on b9235 and everything works, so there was no issue. only the old build had a problem

@ahcenezdh
Copy link
Contributor

I tested it now on b9235 and everything works, so there was no issue. only the old build had a problem

Nice then, you can close the issue

@github-actions github-actions bot removed the triage Needs a preliminary assessment to determine the urgency and required action label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants