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

GetEntityHealth server side return 0 #2794

Open
ahcenezdh opened this issue Sep 16, 2024 · 0 comments
Open

GetEntityHealth server side return 0 #2794

ahcenezdh opened this issue Sep 16, 2024 · 0 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@ahcenezdh
Copy link
Contributor

ahcenezdh commented Sep 16, 2024

What happened?

GetEntityHealth for vehicle return 0 when creating the vehicle using server setter, a player need to enter into the vehicle scope so GetEntityHealth return the real value

Expected result

Default value of a vehicle (1000)

Reproduction steps

RegisterCommand("raiju", function(source)
    local coords = GetEntityCoords(GetPlayerPed(1))
    local vehicle = CreateVehicleServerSetter(`raiju`, "plane", coords.x, coords.y, coords.z)
    repeat
        Wait(0)
    until DoesEntityExist(vehicle)
    print("Raiju Health", GetEntityHealth(vehicle)) -- going to return 0
end, false)

Importancy

There's a workaround

Area(s)

FiveM, FXServer, OneSync

Specific version(s)

On every verions

Additional information

No response

@ahcenezdh ahcenezdh added bug triage Needs a preliminary assessment to determine the urgency and required action labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

1 participant