Jump to content

تعديل كود سيارة


Recommended Posts

سلام عليكم

ابي لما اضغط زر يسحب من شخص سيارته ويعطيله سيارة جديدة

محاولتي

Vehicle = { }
addEvent ( "Take:Vehiclee", true)
addEventHandler( "Take:Vehiclee",root,
	function ( )
		x,y,z  = getElementPosition ( source )
if ( getElementType(element) == "vehicle" ) then
destroyElement(element)
		Vehicle[source] = createVehicle ( 502,  x,  y,  z  )
		warpPedIntoVehicle ( source, Vehicle[source] )
			outputChatBox( "* Done you give Car.",source,0,255,0,true)
           end
		   end
)

 

Link to comment
1 hour ago, Mr.Mostafa said:

محاولتي

Vehicle = { }
addEvent ( "Take:Vehiclee", true)
addEventHandler( "Take:Vehiclee",root,
	function ( )
		x,y,z  = getElementPosition ( source )
if (isPedInVehicle(source) ) then
destroyElement(getPedOccupiedVehicle(source))
      Vehicle[source]=nil
      end
		Vehicle[source] = createVehicle ( 502,  x,  y,  z+1  )
		warpPedIntoVehicle ( source, Vehicle[source] )
			outputChatBox( "* Done you give Car.",source,0,255,0,true)
           
		   end
)

 

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