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

feat(modules/lib): support passing a ped instead of coords #311

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

D4isDAVID
Copy link
Member

Description

Most usages of the SpawnVehicle function from the utils module is done by passing the player and no coords, to spawn the vehicle at the player's ped and warp them inside.
This PR modifies the params to be able to support that, and vector3 coords more easily.

Examples:

qbx.spawnVehicle({
    model = `asbo`,
    spawnSource = GetEntityCoords(ped),
    warp = ped,
})

qbx.spawnVehicle({
    model = `asbo`,
    spawnSource = ped,
    warp = true,
})

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@solareon solareon merged commit 4a3e512 into main Jan 10, 2024
4 checks passed
@D4isDAVID D4isDAVID deleted the feature/lib-spawnvehicle-ped branch January 10, 2024 21:23
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

Successfully merging this pull request may close these issues.

None yet

3 participants