Server event to update mismatched vehicle types list#1025
Server event to update mismatched vehicle types list#1025Scullyy wants to merge 1 commit intocitizenfx:masterfrom
Conversation
- Adds event to update the mismatched vehicle types list.
- Moves mismatched types to server.
Example usage:
```lua
TriggerEvent('txAdmin:menu:addMismatchedTypes', {
caddy3 = 'automobile',
trailersmall2 = 'trailer',
scrap = 'automobile',
tractor3 = 'automobile'
})
```
|
@Scullyy Thanks for the PR. If the system is broken in txAdmin, the right thing is for it to be fixed in txAdmin instead of getting individual server owners to fix it themselves. That being, said, I tried updating this using my old guide and something is very wrong. Can someone that knows more about the game help me fix this issue? Is this still even an issue?! |
Hey, nothing was broken in TxAdmin. The vanilla vehicles were just used an example to show usage, this is just so server owners can add their addon vehicles without needing to update the list each time but the current implementation works perfectly fine for vanilla vehicles. |
|
It's weird though, because the data changed, and it still works without updating it?! |
Some of the newer dlc vehicles may not work as they’re not listed but I meant the old method can continue to be used for default GTA vehicles with my PR as all I did was just move it to the server and add an api to add to the list externally so that people can put their addon vehicles that they download for their server on the list and they won’t need to make any changes between TxAdmin updates. For example I have a hot air balloon vehicle and a truck that has a mismatched type so I would trigger the event in a server script which will put them on the mismatched list and allow them to spawn correctly in TxAdmin between updates without needing to edit the monitor resource. |
|
When trying to spawn a vehicle with wrong class/type, does it crash the client like it used to? |
When I spawn a vehicle that has a mismatched type (without it being on the list to correct them) it will spawn an incorrect vehicle. Like let's say a truck was a trailer instead of spawning the truck it would spawn a trailer. |
|
But to be clear this PR wasn't to resolve any kind of bug as I had no issue with the current system, this is only to implement an API so you can put your add-on vehicles onto the list that you download for your server without needing to edit the monitor resource each time. |
Example usage: