Wasabi Scripts
StoreDiscordGitHub
  • Documentation
  • Dependency
    • 🔗wasabi_bridge
      • Dependencies
      • Installation
      • Configuration
      • Custom Notifications
      • Common Issues & Fixes
  • Advanced Series
    • 🚑wasabi_ambulance
      • Dependencies
      • Installation
      • Configuration
      • Death Screens
      • Exports / Events
      • State Bags
      • Customizations
      • Common Issues
        • QBCore
    • 🩺wasabi_crutch
      • Dependencies
      • Installation
      • Configuration
      • Exports
    • 👮‍♂️wasabi_police
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • State Bags
      • Events
      • Customizations
    • 🔎wasabi_evidence
      • Dependencies
      • Installation
      • Configuration
      • Customizations
    • 🛡️wasabi_adminmenu
      • Dependencies
      • Installation
      • Configuration
    • 👷wasabi_multijob
      • Dependencies
      • Installation
      • Configuration
      • Replace ESX Boss Menus
    • 🔑wasabi_carlock
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Common Issues
        • QBCore
  • Core UI Series
    • 🖥️wasabi_loadingscreen
      • Configuration
    • 🧑‍🤝‍🧑wasabi_multichar
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Events
    • 💳wasabi_banking
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Events
    • 👼wasabi_spawn
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Events
    • 🔔wasabi_notify
      • Exports / Events
      • Configuration
      • Change Framework Notify
    • ⏸️wasabi_pausemenu
      • Dependencies
      • Installation
      • Configuration
      • Exports
    • 🏆wasabi_vipshop
      • Dependencies
      • Installation
      • Configuration
      • Exports
  • Crime Series
    • 🏦wasabi_pacificrobbery
      • Dependencies
      • Installation
      • Configuration
      • Events
    • 🏦wasabi_paletorobbery
      • Dependencies
      • Installation
      • Configuration
      • Events
    • 🏦wasabi_fleecarobberies
      • Dependencies
      • Installation
      • Configuration
      • Events
  • 💎wasabi_vangelicorobbery
    • Dependencies
    • Installation
    • Configuration
    • Events
  • 🔫wasabi_ammunationrobbery
    • Dependencies
    • Installation
    • Configuration
    • Events
  • 🚢wasabi_yachtheist
    • Dependencies
    • Installation
    • Configuration
    • Events
  • 👊wasabi_gangwars
    • Dependencies
    • Installation
    • Configuration
    • Exports
  • Free Releases
    • 👕fivem-appearance
      • Installation
      • Dependencies
      • Common Issues
      • Snippets
      • Exports
      • Examples
    • 👩‍💻wasabi_discord
      • Installation
      • Exports
Powered by GitBook
On this page
  • Client Exports
  • Server Exports
  • Client Events
  1. Advanced Series
  2. wasabi_ambulance

Exports / Events

Series of exports that will be added as time goes on. These are good for implementing radial menus and usage of 3rd party scripts

Client Exports


isPlayerDead
exports.wasabi_ambulance:isPlayerDead(serverId)

Returns if player is dead. If used without serverId parameter it will return the death status of the local player


serverId: Server ID

diagnosePlayer
exports.wasabi_ambulance:diagnosePlayer(targetPlayer)

diagnoses a nearby dead player, notifying about their injuries. Depending on the targetPlayer parameter, it either returns a context menu for checking a nearby player or an injury table.


targetPlayer:

  • boolean: (true): Diagnoses the local player.

  • number: Diagnoses the player with the specified serverID.

  • nil: Diagnoses a nearby player (requires the configured ambulance job).

Returns:

  • Context Menu: For checking a nearby player when targetPlayer is nil.

  • Injury Table: For diagnosing the local player or a player with a specified serverID.

treatPatient
exports.wasabi_ambulance:treatPatient(injury)

Treats a nearby player for whichever injury is place in the injury parameter. Restricted to 'ambulance' and 'police' jobs (Possible Injuries: shot, stabbed, beat, burned)


INJURY: 'shot', 'stabbed', 'beat', 'burned

reviveTarget(using item)
exports.wasabi_ambulance:reviveTarget()

Performs CPR and revives nearby player given they have the item requirement

healTarget
exports.wasabi_ambulance:healTarget()

If no close by player OR non-ambulance, it will perform a self-heal given the player has the required item. Otherwise it will start healing nearby player

useSedative
exports.wasabi_ambulance:useSedative()

Performs the act of sedating nearby player. If you lack the required item or there are no nearby players, it will notify you of failure

placeInVehicle
exports.wasabi_ambulance:placeInVehicle()

Places nearby player in vehicle. If not player nearby it will notify you of failure.

loadStretcher
exports.wasabi_ambulance:loadStretcher()

Will place a nearby player on a nearby stretcher. Recommended to check for nearby stretcher prior to executing this export

openOutfits
exports.wasabi_ambulance:openOutfits(hospital)

Opens outfit menu for whichever hospital ID(The name you give each hospital in Config.Locations


HOSPITAL: Location identifier

deleteStretcherFromVehicle
exports.wasabi_ambulance:deleteStretcherFromVehicle(VEHICLE)

Checks for stretcher and deletes from specific vehicle.


VEHICLE = vehicle ID

isPlayerUsingStretcher
exports.isPlayerUsingStretcher(PLAYER_CLIENT_ID)

Returns true if the player is on a stretcher; otherwise, it will return false.


PLAYER_CLIENT_ID: Client ID

Example:

function CarryPlayer(ped)
if not IsPedAPlayer(ped) then return end
local playerID = NetworkGetPlayerIndexFromPed(ped)
if not playerID or exports.isPlayerUsingStretcher(playerID) then return end
-- .. Rest of code involving carrying someone

end
clearPlayerInjury
exports.wasabi_ambulance:clearPlayerInjury(clearVitals)

Executes the action of clearing the player's injuries.


CLEARVITALS : bool (if true, will heal HP, hunger, health, etc)

Server Exports


RevivePlayer
exports.wasabi_ambulance:RevivePlayer(SERVER_ID)

Will revive player with server id passed through SERVER_ID


SERVER_ID: Server Id

Client Events


wasabi_ambulance:deleteStretcherFromVehicle
TriggerClientEvent('wasabi_ambulance:deleteStretcherFromVehicle', SERVER_ID, NETID)

Will remove the stretcher from a vehicle, server-sided.


SERVER_ID: Server Id

NETID : Vehicle net ID that

PreviousDeath ScreensNextState Bags

Last updated 4 months ago

🚑