Jump to content

help


Apo

Recommended Posts

hi guys please help me for hit my mark

 

my problem  all player can hit my mark i need only The player who has used the command can hit mark

blip = nil
marker = nil



function mark(thePlayer)
		
			if blip == nil and marker == nil then
				
				local x, y, z = 1819.8046875, -1831.2685546875, 13.4140625
				
		local z = z - 1
		marker = createMarker( x, y, z, "cylinder", 2, 255, 0, 0, 150, getRootElement(thePlayer ))
		blip= createBlipAttachedTo(marker, 0, 2, 255, 0, 255, 255)
			setElementVisibleTo(marker, getRootElement(), false)
			setElementVisibleTo(marker, thePlayer, true)
		else
			destroyElement(blip)
			destroyElement(marker)
			blip = nil
			marker = nil
				end
		end

addCommandHandler("mark", mark, false, false)

function markhit (element)
       if (source == marker) then
       destroyElement(marker)
       destroyElement(blip)
       end
    end
    addEventHandler("onMarkerHit", root, markhit)

 

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