40 lines
1.7 KiB
Lua
40 lines
1.7 KiB
Lua
--====================== SERVERSIDE EXPORTS ======================--
|
|
|
|
exports('toggleShift', function(source, shiftType)
|
|
ToggleShift(source, shiftType) -- shiftType can be "police", "ambulance", "fire" or "tow"
|
|
end)
|
|
|
|
exports('trackPlayerCallout', function(source, targetSource)
|
|
TrackUnit(source, targetSource)
|
|
end)
|
|
|
|
exports('setPlayerCalloutOffersEnabled', function(source, enabled)
|
|
SetPlayerCalloutOffersEnabled(source, enabled)
|
|
end)
|
|
|
|
exports('getCallouts', function()
|
|
local jsonReadyTable = cloneWithoutFunctions(Config.Callouts)
|
|
return jsonReadyTable
|
|
end)
|
|
|
|
exports('createCallout', function(callout)
|
|
local newCalloutID = callout.id .. '-' .. os.time()
|
|
Config.Callouts[newCalloutID] = Config.Callouts[callout.id]
|
|
Config.Callouts[newCalloutID].id = newCalloutID
|
|
Config.Callouts[newCalloutID].CalloutLocations = callout.data.CalloutLocations
|
|
Config.Callouts[newCalloutID].PedWeaponData = callout.data.PedWeaponData
|
|
Config.Callouts[newCalloutID].PedActionOnNoActionFound = callout.data.PedActionOnNoActionFound
|
|
Config.Callouts[newCalloutID].PedChanceToFleeFromPlayer = callout.data.PedChanceToFleeFromPlayer
|
|
Config.Callouts[newCalloutID].PedChanceToObtainWeapons = callout.data.PedChanceToObtainWeapons
|
|
Config.Callouts[newCalloutID].PedChanceToAttackPlayer = callout.data.PedChanceToAttackPlayer
|
|
Config.Callouts[newCalloutID].PedChanceToSurrender = callout.data.PedChanceToSurrender
|
|
local returnData = {
|
|
calloutId = newCalloutID,
|
|
}
|
|
return returnData
|
|
end)
|
|
|
|
-- exports['night_ers']:toggleShift(source, shiftType)
|
|
-- exports['night_ers']:trackPlayerCallout(source, targetSource)
|
|
-- exports['night_ers']:setPlayerCalloutOffersEnabled(source, enabled)
|
|
-- exports['night_ers']:createCallout(callout) |