Início › Documentação › Instalação · origen_police
O nosso script só suporta as seguintes versões das duas frameworks mais usadas. Em versões anteriores pode ser utilizável, mas não damos suporte, pois o desenvolvimento centra-se nas seguintes versões:
ensure oxmysql/icmysql
ensure qb-core
...(make sure to start the inventory before the script)
ensure pma-voice
ensure origen_policeInsere os ficheiros SQL na tua base de dados:
Regista todos os itens obrigatórios no teu sistema de inventário. Consulta a lista completa com blocos para ox_inventory e QBCore:
Recomendamos carregar os ficheiros do script sem usar o FileZilla, pois pode corromper os nossos scripts. Usa o WinSCP ou outro programa fiável.
Se o teu script de inventário não aparecer aqui, não precisas de modificar nada nele.
No final de qb-inventory/server/main.lua:
exports('GetStashItems', GetStashItems)
RegisterServerEvent('qb-inventory:server:SaveStashItems', function(stashId, items)
MySQL.insert('INSERT INTO stashitems (stash, items) VALUES (@stash, @items) ON DUPLICATE KEY UPDATE items = @items', {
['@stash'] = stashId,
['@items'] = json.encode(items)
})
if Stashes[stashId] then
Stashes[stashId].items = items
end
end)Se o teu script de roupa não aparecer aqui, não precisas de modificar nada nele.
No final de qb-clothing/client/main.lua:
exports("GetSkinData", function()
return skinData
end)Se o teu script de ambulância não aparecer aqui, não precisas de modificar nada nele.
No final de esx_ambulancejob/client/job.lua:
RegisterCommand('revivep', function()
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
revivePlayer(closestPlayer)
end)
RegisterCommand('healp', function()
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(quantity)
if quantity > 0 then
local closestPlayerPed = GetPlayerPed(closestPlayer)
local health = GetEntityHealth(closestPlayerPed)
if health > 0 then
local playerPed = PlayerPedId()
isBusy = true
ESX.ShowNotification(_U('heal_inprogress'))
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
Wait(10000)
ClearPedTasks(playerPed)
TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit')
TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'big')
ESX.ShowNotification(_U('heal_complete', GetPlayerName(closestPlayer)))
isBusy = false
else
ESX.ShowNotification(_U('player_not_conscious'))
end
else
ESX.ShowNotification(_U('not_enough_medikit'))
end
end, 'medikit')
end)Certifica-te de que tens todas estas linhas no teu server.cfg:
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_ace resource.qb-core command allow
add_ace qbcore.god command allow
add_principal qbcore.god group.admin
add_principal qbcore.god qbcore.admin
add_principal qbcore.admin qbcore.modRegista a tua licença no grupo qbcore.god — substitui pela tua:
add_principal identifier.license:8f1a3xxxxxxxxxxxxxxxx qbcore.god # Player NamePara verificar que as permissões estão bem configuradas, Config.Maps em config/markers.lua deve estar vazio e o botão SETTINGS deve aparecer em baixo à direita no tablet.
Config.Maps = { -- YOU CAN USE THIS OPTION OR THE IN GAME MENU INSIDE THE POLICE TABLET
-- PLACE YOUR STATION NAME HERE, Example: "default-gta"
}Se estiver bem configurado, verás esta mensagem no F8 no primeiro arranque:
WARNING: NO ACTIVE MAPS, PLEASE ADD SOME IN THE SETTING TAB OF THE POLICE TABLELembra-te de seguir os passos de instalação do pma-voice: