Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if players[i].job.name == "sheriff" then
- local id = GetPlayerFromServerId(players[i].source)
- if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
- createBlip(id)
- end
- elseif players[i].job.name == "sahp" then
- local id = GetPlayerFromServerId(players[i].source)
- if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
- createBlipSAHP(id)
- end
- elseif players[i].job.name == "police" then
- local id = GetPlayerFromServerId(players[i].source)
- if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
- createBlipPolice(id)
- end
- elseif players[i].job.name == "ambulance" then
- local id = GetPlayerFromServerId(players[i].source)
- if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
- createBlipEMS(id)
- end
- end
- function createBlip(id)
- local ped = GetPlayerPed(id)
- local blip = GetBlipFromEntity(ped)
- if not DoesBlipExist(blip) then -- Add blip and create head display on player
- blip = AddBlipForEntity(ped)
- SetBlipSprite(blip, 1)
- ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
- SetBlipRotation(blip, math.ceil(GetEntityHeading(ped))) -- update rotation
- SetBlipScale(blip, 0.85) -- set scale
- SetBlipAsShortRange(blip, true)
- SetBlipColour(blip, 5)
- BeginTextCommandSetBlipName("STRING")
- AddTextComponentSubstringPlayerName("Jednotka BSCO")
- EndTextCommandSetBlipName(blip)
- table.insert(blipsCops, blip) -- add blip to array so we can remove it later
- end
- end
- function createBlipSAHP(id)
- local ped = GetPlayerPed(id)
- local blip = GetBlipFromEntity(ped)
- if not DoesBlipExist(blip) then -- Add blip and create head display on player
- blip = AddBlipForEntity(ped)
- SetBlipSprite(blip, 1)
- ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
- SetBlipRotation(blip, math.ceil(GetEntityHeading(ped))) -- update rotation
- SetBlipScale(blip, 0.85) -- set scale
- SetBlipAsShortRange(blip, true)
- SetBlipColour(blip, 28)
- BeginTextCommandSetBlipName("STRING")
- AddTextComponentSubstringPlayerName("Jednotka SAHP")
- EndTextCommandSetBlipName(blip)
- table.insert(blipsCops, blip) -- add blip to array so we can remove it later
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement