Skip to content

Commit d34b149

Browse files
committed
Update vehicle Keys for qb-vehicle key
1 parent 13b2270 commit d34b149

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
- Automatically save coordinates, vehicle status
44
- Auto spawn car in its last position, if there are players nearby
55
- Depot only contains vehicles with fines greater than 0
6+
- Need Add event to qb-vehiclekeys\server\main.lua:
7+
```
8+
RegisterNetEvent('MojiaGarages:server:updateOutSiteVehicleKeys', function(plate, citizenid) --Update vehicle Keys for qb-vehicle key
9+
if plate and citizenid then
10+
if VehicleList then
11+
-- VehicleList exists so check for a plate
12+
local val = VehicleList[plate]
13+
if val then
14+
-- The plate exists
15+
VehicleList[plate].owners[citizenid] = true
16+
else
17+
-- Plate not currently tracked so store a new one with one owner
18+
VehicleList[plate] = {
19+
owners = {}
20+
}
21+
VehicleList[plate].owners[citizenid] = true
22+
end
23+
else
24+
-- Initialize new VehicleList
25+
VehicleList = {}
26+
VehicleList[plate] = {
27+
owners = {}
28+
}
29+
VehicleList[plate].owners[citizenid] = true
30+
end
31+
end
32+
end)
33+
```
634
## Date: 31/12/21
735
- Show only the necessary zones
836
- Delete unnecessary zones every time there is a change (job, gang...)

0 commit comments

Comments
 (0)