Jump to content

حاولة كثير !!


+Source|>

Recommended Posts

حاولة فيها وما عرفتلها

for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
end
	
addEventHandler( 'onClientMarkerHit', resourceRoot,
function( hitElement )
if hitElement == localPlayer then
if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
local x, y, z = getElementPosition( Cplayer )
if ( z <= 7.25465 ) then
guiGridListSetSelectedItem( list_buyplace, 0, 1 )
local Sel = guiGridListGetSelectedItem( list_buyplace )
	if ( Sel == -1 ) then return end
		local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
			local x1, y1, z1, x2, y2, z2 = unpack( Data )
			fadeCamera( false )
		setTimer( fadeCamera, 1500, 1, true )
				setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
				if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
		triggerServerEvent( 'VehiclesSystem;createViewVehicle', Cplayer, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
end
end
end
end, false )

اول كان ماركر واحد وشغال

سويت جدول ماركرات ولوب

ولما ادخل ماركر م يشتغل

Link to comment
2 minutes ago, Source|> said:

حاولة فيها وما عرفتلها


for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
end
	
addEventHandler( 'onClientMarkerHit', resourceRoot,
function( hitElement )
if hitElement == localPlayer then
if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
local x, y, z = getElementPosition( Cplayer )
if ( z <= 7.25465 ) then
guiGridListSetSelectedItem( list_buyplace, 0, 1 )
local Sel = guiGridListGetSelectedItem( list_buyplace )
	if ( Sel == -1 ) then return end
		local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
			local x1, y1, z1, x2, y2, z2 = unpack( Data )
			fadeCamera( false )
		setTimer( fadeCamera, 1500, 1, true )
				setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
				if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
		triggerServerEvent( 'VehiclesSystem;createViewVehicle', Cplayer, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
end
end
end
end, false )

اول كان ماركر واحد وشغال

سويت جدول ماركرات ولوب

ولما ادخل ماركر م يشتغل

وش تبي تسوي ؟ ,
+ Cplayer ? ??? مو معرفه !!

Link to comment
addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
		for i, v in ipairs( Markers ) do
			local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
			if ( source == marker ) then
				if ( hitElement == localPlayer and  getElementDimension( hitElement ) == 0 ) then
					local x, y, z = getElementPosition( hitElement )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
		end
	end, false )

ما أتوقع الكود اللي فوق بيشتغل معك لأنك لازم تضيفه بحدث تشغيل السكربت عشان يسوي لوب للجدول

عالعموم جربه وشوف 

Edited by N3xT
Link to comment
14 minutes ago, N3xT said:

addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
		for i, v in ipairs( Markers ) do
			local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
			if ( source == marker ) then
				if ( hitElement == localPlayer and  getElementDimension( hitElement ) == 0 ) then
					local x, y, z = getElementPosition( hitElement )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
		end
	end, false )

ما أتوقع الكود اللي فوق بيشتغل معك لأنك لازم تضيفه بحدث تشغيل السكربت عشان يسوي لوب للجدول

عالعموم جربه وشوف 

لا ما ظبطت

 

20 minutes ago, MR.StoRm said:

وش تبي تسوي ؟ ,
+ Cplayer ? ??? مو معرفه !!

اول كانت شغاله تمام

لما اضفت جدول ولوب

ما اشتغلت

Link to comment
Just now, MR.StoRm said:

ورينا الجدول 

local Markers = {
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906},
}

 

local Markers = { -- الماركرات
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906},
}

for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
end
	
addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
	if ( source == marker ) then
		if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
			local x, y, z = getElementPosition( Cplayer )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
	end, false 
)

 

Link to comment
11 minutes ago, Source|> said:

local Markers = {
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906},
}

 


local Markers = { -- الماركرات
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906},
}

for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
end
	
addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
	if ( source == marker ) then
		if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
			local x, y, z = getElementPosition( Cplayer )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
	end, false 
)

 

دي بق يقول شي ء؟ 

Link to comment
local Markers = { -- الماركرات
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906}
}

LimitBreaker = {}	

for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
	LimitBreaker[marker] = true
end
	
addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
	if LimitBreaker[source] then
		if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
			local x, y, z = getElementPosition( Cplayer )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
	end, false 
)

Cplayer مدري وش وضعها

Edited by #BrosS
Link to comment
40 minutes ago, #BrosS said:

local Markers = { -- الماركرات
	{-1663.51257, 1208.61926, 6.25465},
	{-1649.62720, 1205.29102, 7.25000},
	{-1632.57458, 1206.96558, 7.03906}
}

LimitBreaker = {}	

for i, v in ipairs( Markers ) do
	local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
	LimitBreaker[marker] = true
end
	
addEventHandler( 'onClientMarkerHit', root,
	function ( hitElement )
	if LimitBreaker[source] then
		if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
			local x, y, z = getElementPosition( Cplayer )
					if ( z <= 7.25465 ) then
						guiGridListSetSelectedItem( list_buyplace, 0, 1 )
						local Sel = guiGridListGetSelectedItem( list_buyplace )
						if ( Sel == -1 ) then return end
						local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
						local x1, y1, z1, x2, y2, z2 = unpack( Data )
						fadeCamera( false )
						setTimer( fadeCamera, 1500, 1, true )
						setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
						if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
						triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
						setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
						setTimer( showCursor, 1500, 1, not isCursorShowing(  ) )
					end
				end
			end
	end, false 
)

Cplayer مدري وش وضعها

والله كانت شغاله بماركر واحد

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