Jump to content

[HELP] Markers for players on the map


opnaiC

Recommended Posts

function blipPlayer() 
   for _, v in ipairs (getElementsByType("player")) do 
        local r, g, b =  getPlayerNametagColor(v) 
        createBlipAttachedTo(v, 0, 2, r, g, b, 255) 
    end 
end 

not working..

Link to comment

try

EDIT: Works , tested

function blipPlayer() 
   for _, v in ipairs (getElementsByType("player")) do 
        local r, g, b =  getPlayerNametagColor(v) 
        createBlipAttachedTo(v, 0, 2, r, g, b, 255) 
    end 
end 
addEventHandler ( "onResourceStart", getRootElement(), blipPlayer ) 

Link to comment
try

EDIT: Works , tested

function blipPlayer() 
   for _, v in ipairs (getElementsByType("player")) do 
        local r, g, b =  getPlayerNametagColor(v) 
        createBlipAttachedTo(v, 0, 2, r, g, b, 255) 
    end 
end 
addEventHandler ( "onResourceStart", getRootElement(), blipPlayer ) 

Thanks its working but how I can setup it that a player cant see himself on the map ?

Link to comment
function blipPlayer(thePlayer) 
   for _, v in ipairs (getElementsByType("player")) do 
        if not thePlayer then  
            local r, g, b =  getPlayerNametagColor(v) 
            createBlipAttachedTo(v, 0, 2, r, g, b, 255) 
        end 
    end 
end 
addEventHandler("onResourceStart", resourceRoot, blipPlayer) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...