Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ AddEventHandler('playerSpawned', function()
-- The player has spawned, we gotta set their perms up
TriggerServerEvent('PoliceEMSActivity:RegisterUser');
end)

function giveWeapon(hash)
GiveWeaponToPed(GetPlayerPed(-1), GetHashKey(hash), 999, false, false)
end

RegisterNetEvent('PoliceEMSActivity:GiveWeapons')
AddEventHandler('PoliceEMSActivity:GiveWeapons', function()
giveWeapon("weapon_nightstick")
Expand All @@ -20,6 +22,7 @@ AddEventHandler('PoliceEMSActivity:GiveWeapons', function()
GiveWeaponComponentToPed(GetPlayerPed(-1), 487013001, 0x7BC4CDDC)
SetPedArmour(GetPlayerPed(-1), 100)
end)

RegisterNetEvent('PoliceEMSActivity:TakeWeapons')
AddEventHandler('PoliceEMSActivity:TakeWeapons', function()
-- Remove weapons and armor
Expand Down
28 changes: 25 additions & 3 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
Config = {
Prefix = '^9[^5Badger-Blips^9] ^3',

EnableInheritances = false,
--This will be the inital message.
CopsCommandMessage = "The active cops on are:",

--[[
This is the format of each player onduty in the list. Available Placeholders;
{ACTIVE_TAG} The player's active bliptag.
{PLAYER_NAME} - The player's name.
{PLAYER_ID} - The player's server ID.
{RADIO_FREQ} - The player's current radio frequency. (Must be using pma-voice)
{TIME_ONDUTY} - The time, in minutes, the player has been onduty.
]]
CopsCommandPlayerMessage = "{ACTIVE_TAG} {PLAYER_NAME} (FREQ: {RADIO_FREQ}) - {TIME_ONDUTY}",

RoleList = {
['👮 LSPD | '] = {887518674607562803, 2, nil},
['👮 Sheriff | '] = {887518674607562803, 17, nil},
['👮 SAHP | '] = {887518674607562803, 3, nil},
["Owner"] = {
{'👮 Sheriff | ', 17, 'https://discord.com/api/webhooks/1042272902000676874/tYHDKm68CujIerBsCKJmMXOdt_AsplNvluxulBcjOQdZkkdxddbd5mbN7ksSdCcnWoQL'},
{'👮 LSPD | ', 2 , nil},
{'👮 SAHP | ', 3, nil},
},
},

Inheritances = { --MUST HAVE EnableInheritances SET TO TRUE TO WORK!
["ROLE-1-NAME-OR-ID-HERE"] = {"ROLE-TO-INHERITE-ID-OR-NAME-HERE", "ANOTHER-ROLE-TO-INHERITE-ID-OR-NAME-HERE",},
},
CLIENT_UPDATE_INTERVAL_SECONDS = 3, -- How frequently should the blips on the map update??
}
5 changes: 4 additions & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ game 'gta5'

author 'JaredScar'
description 'PoliceEMSActivity'
version '2.0'
version '3.0'
url 'https://github.com/JaredScar/PoliceEMSActivity'

client_scripts {
Expand All @@ -16,3 +16,6 @@ server_scripts {
"server.lua",
'EmergencyBlips/sv_emergencyblips.lua',
}

server_export "IsPlayerOnDuty"
server_export "GetPlayerBlipTag"
Loading