opnaiC Posted May 15, 2016 Posted May 15, 2016 Hello, how I can setup it that players will be visible at the F11 map for all players? And each player has the color from his fraction.
Dimos7 Posted May 15, 2016 Posted May 15, 2016 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
opnaiC Posted May 15, 2016 Author Posted May 15, 2016 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..
Bean666 Posted May 15, 2016 Posted May 15, 2016 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 )
opnaiC Posted May 15, 2016 Author Posted May 15, 2016 tryEDIT: 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 ?
Dimos7 Posted May 15, 2016 Posted May 15, 2016 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)
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