mirror of
https://github.com/SaavageBueno/Qb-Core-vehicle-shared-lua.git
synced 2026-03-31 06:34:13 -04:00
The difference between this one and the original is that it adds the "Brand" name in the .lua (example: Dodge), so you dont get "unknown" in game. This is creates a file that formats the vehicle list for copy and paste. HOWEVER you may want to change the vehicle class in the output.lua
16 lines
450 B
Bash
16 lines
450 B
Bash
#!/bin/sh
|
|
|
|
LUA_FILE="output.lua"
|
|
|
|
echo "return {" > "$LUA_FILE"
|
|
|
|
find . -name "*.ytd" | while read -r file; do
|
|
name=$(basename "$file" .ytd)
|
|
name=$(echo "$name" | sed 's/_/ /g')
|
|
brand=$(dirname "$file" | xargs dirname | xargs basename)
|
|
echo " { model = '$name', name = '$name', brand = '$brand', price = 125000, category = 'compacts', type = 'automobile', shop = 'pdm' }," >> "$LUA_FILE"
|
|
done
|
|
|
|
echo "}" >> "$LUA_FILE"
|
|
|
|
echo "Done." |