-
Notifications
You must be signed in to change notification settings - Fork 26
Sell vehices & More Imformation Stats #24
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
base: main
Are you sure you want to change the base?
Conversation
- Added SellVeh Event - Added a sell vehicle function into the Vehicle shop - Changed the way vehicles are stored to the data base to include vehicle price - Vehicles sell for 50% of original Value
stats now show - money - level - drift session points - total drift points - your crew name
implemented fetures for new stats
|
I approve |
nzkfc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loaded and looks good for pull
- minimum buy price of a vehicle - The original Money Math of points / 200 insted of points / 80 witch is in DVRM -added a "," to the ending line of - "crewOwner = false" to "crewOwner = false,"
after i deleted this by accident i have re-instated them to the code.
Have reversed what i had done with the merging the following into " Refresh other player data"
```
RegisterNetEvent("driftV:RefreshCrewRanking", function(ranking)
CrewRanking = ranking
end)
```
|
Re-reading over a lot of the code that i had removed/changed for no reason within this PR I have then reverted from what i had done and sent out the new commits Regarding what should have been Kept in the Sources and is ready for merge If wanted. |
|
It is hard for me to validate the PR, lot of things changed, more than the title would suggest (Change made to the buy part, change made to loading data for some reason). I would need to test those change myself and I'm afraid I don't have a lot of time those days. Also unless I forgot how I coded that few years ago, drift:FetchVehicles should not be needed to hit the database to get the current vehicle list of the player, all those data should already be on the server side cache. About the Events.sellVeh logic, I see you based your logic on the model of the vehicle, but that would cause issue if 1 player has multiple cars of the same model, the logic would just take the first one it found in the list which is not ideal, maybe base this logic on an uid / table index ? ( Uid would be more robust here, but that would mean adding this data to the cars table when loading it in the cache ). |
|
Hello, Thank you for getting back on the pr.
This is something that i have not personally actually had time to check on myself Due to myself being busy and taking time away from my remastered project so i never fully tested it on the base However all fetures where working as inteded when myself and nz had used it in 2 diffirent servers of our own. || This indeed is not the most ideal way of doing this. ( We have added in a Block from buy multiple vehicles due to an issue where it would pull out every vehicle that is owned under the same spawn code. this is why we added the blocking feature for buying multiple of the same vehicle's)
This is indeed something that i will look into doing if i have the spare time to put it together. (aswell as would change the way that the vehicle preview system works for selling vehicles so that it would get your specific car rather than just what the model(vehicle) looks like)
As we work in a team and this was split between 2 people i can not explain entirely why using drift:FetchVehicles was used in regards to this, It may be due to the fact that We had not fully looked thru how everything was coded at the time & Just used the Drift:FetchVehicles as an easy way of getting them at the time. The code for this was entirely just ripped out of what system we have worked on & Used from our version of DriftV So i will run a base driftV Server and double check to make sure that the edits that where added Are entirely working. I will also look over what i have added and add onto that what i have done to make it more standing aswell as to see what we have changed to the buy part of the syste (Witch to what im aware is how many of 1 car you could buy due to getting a car out it would get both all vehicles with the same name witch could be resolved by making vehicles use a ID System rather than relying on the vehicles spawn code) Finishing comment : Myself as well as my team will look over the work that we have done and resolve any issues//unnecessary changes that we have made for the base Also wanted to look into doing a flag system that would change the price of the vehicles sell based on if there was upgrades or not but the main thing is time related |
|
To be honest the code is old, even tho I took some time to upgrade some part some time ago, most of it is old and pretty badly coded so I don't blame yourself when trying to tweak it now, it's hard to do things properly when all the others things aside are not done properly ^^' |
Sell Vehicles
stats now show