Remove player blips without disabling scripthook

Did it finally work for you guys? :heart:

1 Like

It was working, I think an update broke it…could be wrong though.

Sorry for such the late reply, but THANK YOU. It finally works :slight_smile: !!!

I just found this and this looks awesome. Could you paste the final script here or tell me which one above is the one that works? thanks

1 Like

could i also request that you paste the final script here, or release this as a finished script it would be much appreciated

Im getting an error in my console: https://gyazo.com/55545ca3c4f2945e5ad75f5fc98ef9e2

im not seeing anything wrong with the code.

here is my code https://gyazo.com/24222a8754310b37f3e7b9c3d0d4c89d

Try invoking the native?

I’m still new to lua, how would I do that?

Something like:
Citizen.InvokeNative(0x1BEDE233E6CD2A1F, v)

And replace GET_FIRST_BLIP_INFO_ID with it

1 Like

Run it on the client, the server cannot run natives :slight_smile:

1 Like

Whoops, completely missed that :laughing:

1 Like

Hello everyone. I am looking through this thread, and like those above have requested, is there a way that we could get a final code that we could add in order to remove this and maybe a little bit of instruction like where exactly to insert the coding. Thanks in advance!

1 Like

I’m really hoping someone can put the final one at the bottom that works. This is too confusing to follow. Thanks

How is this particular code executed? Like a resource?

Make a folder called: disableplayerblips - In that folder. Make the following files:

_resource.lua

Than put this in the file:

client_script ‘client.lua’

After that, make another file called: client.lua
Put the following code in there:

local blipIds = {
	1,274,421,424,423,422,
	426,404,308,427,226,56,
	198,67,68,318,225,274
}

function isBlipAttachedToPlayer( blip )
	local entity = GetBlipInfoIdEntityIndex(blip)
	if entity then -- it is attached to entity?
		if IsEntityAPed(entity) and IsPedAPlayer(GetPedIndexFromEntityIndex(entity)) then -- is a player?
			return true
		end
	end
	
	return false
end

Citizen.CreateThread(function()
    while true do
		Citizen.Wait(0)
		
		for _,v in pairs(blipIds) do
			local blip = GetFirstBlipInfoId(v)

			while DoesBlipExist(blip) do
				if isBlipAttachedToPlayer(blip) then
					SetBlipAlpha(blip, 0) -- Lambda doesn't touch alpha, it's safe to set it :)
				end
				
				blip = GetNextBlipInfoId(v)
			end

		end
	end
end)

All credit to the god himself, Havoc.

Hi here I have a problem:

*** Server console ***
Could not parse resource metadata file… :3: syntax error near ‘<\226>’.

Hope for help :slight_smile: