your problem is, that you check if the player element is attached to something, which is not the case at all. the blip is attached to the player, not the other way around. use getAttachedElements in a loop and use your size and icon check there
if getPlayerName(source) == "[2RT]acp___(PL)" then
setVehicleColor(getPedOccupiedVehicle(source), 79, 79, 79, 79)
local elements = getAttachedElements(source)
local docreate = true
for i,v in ipairs(elements) do
if ( getElementType(v) == "blip" and getBlipIcon(v) == 0 and getBlipSize(v) == 4 ) then
docreate = false
break
end
end
if docreate then
createBlipAttachedTo(source, 0, 1, 0, 0, 255, 255, 0, 400)
outputDebugString("createBlipAttachedTo" ..getPlayerName(source), 3, 255, 0, 0)
end
end