125 lines
3.8 KiB
Lua
125 lines
3.8 KiB
Lua
--====================== CLIENTSIDE EXPORTS ======================--
|
|
|
|
exports('isPullOverSteeringModeEnabled', function()
|
|
return isKeyboardSteeringMode
|
|
end)
|
|
|
|
-- local isOnShift = exports['night_ers']:getIsPlayerOnShift()
|
|
exports('getIsPlayerOnShift', function()
|
|
-- Returns: true or false
|
|
return isPlayerOnShift
|
|
end)
|
|
|
|
-- local getPlayerActiveServiceType = exports['night_ers']:getPlayerActiveServiceType()
|
|
exports('getPlayerActiveServiceType', function()
|
|
-- Returns: "police", "ambulance", "fire", "tow" or nil
|
|
return selectedService
|
|
end)
|
|
|
|
exports('getIsPlayerAttachedToCallout', function()
|
|
-- Returns: true or false
|
|
return isAttachedToCallout
|
|
end)
|
|
|
|
exports('getIsPlayerTrackingUnit', function()
|
|
-- Returns: true or false
|
|
return isTrackingUnit.isTracking
|
|
end)
|
|
|
|
exports('getIsPedAnAnimalPed', function(ped)
|
|
return ERS_IsPedAnAnimalPed(ped)
|
|
end)
|
|
|
|
exports('toggleDispatchMessages', function()
|
|
ToggleDispatchMessages()
|
|
end)
|
|
|
|
exports('toggleCallouts', function()
|
|
ToggleCallouts()
|
|
end)
|
|
|
|
exports('playRadioAnimation', function()
|
|
PlayRadioAnimation()
|
|
end)
|
|
|
|
exports('toggleHints', function()
|
|
ToggleHints()
|
|
end)
|
|
|
|
exports('toggleShift', function(shiftType)
|
|
ToggleShift(shiftType) -- shiftType can be "police", "ambulance", "fire" or "tow"
|
|
end)
|
|
|
|
exports('trackPlayerCallout', function(targetSource)
|
|
TrackUnit(targetSource)
|
|
end)
|
|
|
|
exports('ERS_PedEquipWeapon', function(pedEntityId, weaponModelName, ammo)
|
|
ERS_PedEquipWeapon(pedEntityId, weaponModelName, ammo)
|
|
end)
|
|
|
|
exports('SetERSVehicleInfoDisplay', function(display)
|
|
SetERSVehicleInfoDisplay(display)
|
|
end)
|
|
|
|
exports('SetERSIDCardInfoDisplay', function(display)
|
|
SetERSIDCardInfoDisplay(display)
|
|
end)
|
|
|
|
exports('ERS_RequestOrCancelPursuitBackupByType', function(unitType)
|
|
ERS_RequestOrCancelPursuitBackupByType(unitType) -- Available unit types: "light", "medium", "heavy", "air", "army" (only during pursuit mode)
|
|
end)
|
|
|
|
exports('RequestNPCBackupByType', function(backupType)
|
|
RequestNPCBackupByType(backupType) -- Available backup types: "ambulance", "police", "taxi", "tow", "roadservice", "coroner", "animalrescue", "mechanic", "fire"
|
|
end)
|
|
|
|
exports('CancelNPCBackupByType', function(backupType, mustNotify)
|
|
CancelNPCBackupByType(backupType, mustNotify) -- Available backup types: "ambulance", "police", "taxi", "tow", "roadservice", "coroner", "animalrescue", "mechanic", "fire"
|
|
end)
|
|
|
|
exports('ERS_ConnectClosestVehicle', function()
|
|
ERS_ConnectClosestVehicle()
|
|
end)
|
|
|
|
--====================== TEST COMMANDS ======================--
|
|
|
|
-- RegisterCommand('testclientexports', function()
|
|
|
|
-- local isOnShift = exports['night_ers']:getIsPlayerOnShift()
|
|
-- print(isOnShift)
|
|
|
|
-- local getPlayerActiveServiceType = exports['night_ers']:getPlayerActiveServiceType()
|
|
-- print(getPlayerActiveServiceType)
|
|
|
|
-- local isPlayerAttachedToCallout = exports['night_ers']:getIsPlayerAttachedToCallout()
|
|
-- print(isPlayerAttachedToCallout)
|
|
|
|
-- local isPlayerTrackingUnit = exports['night_ers']:getIsPlayerTrackingUnit()
|
|
-- print(isPlayerTrackingUnit)
|
|
|
|
-- exports['night_ers']:playRadioAnimation()
|
|
|
|
-- exports['night_ers']:toggleDispatchMessages()
|
|
|
|
-- exports['night_ers']:toggleHints()
|
|
|
|
-- exports['night_ers']:toggleShift()
|
|
|
|
-- exports['night_ers']:trackPlayerCallout(targetSource) -- targetSource is the target player server id
|
|
|
|
-- exports['night_ers']:ERS_PedEquipWeapon(pedEntityId, weaponModelName, ammo)
|
|
|
|
-- exports['night_ers']:SetERSVehicleInfoDisplay(false) -- Or true...
|
|
|
|
-- exports['night_ers']:SetERSIDCardInfoDisplay(false) -- Or true...
|
|
|
|
-- exports['night_ers']:ERS_RequestOrCancelPursuitBackupByType("light")
|
|
|
|
-- exports['night_ers']:RequestNPCBackupByType("tow")
|
|
|
|
-- exports['night_ers']:CancelNPCBackupByType("tow", true)
|
|
|
|
-- exports['night_ers']:ERS_ConnectClosestVehicle()
|
|
|
|
-- end, false) |