Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local isRadarExtended = false
- Citizen.CreateThread(function()
- while true do
- Wait( 1 )
- if IsControlJustPressed( 0, 20 ) then
- if not isRadarExtended then
- SetRadarBigmapEnabled( true, false )
- isRadarExtended = true
- Citizen.CreateThread(function()
- run = true
- while run do
- for i = 0, 500 do
- Wait(1)
- if not isRadarExtended then
- run = false
- break
- end
- end
- SetRadarBigmapEnabled( false, false )
- isRadarExtended = false
- end
- end)
- else
- SetRadarBigmapEnabled( false, false )
- isRadarExtended = false
- end
- end
- for id = 0, 64 do
- if NetworkIsPlayerActive( id ) and GetPlayerPed( id ) ~= GetPlayerPed( -1 ) then
- ped = GetPlayerPed( id )
- blip = GetBlipFromEntity( ped )
- headId = Citizen.InvokeNative( 0xBFEFE3321A3F5015, ped, GetPlayerName( id ), false, false, "", false )
- wantedLvl = GetPlayerWantedLevel( id )
- if wantedLvl then
- Citizen.InvokeNative( 0x63BB75ABEDC1F6A0, headId, 7, true )
- Citizen.InvokeNative( 0xCF228E2AA03099C3, headId, wantedLvl )
- else
- Citizen.InvokeNative( 0x63BB75ABEDC1F6A0, headId, 7, false )
- end
- -- Speaking display
- if NetworkIsPlayerTalking( id ) then
- Citizen.InvokeNative( 0x63BB75ABEDC1F6A0, headId, 9, true )
- else
- Citizen.InvokeNative( 0x63BB75ABEDC1F6A0, headId, 9, false )
- end
- -- BLIP STUFF --
- if not DoesBlipExist( blip ) then
- blip = AddBlipForEntity( ped )
- SetBlipSprite( blip, 1 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, true )
- else -- update blip
- veh = GetVehiclePedIsIn( ped, false )
- blipSprite = GetBlipSprite( blip )
- if not GetEntityHealth( ped ) then
- if blipSprite ~= 274 then
- SetBlipSprite( blip, 274 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false ) --
- end
- elseif veh then
- vehClass = GetVehicleClass( veh )
- vehModel = GetEntityModel( veh )
- if vehClass == 15 then -- jet
- if blipSprite ~= 422 then
- SetBlipSprite( blip, 422 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false ) --
- end
- elseif vehClass == 16 then -- plane
- if vehModel == GetHashKey( "besra" ) or vehModel == GetHashKey( "hydra" )
- or vehModel == GetHashKey( "lazer" ) then -- jet
- if blipSprite ~= 424 then
- SetBlipSprite( blip, 424 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false )
- end
- elseif blipSprite ~= 423 then
- SetBlipSprite( blip, 423 )
- Citizen.InvokeNative (0x5FBCA48327B914DF, blip, false )
- end
- elseif vehClass == 14 then -- boat
- if blipSprite ~= 427 then
- SetBlipSprite( blip, 427 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false )
- end
- elseif vehModel == GetHashKey( "insurgent" ) or vehModel == GetHashKey( "insurgent2" )
- or vehModel == GetHashKey( "limo2" ) then
- if blipSprite ~= 426 then
- SetBlipSprite( blip, 426 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false )
- end
- elseif vehModel == GetHashKey( "rhino" ) then
- if blipSprite ~= 421 then
- SetBlipSprite( blip, 421 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, false )
- end
- elseif blipSprite ~= 1 then
- SetBlipSprite( blip, 1 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, true )
- end
- passengers = GetVehicleNumberOfPassengers( veh )
- if passengers then
- if not IsVehicleSeatFree( veh, -1 ) then
- passengers = passengers + 1
- end
- ShowNumberOnBlip( blip, passengers )
- else
- HideNumberOnBlip( blip )
- end
- else
- HideNumberOnBlip( blip )
- if blipSprite ~= 1 then
- SetBlipSprite( blip, 1 )
- Citizen.InvokeNative( 0x5FBCA48327B914DF, blip, true )
- end
- end
- SetBlipRotation( blip, math.ceil( GetEntityHeading( veh ) ) )
- SetBlipNameToPlayerName( blip, id )
- SetBlipScale( blip, 0.85 )
- if IsPauseMenuActive() then
- SetBlipAlpha( blip, 255 )
- else
- x1, y1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
- x2, y2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
- distance = ( math.floor( math.abs( math.sqrt( ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ) ) / -1 ) ) + 900
- if distance < 0 then
- distance = 0
- elseif distance > 255 then
- distance = 255
- end
- SetBlipAlpha( blip, distance )
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement