Client-side events for ak47_garage.
Opens the garage interface for a housing garage.
TriggerEvent('ak47_garage:housing:takevehicle', gid, garagetype)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | Yes | Unique house garage identifier |
garagetype |
string | Yes | Vehicle category (car, boat, heli, plane) |
Stores the current vehicle into a housing garage.
TriggerEvent('ak47_garage:housing:storevehicle', gid, garagetype)| Parameter | Type | Required | Description |
|---|---|---|---|
gid |
string | Yes | Unique house garage identifier |
garagetype |
string | Yes | Vehicle category (car, boat, heli, plane) |
Triggered when the garage NUI menu and showroom camera open.
AddEventHandler('ak47_garage:OnGarageUiOpen', function(garageId)
DisplayRadar(false)
end)| Parameter | Type | Required | Description |
|---|---|---|---|
garageId |
string | Yes | Opened garage identifier |
Triggered when the garage NUI menu closes and showroom camera is destroyed.
AddEventHandler('ak47_garage:OnGarageUiClose', function(garageId)
DisplayRadar(true)
end)| Parameter | Type | Required | Description |
|---|---|---|---|
garageId |
string | Yes | Closed garage identifier |
Dispatched from server to finalize client vehicle setup upon garage retrieval.
RegisterNetEvent('ak47_garage:spawnvehicle', function(nid, properties, pos, trailerData, plate, realparking)| Parameter | Type | Required | Description |
|---|---|---|---|
nid |
number | Yes | Vehicle entity network ID |
properties |
table | Yes | Vehicle properties and modifications |
pos |
vector4 | Yes | Spawn coordinates and heading |
trailerData |
table | nil | No | Optional trailer properties table |
plate |
string | Yes | Vehicle license plate |
realparking |
boolean | nil | No | True if unparking from RealParking dummy |
Applies vehicle modifications when network owner is another client.
RegisterNetEvent('ak47_garage:client:applyModsWithTargetPlayer', function(nid, properties)| Parameter | Type | Required | Description |
|---|---|---|---|
nid |
number | Yes | Vehicle entity network ID |
properties |
table | Yes | Vehicle modifications table |
Triggered to remove the physical vehicle key upon parking.
RegisterNetEvent('ak47_garage:removekey', function(plate, model)| Parameter | Type | Required | Description |
|---|---|---|---|
plate |
string | Yes | Vehicle license plate |
model |
number | string | Yes | Vehicle model hash or name |
Sets a GPS waypoint on the minimap and displays a notification.
RegisterNetEvent('ak47_garage:markmap', function(pos, msg, msgType)| Parameter | Type | Required | Description |
|---|---|---|---|
pos |
vector3 | Yes | Map waypoint coordinates |
msg |
string | Yes | Notification message text |
msgType |
string | Yes | Notification type (info, error, success) |
Applies saved properties, damage, status, and lock state to a persistent vehicle.
RegisterNetEvent('ak47_garage:persistent:applyProperties', function(netId, mods, damage, status, fuel, locked)| Parameter | Type | Required | Description |
|---|---|---|---|
netId |
number | Yes | Vehicle entity network ID |
mods |
table | Yes | Vehicle modifications table |
damage |
table | Yes | Visual and mechanical damage table |
status |
table | Yes | Extended status table |
fuel |
number | Yes | Fuel level percentage (0-100) |
locked |
number | Yes | Door lock state (1 = unlocked, 2 = locked) |