Best-Killer Posted December 20, 2015 Posted December 20, 2015 How to make blip showing only when player get the job !! ?
1LoL1 Posted December 20, 2015 Posted December 20, 2015 How to make blip showing only when player get the job !! ? What you mean Job? post the script.
Best-Killer Posted December 20, 2015 Author Posted December 20, 2015 oh sory i mean marker showing only when player get Job
1LoL1 Posted December 20, 2015 Posted December 20, 2015 oh sory i mean marker showing only when player get Job What do you mean Job?
Best-Killer Posted December 20, 2015 Author Posted December 20, 2015 oh sory 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)
Noki Posted December 20, 2015 Posted December 20, 2015 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.
Best-Killer Posted December 20, 2015 Author Posted December 20, 2015 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
Best-Killer Posted December 21, 2015 Author Posted December 21, 2015 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
Noki Posted December 21, 2015 Posted December 21, 2015 Move createMarker inside the function. Also, I don't see getElemenyData within the code you posted. Looks like you have errors elsewhere.
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