# Wasabi Ambulance V1 — Referință completă (2nd Brain) > **Autor:** wasabirobby | **Docs:** https://docs.wasabiscripts.com/wasabi-scripts/advanced-series/wasabi_ambulance-v1 > **Provides:** `esx_ambulancejob`, `qb-ambulancejob` (bridge — înlocuiește ambele) > **Resource name:** MUST be `wasabi_ambulance` --- ## Dependențe | Resursă | Tip | Notă | |---|---|---| | `wasabi_bridge` | Hard dependency | Framework bridge (ESX/QB) | | `oxmysql` | Hard dependency | DB queries | | `ox_lib` | Hard dependency | UI, context menus, progress circles, radial | | `qb-core` / `es_extended` | Framework | Una din cele două | ### Dependențe opționale | Resursă | Funcție | |---|---| | `wasabi_crutch` | Crutch + wheelchair la check-in | | `wasabi_carlock` / `qb-carlock` | Vehicle lock system | | `AdvancedParking` | Vehicle deletion | | `qs-inventory` / `ox_inventory` / `mf-inventory` | Remove items on death | | `qb-target` / `ox_target` | Target system | | `okokBilling` / `pefcl` | Billing systems | --- ## Exports — Client | Export | Params | Descriere | |---|---|---| | `isPlayerDead(serverId?)` | `serverId` (opt) | Returnează `true/false`. Fără param = local player | | `diagnosePlayer(target?)` | `true`/`number`/`nil` | Diagnose: `true`→self, `number`→serverId, `nil`→closest player | | `treatPatient(injury)` | `'shot'`/`'stabbed'`/`'beat'`/`'burned'` | Tratează un player apropiat | | `reviveTarget()` | — | CPR + revive nearby player (necesită item defib) | | `healTarget()` | — | Self-heal sau heal nearby (necesită medikit) | | `useSedative()` | — | Sedează un player apropiat | | `placeInVehicle()` | — | Pune player în vehicul | | `loadStretcher()` | — | Pune player pe stretcher | | `openOutfits(hospital)` | `hospital` string | Deschide meniul uniformă pentru spitalul dat | | `deleteStretcherFromVehicle(vehicle)` | vehicle entity | Șterge stretcher din vehicul | | `isPlayerUsingStretcher(clientId)` | player client ID | `true`/`false` | | `clearPlayerInjury(clearVitals)` | `bool` | Șterge injuries; `true` = heal HP/hunger | | `disableKnockoutLoop(disabled)` | `bool` | Disable/enable knockout loop | | `manuallyKnockout(enabled)` | `bool` | Force knockout/wake up | ## Exports — Server | Export | Params | Descriere | |---|---|---| | `RevivePlayer(serverId)` | `serverId` | Revive un player | | `disableKnockoutLoop(source, disabled)` | `source, bool` | Disable knockout loop server-side | | `manuallyKnockout(source, enabled)` | `source, bool` | Force knockout server-side | ## Events — Client | Event | Params | Descriere | |---|---|---| | `wasabi_ambulance:deleteStretcherFromVehicle` | `serverId, netId` | Remove stretcher din vehicul (server-triggered) | --- ## State Bags | State Bag | Valori | Descriere | |---|---|---| | `Player(id).state.dead` | `false`/`nil`/`'dead'`/`'laststand'` | Status death | --- ## Config critice ### General - `Config.Language = 'en'` — 15 limbi - `Config.UIColor = 'red'` — red/blue/hex - `Config.DeathScreenType = 3` — 4 opțiuni death UI - `Config.jobMenu = 'F6'` — tasta job menu - `Config.targetSystem = true` — qb-target/ox_target - `Config.UseRadialMenu = false` — ox_lib radial ### Jobs ```lua Config.ambulanceJobs = { 'ambulance' } Config.policeCanTreat = { enabled = true, jobs = {'police'} } ``` ### Death System - `Config.RespawnTimer = 5 * minutes` — timp până la respawn opțional - `Config.BleedoutTimer = 20 * minutes` — bleedout forțat - `Config.LastStand = true` — 2 stage death (crawl) - `Config.DisableHeadShotKill = false` - `Config.KnockoutFeature.enabled = false` — knockout fist fighting ### Anti-Combat Log - `Config.AntiCombatLog.enabled = true` — kill la reconnect dacă a murit ### Injury System - `Config.EnableLiveInjury = true` - Tipuri: `shot`, `stabbed`, `beat`, `burned` - `Config.BleedMultiplier` — rate sângerare per tip - `Config.BypassInjuryWeapons` — UNARMED, STUNGUN, DROWNING ### Pain Pills (Items) ```lua morphine30, morphine15, perc30, perc10, perc5, vic10, vic5 ``` ### EMS Items - `Config.EMSItems.revive.item = 'defib'` - `Config.EMSItems.heal.item = 'medikit'` - `Config.EMSItems.sedate.item = 'sedative'` - `Config.EMSItems.medbag = 'medbag'` - `Config.TreatmentItems = { shot='tweezers', stabbed='suturekit', beat='icepack', burned='burncream' }` ### Stretcher - `Config.EnableStretcher = true` - Prop: `wasabi_stretcher` - Ambulance offsets: `ambulance`, `20ramambo`, `ec135` ### Billing - `Config.billingSystem = false` — `'esx'`/`'qb'`/`'okok'`/`'pefcl'`/`false` ### Inventory - `Config.removeItemsOnDeath = false` - `Config.Inventory = 'ox'` — `'ox'`/`'qb'`/`'mf'`/`'qs'`/`'esx'` ### Revive Rewards ```lua Config.ReviveRewards = { enabled = true, paymentAccount = 'money', no_injury = 4000, burned = 3000, beat = 2500, stabbed = 2000, bleedout = 2000, shot = 1500 } ``` ### Hospital Locații (Config.Locations.Pillbox) - **Blip:** Pillbox Hospital (sprite 61, color 2) - **Clock In/Out:** `vec3(334.75, -580.24, 43.28)` - **Boss Menu:** `vec3(335.59, -594.33, 43.21)` - **Check-In:** `vec3(308.58, -595.31, 43.28)` — Cost $3000, MaxOnDuty 3 - **Cloakroom:** `vec3(300.6, -597.7, 42.1)` — Medic/Doctor uniforms - **Medical Supplies:** `vec3(306.63, -601.44, 43.28)` — NPC shop - **Vehicle Garage:** `vec3(298.54, -606.79, 43.27)` - Land: ambulance, dodgeems (Dodge Charger) - Air: polmav (Maverick) - **Hospital Beds:** 12 paturi configurate ### 3rd Party Integrations - `Config.wasabi_crutch` — crutch/wheelchair integrare - `Config.phoneDistress = false` — `'gks'`/`'qs'`/`'d-p'`/`'lb'` - `Config.MythicHospital = false` - `Config.FuelSystem = false` — `'legacy'`/`'ox'`/`'default'` - `Config.customCarlock = false` - `Config.AdvancedParking = false` ### Standalone Check-Ins - Prison check-in exemplu: `vec3(1729.03, 2563.33, 45.56)` — Cost $5 --- ## Cross-resource impact (cu serverul nostru) | Resursă server | Legătură | Detalii | |---|---|---| | `wasabi_bridge` | HARD DEP | Toate funcțiile trec prin bridge | | `oxmysql` | HARD DEP | DB queries, anti-combat log | | `ox_lib` | HARD DEP | UI, progress, radial | | `qb-core` | Framework | PlayerData, job grades, metadata | | `qs-inventory` | Inventory | Remove items on death, stash | | `qb-target` | Target | Hospital zones, stretcher, medbag | | `wasabi_police` | Cross-ref | `Config.policeCanTreat` — poliția poate trata pacienți | | `17mov_CharacterSystem` | Clothing | Cloakroom uniforme | | `17mov_Hud` | Notify | Via wasabi_bridge | | `codem-dispatch` | Dispatch | Distress signal → dispatch alert | --- ## DB Impact | Tabel | Scop | |---|---| | `users` | Anti-combat log: coloane `isdead`, `deathcount` (ESX) | | QBCore metadata | `injail`, `ishandcuffed` via wasabi_police bridge | --- ## Items necesare ```lua -- Revive/Heal/Treatment defib, medikit, sedative, medbag tweezers, suturekit, icepack, burncream bandage -- Pain pills morphine30, morphine15, perc30, perc10, perc5, vic10, vic5 -- Stretcher wasabi_stretcher (prop, nu item) ```