Exports

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


SERVER_ID: Server ID

diagnosePatient
exports.wasabi_ambulance:diagnosePatient()

Gives notification of what injury a nearby dead player has. If no injury it will notify that no further treatment is needed

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

Last updated