Hello,
I made a script for a Pin/Marker put i would like to add some more.
now it is like you open F11 then press M double click and a Pin/Marker Create.
Put i would like to get more pins/markers in diffrent colors.
Can someone help me with that.
I would really appreciate that.
cleint.lua:
local blipMark
local fScreen = { guiGetScreenSize( ) };
local bind = 'M'
bindKey( tostring( bind ), 'down',
function( )
showCursor( not isCursorShowing( ) )
end
)
addEventHandler( 'onClientDoubleClick', getRootElement( ),
function( button, absoluteX, absoluteY )
if not isPlayerMapVisible( ) then return end
local minX, minY, maxX, maxY = getPlayerMapBoundingBox( )
if( absoluteX >= minX and absoluteX <= ( minX + ( maxX-minX ) ) )and( absoluteY >= minY and absoluteY <= ( minY + ( maxY-minY ) ) )then
if isElement( blipMark ) then
local retDestroy = destroyElement( blipMark )
if retDestroy then
outputChatBox( 'Mark Removed!', 255, 0, 0 )
end
return
end
blipMark = createBlip(
( ( ( absoluteX - minX ) / ( maxX - minX ) ) * 6000 - 3000 ),
( 3000 - ( ( absoluteY - minY ) / ( maxY-minY) ) * 6000 ),
0, 41
)
if blipMark then
outputChatBox( 'Mark Placed!', 0, 255, 0 )
end
end
end
);
addEventHandler( 'onClientRender', getRootElement( ),
function( )
if not isPlayerMapVisible( ) then return end
dxDrawText( 'Press M And double click on a postion where you want a mark!',
(fScreen[1]/1), (fScreen[2]/0.6), 0, 0,
tocolor( 255, 255, 255, 255 ),
1.00, 'default', 'center', 'center',
false, true, false, false, false )
end
);