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

lots of changes and fixes cleanup too #27

Closed
wants to merge 36 commits into from
Closed

lots of changes and fixes cleanup too #27

wants to merge 36 commits into from

Conversation

DevX32
Copy link
Contributor

@DevX32 DevX32 commented Oct 17, 2023

Description

Checklist

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

@DevX32
Copy link
Contributor Author

DevX32 commented Oct 18, 2023

need more changes wait for it

@DevX32 DevX32 changed the title added admincar to fix buy menu lots of changes and fixes cleanup too Oct 18, 2023
Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before working further on the implementation of this PR, we should discuss the merits of the idea of an admin car.

client/admin.lua Outdated Show resolved Hide resolved
client/admin.lua Outdated Show resolved Hide resolved
help = 'Toggle Admin Car',
restricted = 'admin',
}, function(source)
TriggerClientEvent('qb-admin:client:SaveCar', source)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be a client event. Can't the spawning and configuration of the car largely be handled server side? Is this command even useful? Admins can already do /car [model] after all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its saves the car / give owership of veh/car

@@ -122,6 +122,31 @@ RegisterNetEvent('qb-admin:server:changeplayerdata', function(Selected, Selected
PlayerDataOptions[Selected](Target, Input)
end)

RegisterNetEvent('qb-admin:server:SaveCar', function(mods, vehicle, plate)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should call https://qbox-project.github.io/resources/core/functions/server#spawnvehicle. It should not be calling the database directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will do all thing what u said

@DevX32 DevX32 closed this Oct 22, 2023
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.

2 participants