Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
---------bunu updateblip eventiyle değiştir ------------------
RegisterNetEvent('esx_policejob:updateBlip')
AddEventHandler('esx_policejob:updateBlip', function()
-- Refresh all blips
for k, existingBlip in pairs(blipsCops) do
RemoveBlip(existingBlip)
end
-- Clean the blip table
blipsCops = {}
-- Enable blip?
if Config.MaxInService ~= -1 and not playerInService then
return
end
if not Config.EnableJobBlip then
return
end
-- Is the player a cop? In that case show all the blips for other cops
ESX.TriggerServerCallback('esx_policejob:getItemAmount', function(qtty)
if qtty > 0 then
ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
for i=1, #players, 1 do
if players[i].job.name == 'police' and players[i].gps > 0 then
local id = GetPlayerFromServerId(players[i].source)
if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
createBlip(id, players[i].firstname, players[i].lastname)
end
end
if players[i].job.name == 'ambulance' and players[i].gps > 0 then
local id = GetPlayerFromServerId(players[i].source)
if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
createBlip2(id, players[i].firstname, players[i].lastname)
end
end
if players[i].job.name ~= 'police' and players[i].job.name ~= 'ambulance' and players[i].gps > 0 then
local id = GetPlayerFromServerId(players[i].source)
if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
createBlip3(id, players[i].firstname, players[i].lastname)
end
end
end
end)
end
end, 'gps')
end)
---------------------------------------------
-------bunu client dosyasının en alttaki döngüsüyle değiştir -------------------
Citizen.CreateThread(function()
while true do
Citizen.Wait(15000)
ESX.TriggerServerCallback('esx_policejob:getItemAmount', function(qtty)
if qtty > 0 then
TriggerEvent('esx_policejob:updateBlip')
end
end, 'gps')
end
end)
--------------------------------------------------------
-------bunu createblip2 nin altına yapıştır-------------------------
function createBlip3(id, firstname, lastname)
local ped = GetPlayerPed(id)
local blip = GetBlipFromEntity(ped)
if not DoesBlipExist(blip) then
blip = AddBlipForEntity(ped)
SetBlipSprite(blip, 1)
SetBlipColour(blip, 85)
ShowHeadingIndicatorOnBlip(blip, true)
SetBlipRotation(blip, math.ceil(GetEntityHeading(ped)))
SetBlipScale(blip, 0.85)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentString('[~b~Bilinmiyor~s~] - ' .. firstname .. ' ' .. lastname ..'')
EndTextCommandSetBlipName(blip)
table.insert(blipsCops, blip)
end
end
------------------------------------------
------server dosyasındakiler
-------en alttaki 2 eventi bunla değiştir--------------------------------------
AddEventHandler('esx:onAddInventoryItem', function(source, item, count)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if item.name == 'gps' and item.count > 0 then
TriggerClientEvent('esx_policejob:updateBlip', source)
end
end)
AddEventHandler('esx:onRemoveInventoryItem', function(source, item, count)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if item.name == 'gps' and item.count < 1 then
TriggerClientEvent('esx_policejob:removeBlip', source)
end
end)
-------------------------------------------------------------
----bu 3 eventi arattır alttakilerle değiştir--------------------------------
AddEventHandler('playerDropped', function()
-- Save the source in case we lose it (which happens a lot)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
-- Did the player ever join?
if _source ~= nil then
-- Is it worth telling all clients to refresh?
Citizen.Wait(5000)
TriggerClientEvent('esx_policejob:updateBlip', -1)
end
end
end)
RegisterServerEvent('esx_policejob:spawned')
AddEventHandler('esx_policejob:spawned', function()
local _source = source
TriggerClientEvent('esx_policejob:updateBlip', -1)
end)
RegisterServerEvent('esx_policejob:forceBlip')
AddEventHandler('esx_policejob:forceBlip', function()
local _source = source
TriggerClientEvent('esx_policejob:updateBlip', -1)
end)
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
Citizen.Wait(5000)
TriggerClientEvent('esx_policejob:updateBlip', -1)
end
end)
-----------------------------------------------------
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team