Jump to content

Question Blip


Best-Killer

Recommended Posts

Posted
oh sory xD i mean marker showing only when player get Job

What do you mean Job?

example when player get police job or criminal job the marker showing to the player only when he get the job (police or criminal)

Posted
setElementVisibleTo 

There is also an optional parameter in createBlip (called visibleTo) where you can specify who the blip is visible to.

Otherwise you can just create the blip when the player takes the job and destroy it when the player leaves that job or takes a different job.

Posted
setElementVisibleTo 

There is also an optional parameter in createBlip (called visibleTo) where you can specify who the blip is visible to.

Otherwise you can just create the blip when the player takes the job and destroy it when the player leaves that job or takes a different job.

thanks u

Posted

i tried with that bro :)

Marker = createMarker(618.87, 892.12, -37.13-1, "cylinder", 1.3, 255,0,0, 70, root) 
local team = getTeamFromName("Staff") 
addEventHandler("onResourceStart",resourceRoot, 
function () 
for _,players in ipairs (getElementsByType("Player")) do 
if getPlayerTeam(players) == team then 
setElementVisibleTo ( Marker, players, true ) 
else 
setElementVisibleTo ( Marker, players, false ) 
end 
end 
end) 
addEventHandler("onMarkerHit", iron_sell_marker, sell_iron) 

Bad Argument getElementData Expected at argument 1 got nill

Bad Argument setElmentVisibleTo expected element at argument 2 got boolean

Posted

Move createMarker inside the function. Also, I don't see getElemenyData within the code you posted. Looks like you have errors elsewhere.

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...