OSP Development
Ambulance Job
Ambulance Job
  • 👋Welcome to OSP Development
  • Overview
    • 💡Showcase
  • In-Game Use
    • 📪Overview
    • 🛏️Stretcher
    • 📺ICU Screens
    • 🎒Medical Equipment
    • 🩻Xray
    • Skelly
  • Developer usage
    • 📞Dispatch Integration
    • 👨‍💻Developer Usage
    • 💀isDead function
    • 💉Custom Medication
    • FFA/Paintball Integration
    • Inventory Items
    • society/banking exports
    • Custom Deathscreen
  • FAQ
    • ❌Issues
    • ❓General
Powered by GitBook
On this page
  1. Developer usage

isDead function

An example function to check if the player is dead in other scripts.

function isDead()
    local playerId = GetPlayerServerId(PlayerId())
    local ambulanceData = exports.osp_ambulance:GetAmbulanceData(playerId)
    if ambulanceData.isDead or ambulanceData.inLastStand then
        return true
    end
    return false
end

or use the pre-existing export

local isDead = exports["osp_ambulance"]:isDead()

the isDead variable will return false/true depending on the players death status

PreviousDeveloper UsageNextCustom Medication

Last updated 11 months ago

💀