Jump to content

how can i make marker group to use in the same function


aliredha

Recommended Posts

how can i make marker group to use in the same function ?

i made this script what give you possibility to take a tire to block the street, but i need to make another markers.

i use this format but its not working please help me >_< :D...

 

 

local pylonid = 1327
local pylon_x, pylon_y = -0.05, 0.5
local pylonheight = 0.2
local pylonscale1 = 0.45
local pylonscale2 = 0.5
local themarker = {{createMarker(2533, -1714, 12.5, "cylinder", 5, 0, 0, 255, 150)}, --i used this format
				{createMarker(2495, -1750, 12.5, "cylinder", 5, 0, 0, 255, 150)}}

function tayrHead(player, command )
	if (not tayr or tayr == nil) and (isElementWithinMarker( player, themarker)) then
		local px, py, pz = getElementPosition( player )
		tayr = createObject( pylonid, px, py, pz )
		attachElements(tayr, player, pylon_x, pylon_y, pylonheight)
		setObjectScale( tayr, pylonscale1 )
		setElementCollisionsEnabled( tayr, false )
		toggleControl(player, "sprint", false)
		setPedWalkingStyle(player,60)
	else
		detachElements( tayr, player )
                setElementRotation(tayr, 0, 90, 0)
		local px, py, pz = getElementPosition( player )
		setElementPosition(tayr, px, py, pz - 0.9 )
		setElementCollisionsEnabled( tayr, true )
		setObjectScale( tayr, pylonscale2 )
		tayr = nil
		toggleControl(player, "sprint", true)
		setPedWalkingStyle(player,0)
	end
end
addEventHandler ( "onPlayerSpawn", root, -- It binds when you connect. 
function () 

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