mgdmgd Posted June 29, 2017 Share Posted June 29, 2017 I was wondering if somebody can help me with a blip system only set for the police cars that shown on minimap and f11 thanks. Link to comment
mgdmgd Posted June 29, 2017 Author Share Posted June 29, 2017 function createCustomBlip ( x, y, width, height, path, fRadius ) if not tonumber(x) or not tonumber(y) or not type(path) == "string" then outputDebugString("createCustomBlip - Bad argument",0) return false end sourceResource = sourceResource or getThisResource() local resourceName = getResourceName(sourceResource) fRadius = fRadius or DEFAULT_STREAM_DISTANCE if not tonumber(fRadius) then outputDebugString("createCustomBlip - Bad argument",0) return false end local image = dxImage:create( ":"..resourceName.."/"..path, 0, 0, width, height, false ) streamedBlips[image] = streamedBlips[image] or {} streamedBlips[image].radius = fRadius streamedBlips[image].x = x streamedBlips[image].y = y streamedBlips[image].width = width streamedBlips[image].height = height streamedBlips[image].visible = true VISIBLE_BLIP_COUNT = VISIBLE_BLIP_COUNT + 1 addEventHandler ( "onClientResourceStop", getResourceRootElement(sourceResource), function() streamedBlips[image] = nil VISIBLE_BLIP_COUNT = VISIBLE_BLIP_COUNT - 1 destroyWidget ( image ) end ) return image.id end Link to comment
</Mr.Tn6eL> Posted June 30, 2017 Share Posted June 30, 2017 onClientElementStreamIn onClientElementStreamOut Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now