Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- police blips for if he ride car or in foot
- local function CreateDutyBlips(playerId, playerLabel, playerJob, playerLocation)
- local ped = GetPlayerPed(playerId)
- local blip = GetBlipFromEntity(ped)
- local pedinvehicle = IsPedInAnyVehicle(ped)
- if not DoesBlipExist(blip) then
- if NetworkIsPlayerActive(playerId) then
- blip = AddBlipForEntity(ped)
- else
- blip = AddBlipForCoord(playerLocation.x, playerLocation.y, playerLocation.z)
- end
- if pedinvehicle then
- SetBlipSprite(blip, 225)
- ShowHeadingIndicatorOnBlip(blip, false)
- else
- -- SetBlipSprite(blip, 41)
- ShowHeadingIndicatorOnBlip(blip, true)
- end
- SetBlipRotation(blip, math.ceil(playerLocation.w))
- SetBlipScale(blip, 1.0)
- if playerJob == "police" then
- SetBlipColour(blip, 53)
- else
- SetBlipColour(blip, 53)
- end
- SetBlipAsShortRange(blip, true)
- BeginTextCommandSetBlipName('STRING')
- AddTextComponentString(playerLabel)
- EndTextCommandSetBlipName(blip)
- DutyBlips[#DutyBlips+1] = blip
- end
- if GetBlipFromEntity(PlayerPedId()) == blip then
- -- Ensure we remove our own blip.
- RemoveBlip(blip)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement